Select appointment time from within the calendar when "all" select filter item is selected.

This commit is contained in:
Alex Tselegidis 2022-01-24 22:40:35 +01:00
parent 5df3e63055
commit b6e9a7209f

View file

@ -1489,12 +1489,14 @@ App.Utils.CalendarDefaultView = (function () {
(availableProvider) => Number(availableProvider.id) === Number($selectFilterItem.val())
);
service = vars('available_services').find(
(availableService) => provider.services.indexOf(availableService.id) !== -1
);
if (provider) {
service = vars('available_services').find(
(availableService) => provider.services.indexOf(availableService.id) !== -1
);
if (service) {
$appointmentsModal.find('#select-service').val(service.id);
if (service) {
$appointmentsModal.find('#select-service').val(service.id);
}
}
if (!$appointmentsModal.find('#select-service').val()) {