Call global methods in appointments modal

This commit is contained in:
Alex Tselegidis 2024-08-13 13:36:03 +02:00
parent ca664294e9
commit aa3bbdfeba

View file

@ -80,7 +80,7 @@ App.Components.AppointmentsModal = (function () {
*/ */
$saveAppointment.on('click', () => { $saveAppointment.on('click', () => {
// Before doing anything the appointment data need to be validated. // Before doing anything the appointment data need to be validated.
if (!validateAppointmentForm()) { if (!App.Components.AppointmentsModal.validateAppointmentForm()) {
return; return;
} }
@ -165,7 +165,7 @@ App.Components.AppointmentsModal = (function () {
$insertAppointment.on('click', () => { $insertAppointment.on('click', () => {
$('.popover').remove(); $('.popover').remove();
resetModal(); App.Components.AppointmentsModal.resetModal();
// Set the selected filter item and find the next appointment time as the default modal values. // Set the selected filter item and find the next appointment time as the default modal values.
if ($selectFilterItem.find('option:selected').attr('type') === 'provider') { if ($selectFilterItem.find('option:selected').attr('type') === 'provider') {
@ -580,5 +580,6 @@ App.Components.AppointmentsModal = (function () {
return { return {
resetModal, resetModal,
validateAppointmentForm,
}; };
})(); })();