Merge pull request #2958 from Safelite/revert-pr-1790-for-release-2025.12.04
Revert pr 1790 for release 2025.12.04
This commit is contained in:
commit
c80ec6c93c
2 changed files with 28 additions and 21 deletions
|
|
@ -167,7 +167,6 @@
|
||||||
:timeSlotsForSelectedDate="timeSlotsForSelectedDate"
|
:timeSlotsForSelectedDate="timeSlotsForSelectedDate"
|
||||||
:isSameDay="isSameDay"
|
:isSameDay="isSameDay"
|
||||||
:selectedRouteCodeData="selectedRouteCodeData"
|
:selectedRouteCodeData="selectedRouteCodeData"
|
||||||
:isDatePickerDoneInitializing="isDatePickerDoneInitializing"
|
|
||||||
@waitListRequested="handleWaitListRequested" />
|
@waitListRequested="handleWaitListRequested" />
|
||||||
<navbar
|
<navbar
|
||||||
cmsWidgetName="FunnelFooterWidget"
|
cmsWidgetName="FunnelFooterWidget"
|
||||||
|
|
@ -475,7 +474,6 @@ export default {
|
||||||
experimentSettings.SHOW_MOBILE_FIRST_APPT,
|
experimentSettings.SHOW_MOBILE_FIRST_APPT,
|
||||||
"true"
|
"true"
|
||||||
),
|
),
|
||||||
isDatePickerDoneInitializing: false,
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
async beforeRouteEnter(to, from, next) {
|
async beforeRouteEnter(to, from, next) {
|
||||||
|
|
@ -1132,6 +1130,29 @@ export default {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
getTimeSlotInfo() {
|
||||||
|
// Get the current date
|
||||||
|
const currentDate = getTodayDate();
|
||||||
|
|
||||||
|
// Add 10 days to the current date
|
||||||
|
currentDate.setDate(currentDate.getDate() + 10);
|
||||||
|
|
||||||
|
// Format the date as yyyy-mm-dd
|
||||||
|
const year = currentDate.getFullYear();
|
||||||
|
const month = String(currentDate.getMonth() + 1).padStart(2, "0");
|
||||||
|
const day = String(currentDate.getDate()).padStart(2, "0");
|
||||||
|
|
||||||
|
const formattedDate = `${year}-${month}-${day}`;
|
||||||
|
|
||||||
|
return {
|
||||||
|
date: formattedDate,
|
||||||
|
endTime: "12:00",
|
||||||
|
jobMaxMinutes: "180",
|
||||||
|
jobMinMinutes: "120",
|
||||||
|
routeCode: "3357I-03357-M-I*20988*AM",
|
||||||
|
startTime: "08:00",
|
||||||
|
};
|
||||||
|
},
|
||||||
onShopSelected(shopQuestionPopUpData) {
|
onShopSelected(shopQuestionPopUpData) {
|
||||||
this.resetWaitlist();
|
this.resetWaitlist();
|
||||||
this.preSelectedDate = null;
|
this.preSelectedDate = null;
|
||||||
|
|
@ -1220,8 +1241,6 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.isShowMobileFirstAppt && this.hideLoadingModal();
|
this.isShowMobileFirstAppt && this.hideLoadingModal();
|
||||||
await this.$nextTick();
|
|
||||||
this.isDatePickerDoneInitializing = true;
|
|
||||||
},
|
},
|
||||||
getScheduleApiResponse,
|
getScheduleApiResponse,
|
||||||
getServiceZipCtuCodeFromStore() {
|
getServiceZipCtuCodeFromStore() {
|
||||||
|
|
@ -1857,10 +1876,6 @@ export default {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
selectedDate(newValue, oldValue) {
|
selectedDate(newValue, oldValue) {
|
||||||
if (!this.isDatePickerDoneInitializing) {
|
|
||||||
return;
|
|
||||||
} // needed otherwise it nulls selectedTimeSlotInfo too early and prevents a previously selected time slot from auto-selecting
|
|
||||||
|
|
||||||
// Clear time slot selection if date selected changes
|
// Clear time slot selection if date selected changes
|
||||||
const selectedDate = this.getSelectedDateFromStore();
|
const selectedDate = this.getSelectedDateFromStore();
|
||||||
if (oldValue && this.appointmentType === AppointmentTypeStrings.MOBILE) {
|
if (oldValue && this.appointmentType === AppointmentTypeStrings.MOBILE) {
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="time-slots-question">
|
<div class="time-slots-question">
|
||||||
<buttonQuestion
|
<buttonQuestion
|
||||||
ref="chooseDropOffOrInshop"
|
|
||||||
v-if="isDropOffAppointmentAvailable"
|
v-if="isDropOffAppointmentAvailable"
|
||||||
v-model="selectedAnswerForDropOffOrInshop"
|
v-model="selectedAnswerForDropOffOrInshop"
|
||||||
@update:modelValue="dropOffSelectionChanged"
|
@update:modelValue="dropOffSelectionChanged"
|
||||||
|
|
@ -24,9 +23,8 @@
|
||||||
</div>
|
</div>
|
||||||
</buttonQuestion>
|
</buttonQuestion>
|
||||||
<buttonQuestion
|
<buttonQuestion
|
||||||
ref="chooseTimeSlot"
|
ref="buttonQuestion"
|
||||||
v-if="displayTimeSlotQuestion"
|
v-if="shouldDisplayTimeSlotQuestion"
|
||||||
v-model="selectedAnswerForTimeSlots"
|
|
||||||
@update:modelValue="timeSlotSelectionChanged"
|
@update:modelValue="timeSlotSelectionChanged"
|
||||||
buttonTypeString="timeSlotModalListButton"
|
buttonTypeString="timeSlotModalListButton"
|
||||||
:buttonTypeObject="timeSlotModalListButton"
|
:buttonTypeObject="timeSlotModalListButton"
|
||||||
|
|
@ -36,12 +34,10 @@
|
||||||
isInshopOrDropOffAppointment ? 'is-inshop-or-drop-off-appointment' : '',
|
isInshopOrDropOffAppointment ? 'is-inshop-or-drop-off-appointment' : '',
|
||||||
]"
|
]"
|
||||||
:answers="availableTimeSlots"
|
:answers="availableTimeSlots"
|
||||||
:lazyLoad="{
|
:lazyLoad="{ isLazyLoad: !isMobileAppointment, amountToLoad: 10 }"
|
||||||
isLazyLoad: !isMobileAppointment && !selectedAnswerForTimeSlots,
|
|
||||||
amountToLoad: 10,
|
|
||||||
}"
|
|
||||||
groupName="chooseTimeSlot"
|
groupName="chooseTimeSlot"
|
||||||
textPosition="text-center"
|
textPosition="text-center"
|
||||||
|
v-model="selectedAnswerForTimeSlots"
|
||||||
questionText="Available times:"
|
questionText="Available times:"
|
||||||
isRequired
|
isRequired
|
||||||
validationRules="time-slot-required" />
|
validationRules="time-slot-required" />
|
||||||
|
|
@ -137,7 +133,6 @@ export default {
|
||||||
isSameDay: Boolean,
|
isSameDay: Boolean,
|
||||||
displayWaitList: Boolean,
|
displayWaitList: Boolean,
|
||||||
selectedRouteCodeData: Object,
|
selectedRouteCodeData: Object,
|
||||||
isDatePickerDoneInitializing: Boolean,
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -191,9 +186,6 @@ export default {
|
||||||
this.updateDropoffAndTimeSlotAnswersFromSelectedRouteCodeData(newValue);
|
this.updateDropoffAndTimeSlotAnswersFromSelectedRouteCodeData(newValue);
|
||||||
},
|
},
|
||||||
timeSlotsForSelectedDate() {
|
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.selectedAnswerForDropOffOrInshop = null;
|
||||||
this.selectedAnswerForTimeSlots = null;
|
this.selectedAnswerForTimeSlots = null;
|
||||||
this.autoSelectTimeSlotIfOnlyOneIsAvailable();
|
this.autoSelectTimeSlotIfOnlyOneIsAvailable();
|
||||||
|
|
@ -397,7 +389,7 @@ export default {
|
||||||
this.answersForDropOffQuestion[0].value !== PICK_A_TIME_BUTTON_VALUE
|
this.answersForDropOffQuestion[0].value !== PICK_A_TIME_BUTTON_VALUE
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
displayTimeSlotQuestion() {
|
shouldDisplayTimeSlotQuestion() {
|
||||||
return (
|
return (
|
||||||
this.selectedAnswerForDropOffOrInshop == PICK_A_TIME_BUTTON_VALUE ||
|
this.selectedAnswerForDropOffOrInshop == PICK_A_TIME_BUTTON_VALUE ||
|
||||||
!this.isDropOffAppointmentAvailable
|
!this.isDropOffAppointmentAvailable
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue