diff --git a/src/layouts/schedule-page/schedule-page.vue b/src/layouts/schedule-page/schedule-page.vue
index 153e97a8..590b319c 100644
--- a/src/layouts/schedule-page/schedule-page.vue
+++ b/src/layouts/schedule-page/schedule-page.vue
@@ -329,6 +329,7 @@ export default {
return {
inShopAvailabilityRating: 'high',
inShopDatesData: [],
+ isDatePickerRefreshing: false,
isMobileView: false,
mobileDatesData: [],
mobileFeePart: null,
@@ -352,14 +353,18 @@ export default {
return false;
}
+ const validMobileAppointmentType = ((this.selectedAppointmentType === AppointmentTypeStrings.MOBILE
+ || this.selectedAppointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP)
+ && serviceLocationToUse.mobileProviderNumber);
+ const validInShopAppointmentType = ((this.selectedAppointmentType === AppointmentTypeStrings.IN_SHOP
+ || this.selectedAppointmentType === AppointmentTypeStrings.DROP_OFF)
+ && (this.selectedProvider?.providerNumber || serviceLocationToUse.provider?.providerNumber));
+
const serviceLocationPreReqs = serviceLocationToUse.zipCode !== null
&& serviceLocationToUse.zipCodeCtu !== null
&& serviceLocationToUse.appointmentType !== null
- && (((this.selectedAppointmentType === AppointmentTypeStrings.MOBILE
- || this.selectedAppointmentType === AppointmentTypeStrings.MOBILE_NOT_ITAC_AND_NOT_NOCOMP)
- && serviceLocationToUse.mobileProviderNumber)
- || ((this.selectedAppointmentType === AppointmentTypeStrings.IN_SHOP || this.selectedAppointmentType === AppointmentTypeStrings.DROP_OFF)
- && (this.selectedProvider?.providerNumber || serviceLocationToUse.provider?.providerNumber)));
+ && (validMobileAppointmentType || validInShopAppointmentType)
+ && !this.isDatePickerRefreshing;
const damageInfo = useMainStore().order.damage.isRepair
|| (useMainStore().order.lineItems?.glassParts != null && useMainStore().order.lineItems.glassParts.length > 0);
@@ -685,11 +690,12 @@ export default {
}
},
async refreshDatePicker() {
- console.log('refresh date picker...');
this.resetLocalFlags();
+ this.isDatePickerRefreshing = true;
await this.getDatePickerInitialData().then((data) => {
this.selectableDatesData = data.initialShopTimeSlotsResponse;
this.$refs.datePicker.initializeComponent(data);
+ this.isDatePickerRefreshing = false;
showIssLoadingModal(false);
});
},
diff --git a/src/layouts/schedule-page/service-location/service-location.spec.js b/src/layouts/schedule-page/service-location/service-location.spec.js
index 7b1b4294..6a50fe05 100644
--- a/src/layouts/schedule-page/service-location/service-location.spec.js
+++ b/src/layouts/schedule-page/service-location/service-location.spec.js
@@ -203,7 +203,7 @@ describe('service-location.vue', () => {
const newMobileServiceZipCode = '45433';
// Act
- mobileServiceZipCodeQuestion.vm.$emit('update:modelValue', newMobileServiceZipCode);
+ mobileServiceZipCodeQuestion.vm.$emit('service-zip-code-updated', newMobileServiceZipCode);
await wrapper.vm.$nextTick();
// Assert
diff --git a/src/layouts/schedule-page/service-location/service-location.vue b/src/layouts/schedule-page/service-location/service-location.vue
index eb121d40..d5559a95 100644
--- a/src/layouts/schedule-page/service-location/service-location.vue
+++ b/src/layouts/schedule-page/service-location/service-location.vue
@@ -96,13 +96,14 @@