diff --git a/src/layouts/schedule-page/schedule-page.vue b/src/layouts/schedule-page/schedule-page.vue index 215654b0..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, @@ -362,7 +363,8 @@ export default { const serviceLocationPreReqs = serviceLocationToUse.zipCode !== null && serviceLocationToUse.zipCodeCtu !== null && serviceLocationToUse.appointmentType !== null - && (validMobileAppointmentType || validInShopAppointmentType); + && (validMobileAppointmentType || validInShopAppointmentType) + && !this.isDatePickerRefreshing; const damageInfo = useMainStore().order.damage.isRepair || (useMainStore().order.lineItems?.glassParts != null && useMainStore().order.lineItems.glassParts.length > 0); @@ -688,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.vue b/src/layouts/schedule-page/service-location/service-location.vue index 1aef10b7..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 @@ + cmsWidgetName="MobileZipWidget" + @serviceZipCodeUpdated="handleServiceZipCodeChanged" />
@@ -32,7 +32,7 @@ export default { }, // TODO: Correct prop def. props: { - modelValue: String, + parentZipCode: String, cmsWidgetName: String, serviceZipFormatErrorMessage: { type: String, @@ -43,14 +43,14 @@ export default { default: false } }, - emits: ['update:modelValue', 'field-has-error'], + emits: ['service-zip-code-updated', 'field-has-error'], data() { return { - internalZipcode: this.modelValue + internalZipcode: this.parentZipCode }; }, watch: { - modelValue(newValue) { + parentZipCode(newValue) { if (newValue !== this.internalZipcode) { this.internalZipcode = newValue; } @@ -63,8 +63,8 @@ export default { handleFieldError(hasError) { this.$emit('field-has-error', hasError); }, - updateModelValue() { - this.$emit('update:modelValue', this.internalZipcode); + emitZipCodeUpdate() { + this.$emit('service-zip-code-updated', this.internalZipcode); } } }; diff --git a/src/layouts/schedule-page/service-location/shop-address/shop-address.vue b/src/layouts/schedule-page/service-location/shop-address/shop-address.vue index 98563ad1..f2fca788 100644 --- a/src/layouts/schedule-page/service-location/shop-address/shop-address.vue +++ b/src/layouts/schedule-page/service-location/shop-address/shop-address.vue @@ -75,10 +75,11 @@ + @fieldHasError="handleFieldError" + @serviceZipCodeUpdated="handleServiceZipCodeChanged" />
{