Revert "Merge pull request #2970 from Safelite/feature/CASH-1790-refactor-1"
This reverts commita9c7ba7c9c, reversing changes made to4523490776.
This commit is contained in:
parent
b6db10df36
commit
7ced4f8d76
1 changed files with 23 additions and 24 deletions
|
|
@ -24,7 +24,6 @@
|
|||
<appointmentTypeQuestion
|
||||
v-model="appointmentTypeFromAppointmentTypeQuestion"
|
||||
v-show="isAppointmentTypeDisplayed"
|
||||
@handle-appointment-type-change="handleAppointmentTypeChange"
|
||||
:isServiceableMobile="isServiceableMobile"
|
||||
:isServiceableInshop="isServiceableInshop"
|
||||
:isDisplayed="isAppointmentTypeDisplayed"
|
||||
|
|
@ -439,8 +438,8 @@ export default {
|
|||
pricingByDayBasePrice: null,
|
||||
pricingByDayUpcharge: null,
|
||||
showPricingByDay: null,
|
||||
selectableDatesInshop: null,
|
||||
selectableDatesMobile: null,
|
||||
selectableDatesInshop: [],
|
||||
selectableDatesMobile: [],
|
||||
preSelectedDate: null,
|
||||
streetAddress: this.getServiceAddressFromStore(),
|
||||
apartmentNumberOrBusinessName: this.getServiceAddress2FromStore(),
|
||||
|
|
@ -603,7 +602,6 @@ export default {
|
|||
);
|
||||
vm.initializeDatePicker().then(() => {
|
||||
vm.showMobileFirstModal();
|
||||
vm.setSelectedDateToFirstAvailable();
|
||||
});
|
||||
});
|
||||
},
|
||||
|
|
@ -829,13 +827,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;
|
||||
|
|
@ -843,11 +841,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
|
||||
);
|
||||
}
|
||||
|
|
@ -865,7 +863,7 @@ export default {
|
|||
);
|
||||
},
|
||||
isMobileFirstModalOpen() {
|
||||
return this.selectableDatesMobile?.days
|
||||
return this.selectableDatesMobile.days
|
||||
? this.$refs.mobileFirstModal?.getIsModalOpen()
|
||||
: false;
|
||||
},
|
||||
|
|
@ -1017,9 +1015,7 @@ export default {
|
|||
return store.getters.order.serviceLocation.isVehicleProtected;
|
||||
},
|
||||
getAppointmentTypeFromStore() {
|
||||
const appointmentTypeFromStore = store.getters.order.serviceLocation.appointmentType;
|
||||
this.handleAppointmentTypeChange(appointmentTypeFromStore);
|
||||
return appointmentTypeFromStore;
|
||||
return store.getters.order.serviceLocation.appointmentType;
|
||||
},
|
||||
getSelectedProviderFromStore() {
|
||||
return store.getters.order.serviceLocation.provider;
|
||||
|
|
@ -1040,7 +1036,6 @@ export default {
|
|||
this.appointmentType = null;
|
||||
this.selectedProvider = null;
|
||||
this.appointmentTypeFromAppointmentTypeQuestion = null;
|
||||
this.handleAppointmentTypeChange();
|
||||
this.preSelectedDate = null;
|
||||
},
|
||||
setServiceabilityDetails(serviceabilityDetails) {
|
||||
|
|
@ -1293,7 +1288,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
|
||||
|
|
@ -1468,12 +1463,9 @@ export default {
|
|||
this.showLoadingModal();
|
||||
},
|
||||
setDisplayWaitList() {
|
||||
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;
|
||||
}
|
||||
const dateString = this.isMobileSelected
|
||||
? this.selectableDatesMobile?.days[0]?.date
|
||||
: this.selectableDatesInshop?.days[0]?.date;
|
||||
if (
|
||||
experimentMixin.methods.hasSettingEqualTo(
|
||||
experimentSettings.DISPLAY_WAITLIST,
|
||||
|
|
@ -1642,9 +1634,9 @@ export default {
|
|||
},
|
||||
getFirstAvailableDate() {
|
||||
let dateToSelect;
|
||||
if (this.isMobileSelected && this.selectableDatesMobile?.days?.length) {
|
||||
if (this.isMobileSelected) {
|
||||
dateToSelect = returnFirstDate(this.selectableDatesMobile);
|
||||
} else if (this.selectableDatesInshop?.days?.length) {
|
||||
} else {
|
||||
dateToSelect = returnFirstDate(this.selectableDatesInshop);
|
||||
}
|
||||
if (!dateToSelect) return null;
|
||||
|
|
@ -1869,6 +1861,13 @@ export default {
|
|||
this.forwardButtonAction();
|
||||
},
|
||||
},
|
||||
watch: {
|
||||
appointmentTypeFromAppointmentTypeQuestion: {
|
||||
handler(newValue, oldValue) {
|
||||
this.handleAppointmentTypeChange(newValue);
|
||||
},
|
||||
},
|
||||
},
|
||||
components: {
|
||||
funnelHeader,
|
||||
navbar,
|
||||
|
|
|
|||
Loading…
Reference in a new issue