CASH-1790: refactor to remove another watch on time-slot-question
(cherry picked from commit 17bcaac1b6)
This commit is contained in:
parent
e1b617774c
commit
0c2db55997
2 changed files with 6 additions and 12 deletions
|
|
@ -634,12 +634,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 (
|
||||||
|
|
@ -1591,12 +1591,12 @@ export default {
|
||||||
},
|
},
|
||||||
handleDateSelected(date) {
|
handleDateSelected(date) {
|
||||||
const previousDate = this.selectedDate;
|
const previousDate = this.selectedDate;
|
||||||
|
|
||||||
// check if date actually changed
|
// check if date actually changed
|
||||||
if (previousDate !== date.dateString) {
|
if (previousDate !== date.dateString) {
|
||||||
this.handleDateChanged({
|
this.handleDateChanged({
|
||||||
newDate: date.dateString,
|
newDate: date.dateString,
|
||||||
oldDate: previousDate
|
oldDate: previousDate,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1896,7 +1896,6 @@ export default {
|
||||||
textBlock,
|
textBlock,
|
||||||
timeSlotQuestion,
|
timeSlotQuestion,
|
||||||
mobileFirstModal,
|
mobileFirstModal,
|
||||||
|
|
||||||
alert,
|
alert,
|
||||||
serviceZipModalQuestion,
|
serviceZipModalQuestion,
|
||||||
appointmentTypeQuestion,
|
appointmentTypeQuestion,
|
||||||
|
|
|
||||||
|
|
@ -185,11 +185,6 @@ 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