CASH-1790: refactoring and restoring watch on time-slot-question
This commit is contained in:
parent
cc45d3b521
commit
290ea914e2
2 changed files with 7 additions and 11 deletions
|
|
@ -1179,8 +1179,6 @@ export default {
|
||||||
async initializeDatePicker() {
|
async initializeDatePicker() {
|
||||||
this.isShowMobileFirstAppt && this.showLoadingModal();
|
this.isShowMobileFirstAppt && this.showLoadingModal();
|
||||||
|
|
||||||
this.selectedDate = null;
|
|
||||||
|
|
||||||
const includeMobileTimeSlots = this.isServiceableMobile;
|
const includeMobileTimeSlots = this.isServiceableMobile;
|
||||||
const includeInshopTimeSlots = this.isServiceableInshop || this.isServiceableDropoff;
|
const includeInshopTimeSlots = this.isServiceableInshop || this.isServiceableDropoff;
|
||||||
const datePickerInitialData = await this.$refs.datePicker.loadInitialData({
|
const datePickerInitialData = await this.$refs.datePicker.loadInitialData({
|
||||||
|
|
@ -1575,10 +1573,8 @@ export default {
|
||||||
|
|
||||||
// check if date actually changed
|
// check if date actually changed
|
||||||
if (previousDate !== date.dateString) {
|
if (previousDate !== date.dateString) {
|
||||||
this.handleDateChanged({
|
this.selectedTimeSlotInfo = this.getEmptyTimeSlot();
|
||||||
newDate: date.dateString,
|
this.updateFooterButtonText(this.selectedTimeSlotInfo);
|
||||||
oldDate: previousDate,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: REMOVE AS PART OF CASH-1634
|
// TODO: REMOVE AS PART OF CASH-1634
|
||||||
|
|
@ -1589,11 +1585,6 @@ export default {
|
||||||
// this.includePricingByDayUpcharge = false;
|
// this.includePricingByDayUpcharge = false;
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
handleDateChanged(newDate) {
|
|
||||||
// Clear time slot selection when date changes
|
|
||||||
this.selectedTimeSlotInfo = this.getEmptyTimeSlot();
|
|
||||||
this.updateFooterButtonText(this.selectedTimeSlotInfo);
|
|
||||||
},
|
|
||||||
getEmptyTimeSlot() {
|
getEmptyTimeSlot() {
|
||||||
return {
|
return {
|
||||||
timeSlot: {
|
timeSlot: {
|
||||||
|
|
|
||||||
|
|
@ -190,6 +190,11 @@ export default {
|
||||||
selectedRouteCodeData(newValue) {
|
selectedRouteCodeData(newValue) {
|
||||||
this.updateDropoffAndTimeSlotAnswersFromSelectedRouteCodeData(newValue);
|
this.updateDropoffAndTimeSlotAnswersFromSelectedRouteCodeData(newValue);
|
||||||
},
|
},
|
||||||
|
timeSlotsForSelectedDate() {
|
||||||
|
this.selectedAnswerForDropOffOrInshop = null;
|
||||||
|
this.selectedAnswerForTimeSlots = null;
|
||||||
|
this.autoSelectTimeSlotIfOnlyOneIsAvailable();
|
||||||
|
},
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
supplementalInformationBlock() {
|
supplementalInformationBlock() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue