Only pre-select the service if its found

This commit is contained in:
Alex Tselegidis 2022-02-10 20:34:59 +01:00
parent 6c5917aea8
commit 0a4ea1c336

View file

@ -1546,13 +1546,15 @@ App.Utils.CalendarDefaultView = (function () {
(availableService) =>
Number(availableService.id) === Number($selectFilterItem.val())
);
if (service) {
$appointmentsModal.find('#select-service').val(service.id).trigger('change');
}
}
// Preselect time
$('#start-datetime').datepicker('setDate', info.start);
$('#end-datetime').datepicker('setDate', info.end);
$('#message-box').dialog('close');
}
}