File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -204,11 +204,6 @@ function formatTime(date) {
204
204
}
205
205
206
206
function getAvailableSlots ( selectedDate , staffId = null ) {
207
- if ( isRequestInProgress ) {
208
- return ; // Exit the function if a request is already in progress
209
- }
210
- isRequestInProgress = true ;
211
-
212
207
// Update the slot list with the available slots for the selected date
213
208
const slotList = $ ( '#slot-list' ) ;
214
209
const slotContainer = $ ( '.slot-container' ) ;
@@ -250,6 +245,10 @@ function getAvailableSlots(selectedDate, staffId = null) {
250
245
} ) ;
251
246
252
247
// Send an AJAX request to get the available slots for the selected date
248
+ if ( isRequestInProgress ) {
249
+ return ; // Exit the function if a request is already in progress
250
+ }
251
+ isRequestInProgress = true ;
253
252
$ . ajax ( {
254
253
url : availableSlotsAjaxURL ,
255
254
data : ajaxData ,
You can’t perform that action at this time.
0 commit comments