CASH-1790: refactoring and restoring watch on time-slot-question

This commit is contained in:
Adam Caouette 2025-12-11 12:38:19 -05:00
parent cc45d3b521
commit 290ea914e2
2 changed files with 7 additions and 11 deletions

View file

@ -1179,8 +1179,6 @@ export default {
async initializeDatePicker() {
this.isShowMobileFirstAppt && this.showLoadingModal();
this.selectedDate = null;
const includeMobileTimeSlots = this.isServiceableMobile;
const includeInshopTimeSlots = this.isServiceableInshop || this.isServiceableDropoff;
const datePickerInitialData = await this.$refs.datePicker.loadInitialData({
@ -1575,10 +1573,8 @@ export default {
// check if date actually changed
if (previousDate !== date.dateString) {
this.handleDateChanged({
newDate: date.dateString,
oldDate: previousDate,
});
this.selectedTimeSlotInfo = this.getEmptyTimeSlot();
this.updateFooterButtonText(this.selectedTimeSlotInfo);
}
// TODO: REMOVE AS PART OF CASH-1634
@ -1589,11 +1585,6 @@ export default {
// this.includePricingByDayUpcharge = false;
// }
},
handleDateChanged(newDate) {
// Clear time slot selection when date changes
this.selectedTimeSlotInfo = this.getEmptyTimeSlot();
this.updateFooterButtonText(this.selectedTimeSlotInfo);
},
getEmptyTimeSlot() {
return {
timeSlot: {

View file

@ -190,6 +190,11 @@ export default {
selectedRouteCodeData(newValue) {
this.updateDropoffAndTimeSlotAnswersFromSelectedRouteCodeData(newValue);
},
timeSlotsForSelectedDate() {
this.selectedAnswerForDropOffOrInshop = null;
this.selectedAnswerForTimeSlots = null;
this.autoSelectTimeSlotIfOnlyOneIsAvailable();
},
},
computed: {
supplementalInformationBlock() {