From 1d9cdf0f727f2257526095f3c2250d547e4bfa1d Mon Sep 17 00:00:00 2001 From: Tom Fink Date: Mon, 25 Nov 2024 17:58:44 +0100 Subject: [PATCH] fix(ZMS-3436): attempt fix for multi click appointment slot --- frontend/src/components/TheCalendar.vue | 33 ++++++++++++++++++++++--- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/TheCalendar.vue b/frontend/src/components/TheCalendar.vue index 9abb98c..d5fe043 100644 --- a/frontend/src/components/TheCalendar.vue +++ b/frontend/src/components/TheCalendar.vue @@ -87,10 +87,18 @@

{{ times[0].format('H') }}:00-{{ times[0].format('H') }}:59

-
{{ timeSlot.format('H:mm') }} +
{ - this.timeSlotError = this.$t('noAppointmentsAvailable') }) + .catch(() => { + this.timeSlotError = this.$t('noAppointmentsAvailable') + }) + .finally(() => { + this.isLoading = false + }); if (!this.timeSlotError && oldAppointment && !this.$store.state.isRebooking) { this.$store.dispatch('API/cancelAppointment', oldAppointment) @@ -346,6 +364,7 @@ export default { }, handleCaptchaError(error) { console.error("Captcha error:", error); + this.isLoading = false; // Handle the error, possibly show a message to the user } }, @@ -425,6 +444,12 @@ export default { float: left; } +.select-appointment.disabled { + opacity: 0.5; + cursor: not-allowed; + pointer-events: none; +} + .v-picker { margin-top: 0 !important; }