From 8cd70f046796aa92d3efd3e37c756ce6dc1cac11 Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Thu, 4 Dec 2025 16:28:56 -0500 Subject: [PATCH] CASH-1790: add check to keep watches from activating before initial load is complete to fix bug (cherry picked from commit 9e9f6257a62afd226b3dad2093cd297c960568bf) --- src/layouts/schedule/schedule.vue | 8 ++++++++ .../time-slot-question/time-slot-question.vue | 11 +++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index 377a49ad3..d3d382980 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -167,6 +167,7 @@ :timeSlotsForSelectedDate="timeSlotsForSelectedDate" :isSameDay="isSameDay" :selectedRouteCodeData="selectedRouteCodeData" + :isDatePickerDoneInitializing="isDatePickerDoneInitializing" @waitListRequested="handleWaitListRequested" /> @@ -135,7 +134,8 @@ export default { isSameDay: Boolean, displayWaitList: Boolean, selectedRouteCodeData: Object, - }, + isDatePickerDoneInitializing: Boolean, + }, data() { return { timeSlotModalListButton: timeSlotModalListButton, @@ -188,6 +188,9 @@ export default { this.updateDropoffAndTimeSlotAnswersFromSelectedRouteCodeData(newValue); }, timeSlotsForSelectedDate() { + if (!this.isDatePickerDoneInitializing) { + return; + } // needed otherwise it nulls these too early and prevents a previously selected time slot from auto-selecting this.selectedAnswerForDropOffOrInshop = null; this.selectedAnswerForTimeSlots = null; this.autoSelectTimeSlotIfOnlyOneIsAvailable(); @@ -391,7 +394,7 @@ export default { this.answersForDropOffQuestion[0].value !== PICK_A_TIME_BUTTON_VALUE ); }, - shouldDisplayTimeSlotQuestion() { + displayTimeSlotQuestion() { return ( this.selectedAnswerForDropOffOrInshop == PICK_A_TIME_BUTTON_VALUE || !this.isDropOffAppointmentAvailable