diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index 6b214f2e2..0e68cb458 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -1169,7 +1169,7 @@ export default { if (this.preSelectedDate) this.selectedDate = this.preSelectedDate; - if (!this.selectedDate) { + if (!this.preSelectedDate) { // if no date is preselected on load, then select the first available let selectedDateMobile = this.getSelectedDateForMobile(); let selectedDateInshop = this.getSelectedDateForInshop(); @@ -1656,6 +1656,17 @@ export default { AppointmentTypeStrings.IN_SHOP_OR_DROP_OFF) && this.selectedProvider ) { + this.selectedTimeSlotInfo = { + timeSlot: { + date: null, + routeCode: null, + startTime: null, + endTime: null, + jobMaxMinutes: null, + jobMinMinutes: null, + }, + isPremiumAppointment: null, + }; this.lastSelectedInshopOrDropoffProvider = this.selectedProvider; } this.appointmentType = AppointmentTypeStrings.MOBILE; 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 df37d4e09..97b334821 100644 --- a/src/layouts/schedule/time-slot-question/time-slot-question.vue +++ b/src/layouts/schedule/time-slot-question/time-slot-question.vue @@ -187,6 +187,7 @@ export default { let appointmentTypeCmsWidgetName; if ( + this.selectedDate == null || this.appointmentType === AppointmentTypeStrings.IN_SHOP_OR_DROP_OFF || this.appointmentType === AppointmentTypeStrings.IN_SHOP || this.appointmentType === AppointmentTypeStrings.DROP_OFF @@ -205,6 +206,10 @@ export default { // ); // } } else { + if (!this.selectedAnswerForTimeSlots && this.selectedRouteCode) { + // Clearing selectedRouteCode if no time slot is selected + this.resetSelectedTimeSlot(); + } appointmentTypeCmsWidgetName = this.selectedRouteCode?.includes( PREMIUM_TIME_SLOT_ID_FLAG )