Skip to content

Commit 8874e00

Browse files
authored
Merge pull request #144 from adamspd/143-fixing-duplicate-slot-introduce-staff-member-not-selected-bug
Fixing staff member selection by moving duplicate slot's code
2 parents 7115222 + abbb56d commit 8874e00

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

appointment/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@
55
__package_name__ = "django-appointment"
66
__url__ = "https://github.com/adamspd/django-appointment"
77
__package_website__ = "https://django-appt.adamspierredavid.com/"
8-
__version__ = "3.3.6"
8+
__version__ = "3.3.7"
99
__test_version__ = False

appointment/static/js/appointments.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -204,11 +204,6 @@ function formatTime(date) {
204204
}
205205

206206
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-
212207
// Update the slot list with the available slots for the selected date
213208
const slotList = $('#slot-list');
214209
const slotContainer = $('.slot-container');
@@ -250,6 +245,10 @@ function getAvailableSlots(selectedDate, staffId = null) {
250245
});
251246

252247
// 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;
253252
$.ajax({
254253
url: availableSlotsAjaxURL,
255254
data: ajaxData,

0 commit comments

Comments
 (0)