CASH-1790: refactor to remove another watch on time-slot-question
This commit is contained in:
parent
88682fe1b3
commit
17bcaac1b6
2 changed files with 6 additions and 15 deletions
|
|
@ -636,12 +636,12 @@ export default {
|
||||||
showTimeSlotQuestion() {
|
showTimeSlotQuestion() {
|
||||||
if (
|
if (
|
||||||
this.selectedDate &&
|
this.selectedDate &&
|
||||||
this.selectedDate.includes("mobile") &&
|
this.appointmentTypeFromAppointmentTypeQuestion &&
|
||||||
!this.isMobileSelected
|
this.timeSlotsForSelectedDate
|
||||||
) {
|
) {
|
||||||
this.setSelectedDateToFirstAvailable();
|
return true;
|
||||||
}
|
}
|
||||||
return this.selectedDate && this.appointmentTypeFromAppointmentTypeQuestion;
|
return false;
|
||||||
},
|
},
|
||||||
isMobileStaticRecalibrationApplicable() {
|
isMobileStaticRecalibrationApplicable() {
|
||||||
return (
|
return (
|
||||||
|
|
@ -1577,7 +1577,7 @@ export default {
|
||||||
if (previousDate !== date.dateString) {
|
if (previousDate !== date.dateString) {
|
||||||
this.handleDateChanged({
|
this.handleDateChanged({
|
||||||
newDate: date.dateString,
|
newDate: date.dateString,
|
||||||
oldDate: previousDate
|
oldDate: previousDate,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1877,7 +1877,6 @@ export default {
|
||||||
textBlock,
|
textBlock,
|
||||||
timeSlotQuestion,
|
timeSlotQuestion,
|
||||||
mobileFirstModal,
|
mobileFirstModal,
|
||||||
|
|
||||||
alert,
|
alert,
|
||||||
serviceZipModalQuestion,
|
serviceZipModalQuestion,
|
||||||
appointmentTypeQuestion,
|
appointmentTypeQuestion,
|
||||||
|
|
|
||||||
|
|
@ -190,14 +190,6 @@ export default {
|
||||||
selectedRouteCodeData(newValue) {
|
selectedRouteCodeData(newValue) {
|
||||||
this.updateDropoffAndTimeSlotAnswersFromSelectedRouteCodeData(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: {
|
computed: {
|
||||||
supplementalInformationBlock() {
|
supplementalInformationBlock() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue