CASH-2397: bug fix if mobile api returns 200 but empty
This commit is contained in:
parent
cbdbc241b6
commit
f6f350afb1
1 changed files with 6 additions and 6 deletions
|
|
@ -28,7 +28,6 @@
|
||||||
cmsWidgetName="ScheduleYourServiceWidget"
|
cmsWidgetName="ScheduleYourServiceWidget"
|
||||||
id="schedule-your-service" />
|
id="schedule-your-service" />
|
||||||
<appointmentTypeQuestion
|
<appointmentTypeQuestion
|
||||||
v-if="hasSelectableDatesLoaded"
|
|
||||||
v-model="appointmentTypeFromAppointmentTypeQuestion"
|
v-model="appointmentTypeFromAppointmentTypeQuestion"
|
||||||
v-show="isAppointmentTypeDisplayed"
|
v-show="isAppointmentTypeDisplayed"
|
||||||
:isServiceableMobile="isServiceableMobile"
|
:isServiceableMobile="isServiceableMobile"
|
||||||
|
|
@ -36,7 +35,6 @@
|
||||||
:isDisplayed="isAppointmentTypeDisplayed"
|
:isDisplayed="isAppointmentTypeDisplayed"
|
||||||
:mobileFeeApplies="mobileFeeApplies"
|
:mobileFeeApplies="mobileFeeApplies"
|
||||||
:zipCode="zipCode"
|
:zipCode="zipCode"
|
||||||
ref="appointmentTypeQuestion"
|
|
||||||
groupName="appointmentTypeQuestion"
|
groupName="appointmentTypeQuestion"
|
||||||
cmsWidgetName="AppointmentTypeQuestionWidget"
|
cmsWidgetName="AppointmentTypeQuestionWidget"
|
||||||
validationRules="option-required"
|
validationRules="option-required"
|
||||||
|
|
@ -950,7 +948,7 @@ export default {
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
hasSelectableDatesLoaded() {
|
hasSelectableDatesLoaded() {
|
||||||
if (this.isMobileSelected) {
|
if (this.isServiceableMobile) {
|
||||||
return this.selectableDatesMobile?.days?.length > 0;
|
return this.selectableDatesMobile?.days?.length > 0;
|
||||||
} else {
|
} else {
|
||||||
return this.selectableDatesInshop?.days?.length > 0;
|
return this.selectableDatesInshop?.days?.length > 0;
|
||||||
|
|
@ -1842,10 +1840,12 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.appointmentType = null;
|
this.appointmentType = null;
|
||||||
}
|
}
|
||||||
this.setSelectedDateToFirstAvailable(); // v-if on appointmentTypeQuestion ensures dates have been loaded by now
|
this.setSelectedDateToFirstAvailable();
|
||||||
},
|
},
|
||||||
setSelectedDateToFirstAvailable() {
|
setSelectedDateToFirstAvailable() {
|
||||||
this.selectedDate = this.getFirstAvailableDate();
|
if (this.hasSelectableDatesLoaded) { // ensure dates have been loaded by now
|
||||||
|
this.selectedDate = this.getFirstAvailableDate();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
showRecalAcknowledgementModal() {
|
showRecalAcknowledgementModal() {
|
||||||
if (this.shouldShowRecalAckModal()) {
|
if (this.shouldShowRecalAckModal()) {
|
||||||
|
|
@ -2069,7 +2069,7 @@ export default {
|
||||||
watch: {
|
watch: {
|
||||||
appointmentTypeFromAppointmentTypeQuestion: {
|
appointmentTypeFromAppointmentTypeQuestion: {
|
||||||
handler(newValue, oldValue) {
|
handler(newValue, oldValue) {
|
||||||
this.handleAppointmentTypeChange(newValue); // v-if on appointmentTypeQuestion ensures dates have been loaded by now
|
this.handleAppointmentTypeChange(newValue);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue