From 779cf9415a228df5fa2246bd8bb42bf66736e768 Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Mon, 15 Dec 2025 17:47:38 -0500 Subject: [PATCH 1/4] CASH-1790 another bug fix for no mobile available --- src/layouts/schedule/schedule.vue | 47 ++++++++++++++++--------------- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index bee86a537..ca66fed8c 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -24,6 +24,7 @@ { vm.showMobileFirstModal(); + vm.setSelectedDateToFirstAvailable(); }); }); }, @@ -827,13 +829,13 @@ export default { }, estimatedServiceMinutesMinimum() { return this.isMobileSelected - ? this.selectableDatesMobile.estimatedServiceMinutesMinimum - : this.selectableDatesInshop.estimatedServiceMinutesMinimum; + ? this.selectableDatesMobile?.estimatedServiceMinutesMinimum + : this.selectableDatesInshop?.estimatedServiceMinutesMinimum; }, estimatedServiceMinutesMaximum() { return this.isMobileSelected - ? this.selectableDatesMobile.estimatedServiceMinutesMaximum - : this.selectableDatesInshop.estimatedServiceMinutesMaximum; + ? this.selectableDatesMobile?.estimatedServiceMinutesMaximum + : this.selectableDatesInshop?.estimatedServiceMinutesMaximum; }, timeSlotsForSelectedDate() { if (!this.selectedDate) return null; @@ -841,11 +843,11 @@ export default { if (this.isMobileSelected) { const selectedDateString = selectedDate.replace("-mobile", ""); - return this.selectableDatesMobile.days?.find( + return this.selectableDatesMobile?.days?.find( (selectableDate) => selectableDate.date === selectedDateString ); } else { - return this.selectableDatesInshop.days?.find( + return this.selectableDatesInshop?.days?.find( (selectableDate) => selectableDate.date === this.selectedDate ); } @@ -863,7 +865,7 @@ export default { ); }, isMobileFirstModalOpen() { - return this.selectableDatesMobile.days + return this.selectableDatesMobile?.days ? this.$refs.mobileFirstModal?.getIsModalOpen() : false; }, @@ -1015,7 +1017,9 @@ export default { return store.getters.order.serviceLocation.isVehicleProtected; }, getAppointmentTypeFromStore() { - return store.getters.order.serviceLocation.appointmentType; + const appointmentTypeFromStore = store.getters.order.serviceLocation.appointmentType; + this.handleAppointmentTypeChange(appointmentTypeFromStore); + return appointmentTypeFromStore; }, getSelectedProviderFromStore() { return store.getters.order.serviceLocation.provider; @@ -1036,6 +1040,7 @@ export default { this.appointmentType = null; this.selectedProvider = null; this.appointmentTypeFromAppointmentTypeQuestion = null; + this.handleAppointmentTypeChange(); this.preSelectedDate = null; }, setServiceabilityDetails(serviceabilityDetails) { @@ -1288,7 +1293,7 @@ export default { } } */ - this.$refs.navbar.updateButtonText(navbarButtonText); + this.$refs.navbar?.updateButtonText(navbarButtonText); }, convertSelectedDateToShortMonthAndDay(selectedDate) { // This conversion ensures we don't get get GMT induced date changes @@ -1463,9 +1468,12 @@ export default { this.showLoadingModal(); }, setDisplayWaitList() { - const dateString = this.isMobileSelected - ? this.selectableDatesMobile?.days[0]?.date - : this.selectableDatesInshop?.days[0]?.date; + let dateString; + if (this.isMobileSelected && this.selectableDatesMobile?.days?.length) { + dateString = this.selectableDatesMobile.days[0].date; + } else if (this.selectableDatesInshop?.days?.length) { + dateString = this.selectableDatesInshop.days[0].date; + } if ( experimentMixin.methods.hasSettingEqualTo( experimentSettings.DISPLAY_WAITLIST, @@ -1634,9 +1642,9 @@ export default { }, getFirstAvailableDate() { let dateToSelect; - if (this.isMobileSelected) { + if (this.isMobileSelected && this.selectableDatesMobile?.days?.length) { dateToSelect = returnFirstDate(this.selectableDatesMobile); - } else { + } else if (this.selectableDatesInshop?.days?.length) { dateToSelect = returnFirstDate(this.selectableDatesInshop); } if (!dateToSelect) return null; @@ -1846,13 +1854,6 @@ export default { this.forwardButtonAction(); }, }, - watch: { - appointmentTypeFromAppointmentTypeQuestion: { - handler(newValue, oldValue) { - this.handleAppointmentTypeChange(newValue); - }, - }, - }, components: { funnelHeader, navbar, From 8d98a53f0c1e04ba502949bdebe868d2fa839024 Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Mon, 15 Dec 2025 17:48:46 -0500 Subject: [PATCH 2/4] CASH-1790 prettier change --- src/layouts/schedule/schedule.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index ca66fed8c..7ae428e59 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -1473,7 +1473,7 @@ export default { dateString = this.selectableDatesMobile.days[0].date; } else if (this.selectableDatesInshop?.days?.length) { dateString = this.selectableDatesInshop.days[0].date; - } + } if ( experimentMixin.methods.hasSettingEqualTo( experimentSettings.DISPLAY_WAITLIST, From ad69af36a0a482b64cf4dbe29338ae227880ae59 Mon Sep 17 00:00:00 2001 From: Chris Redelinghuys Date: Tue, 16 Dec 2025 15:14:47 -0500 Subject: [PATCH 3/4] CASH-2036: If ShowPMMobileDays experiment setting is 0, choose first available appointment --- src/layouts/schedule/schedule.vue | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index ff723d9cb..65eec08d0 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -1790,18 +1790,26 @@ export default { } if (this.isShowMobileFirstAppt) { - if (firstMobilePMDate && numberOfDaysToFirstMobilePMDate <= pmMobileDays) { + if (pmMobileDays == 0) { + // Selects the first available time slot + preSelectedMobileAppointment = + numberOfDaysToFirstMobileAMDate < numberOfDaysToFirstMobilePMDate + ? firstMobileAMAppt + : firstMobilePMAppt; + } else if ( + firstMobilePMDate && + numberOfDaysToFirstMobilePMDate <= pmMobileDays + ) { + // Selects the first available PM time slot preSelectedMobileAppointment = firstMobilePMAppt; } else if ( - (firstMobilePMDate && - numberOfDaysToFirstMobilePMDate >= noPMMobileDays) || - pmMobileDays == 0 + firstMobilePMDate && + numberOfDaysToFirstMobilePMDate >= noPMMobileDays ) { + // Selects the first available AM time slot. If none, selects the first available PM time slot preSelectedMobileAppointment = firstMobileAMAppt ? firstMobileAMAppt - : null; - !preSelectedMobileAppointment && - (preSelectedMobileAppointment = firstMobilePMAppt); + : firstMobilePMAppt; } if (preSelectedMobileAppointment) { From dbd7681b4748b598d3a5eac95daa08c63ecab659 Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Tue, 16 Dec 2025 16:42:23 -0500 Subject: [PATCH 4/4] CASH-1790 quick fix; missed event emit --- .../appointment-type-question/appointment-type-question.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/src/layouts/service-location/appointment-type-question/appointment-type-question.vue b/src/layouts/service-location/appointment-type-question/appointment-type-question.vue index fc4d08b92..924b2e62a 100644 --- a/src/layouts/service-location/appointment-type-question/appointment-type-question.vue +++ b/src/layouts/service-location/appointment-type-question/appointment-type-question.vue @@ -80,6 +80,7 @@ export default { }, set: function (newValue) { this.$emit("update:modelValue", newValue); + this.$emit("handle-appointment-type-change", newValue); }, }, isMobileOnly() {