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,6 +1489,7 @@ App.Utils.CalendarDefaultView = (function () {
(availableProvider) => Number(availableProvider.id) === Number($selectFilterItem.val()) (availableProvider) => Number(availableProvider.id) === Number($selectFilterItem.val())
); );
if (provider) {
service = vars('available_services').find( service = vars('available_services').find(
(availableService) => provider.services.indexOf(availableService.id) !== -1 (availableService) => provider.services.indexOf(availableService.id) !== -1
); );
@ -1496,6 +1497,7 @@ App.Utils.CalendarDefaultView = (function () {
if (service) { if (service) {
$appointmentsModal.find('#select-service').val(service.id); $appointmentsModal.find('#select-service').val(service.id);
} }
}
if (!$appointmentsModal.find('#select-service').val()) { if (!$appointmentsModal.find('#select-service').val()) {
$('#select-service option:first').prop('selected', true); $('#select-service option:first').prop('selected', true);