CASH-1790: refactor to remove another watch on time-slot-question

This commit is contained in:
Adam Caouette 2025-12-10 17:15:11 -05:00
parent 88682fe1b3
commit 17bcaac1b6
2 changed files with 6 additions and 15 deletions

View file

@ -636,12 +636,12 @@ export default {
showTimeSlotQuestion() {
if (
this.selectedDate &&
this.selectedDate.includes("mobile") &&
!this.isMobileSelected
this.appointmentTypeFromAppointmentTypeQuestion &&
this.timeSlotsForSelectedDate
) {
this.setSelectedDateToFirstAvailable();
return true;
}
return this.selectedDate && this.appointmentTypeFromAppointmentTypeQuestion;
return false;
},
isMobileStaticRecalibrationApplicable() {
return (
@ -1572,12 +1572,12 @@ export default {
},
handleDateSelected(date) {
const previousDate = this.selectedDate;
// check if date actually changed
if (previousDate !== date.dateString) {
this.handleDateChanged({
newDate: date.dateString,
oldDate: previousDate
oldDate: previousDate,
});
}
@ -1877,7 +1877,6 @@ export default {
textBlock,
timeSlotQuestion,
mobileFirstModal,
alert,
serviceZipModalQuestion,
appointmentTypeQuestion,

View file

@ -190,14 +190,6 @@ export default {
selectedRouteCodeData(newValue) {
this.updateDropoffAndTimeSlotAnswersFromSelectedRouteCodeData(newValue);
},
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.selectedAnswerForTimeSlots = null;
this.autoSelectTimeSlotIfOnlyOneIsAvailable();
},
},
computed: {
supplementalInformationBlock() {