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
1 changed files with 3 additions and 2 deletions

View File

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