From fd9265a26993f151ccfed4a2c27f75d4210721d1 Mon Sep 17 00:00:00 2001 From: Johnny shultz Date: Tue, 22 Jul 2025 12:54:33 -0400 Subject: [PATCH] CASH-1221 CASH-1221 fixed waitList success message from popping up when it is not supposed to, reset waitList selection on change from both modals and new date --- src/digital-components/date-picker/date-picker.vue | 5 +++++ src/layouts/schedule/schedule.vue | 10 ++++++++++ .../schedule/time-slot-question/time-slot-question.vue | 10 +++++++++- .../service-zip-modal-question.vue | 2 +- 4 files changed, 25 insertions(+), 2 deletions(-) diff --git a/src/digital-components/date-picker/date-picker.vue b/src/digital-components/date-picker/date-picker.vue index 7945744ec..dd3efe5b9 100644 --- a/src/digital-components/date-picker/date-picker.vue +++ b/src/digital-components/date-picker/date-picker.vue @@ -307,6 +307,11 @@ export default { }, set(newSelectedDate) { this.$emit("update:modelValue", newSelectedDate); + this.dispatchStoreAction( + this.storeActions.SAVE_WAITLIST_REQUESTED, + false, + false + ); }, }, dropOffDurationText() { diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index e772153d3..afaef4ec1 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -22,6 +22,7 @@ @updated-serviceability="setServiceabilityDetails" @updated-contains-military-base="setContainsMilitaryBase" @updated-bill-to-account-number="setBillToAccountNumber" + @reset-waitlist="resetWaitlist" linkWidgetName="ServiceZipLinkWidget" modalWidgetName="ServiceZipModalWidget" /> { diff --git a/src/layouts/schedule/time-slot-question/time-slot-question.vue b/src/layouts/schedule/time-slot-question/time-slot-question.vue index 82f2caff0..5bace95ec 100644 --- a/src/layouts/schedule/time-slot-question/time-slot-question.vue +++ b/src/layouts/schedule/time-slot-question/time-slot-question.vue @@ -76,6 +76,7 @@ import alert from "@/ux-components/alert/alert.vue"; import experimentMixin from "@/mixins/experiment-mixin"; import { experimentSettings } from "@/constants/experiments"; import store from "@/store"; +import { storeActions } from "@/constants/store-actions"; // Helpers import { deepClone } from "@/helpers/object-helper"; @@ -144,7 +145,6 @@ export default { return { selectedRouteCode: null, timeSlotModalListButton: timeSlotModalListButton, - waitListRequested: this.getWaitListRequestedFromStore(), selectedAnswerForDropOffOrInshop: null, selectedAnswerForTimeSlots: null, }; @@ -345,6 +345,14 @@ export default { waitListSuccessText() { return this.getCmsContent("WaitListSuccessWidget", "BodyText"); }, + waitListRequested: { + get(){ + return this.$store.getters.order.customer?.waitListRequested; + }, + set(value) { + this.dispatchStoreAction(storeActions.SAVE_WAITLIST_REQUESTED, value) + }, + }, isMobileAppointment() { return this.appointmentType === AppointmentTypeStrings.MOBILE; }, diff --git a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue index 5e7aa73e4..74a0fdf77 100644 --- a/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue +++ b/src/layouts/service-location/service-zip-modal-question/service-zip-modal-question.vue @@ -219,7 +219,7 @@ export default { this.$emit("updated-serviceability", serviceabilityDetails.data); this.$emit("updated-contains-military-base", zipCodeData.containsMilitaryBase); this.$emit("updated-bill-to-account-number", billToAccountNumber); - + this.$emit("reset-waitlist"); // update the page level model this.$emit("update:modelValue", this.internalModel);