From 79c9566257ff5b8f7bacb3d4ad2036a7b1d0a542 Mon Sep 17 00:00:00 2001 From: Alex Tselegidis Date: Mon, 17 Jan 2022 21:20:06 +0100 Subject: [PATCH] Hide the appointments modal after a successful appointment store method. --- assets/js/components/appointments_modal.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/assets/js/components/appointments_modal.js b/assets/js/components/appointments_modal.js index fdca198b..84943289 100755 --- a/assets/js/components/appointments_modal.js +++ b/assets/js/components/appointments_modal.js @@ -116,7 +116,8 @@ App.Components.AppointmentsModal = (function () { App.Layouts.Backend.displayNotification(App.Lang.appointment_saved); // Close the modal dialog and refresh the calendar appointments. - $appointmentsModal.find('.alert').addClass('d-none').modal('hide'); + $appointmentsModal.find('.alert').addClass('d-none'); + $appointmentsModal.modal('hide'); $selectFilterItem.trigger('change'); }; @@ -143,7 +144,7 @@ App.Components.AppointmentsModal = (function () { 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') { + if ($selectFilterItem.find('option:selected').attr('type') === 'provider') { const providerId = $('#select-filter-item').val(); const providers = App.Vars.available_providers.filter(