diff --git a/src/layouts/schedule-page/schedule-page.vue b/src/layouts/schedule-page/schedule-page.vue index 5397397d..0cd0f480 100644 --- a/src/layouts/schedule-page/schedule-page.vue +++ b/src/layouts/schedule-page/schedule-page.vue @@ -20,6 +20,7 @@ ref="serviceLocation" @appointmentTypeChanged="appointmentTypeChangedFromServiceLocation" @cityUpdated="cityUpdatedFromServiceLocation" + @inShopZipUpdated="inShopZipUpdatedFromServiceLocation" @mobileZipUpdated="mobileZipUpdatedFromServiceLocation" @providerChanged="providerChangedFromServiceLocation" /> @@ -182,7 +183,8 @@ const getAvailableDates = async ( storeAction.payload.endDate, storeAction.payload.zipCodeOverride ).catch((error) => { - console.log('Error fetching mobile time slots:', error); + // eslint-disable-next-line no-console + console.warn('Error fetching mobile time slots:', error); }); } @@ -601,6 +603,13 @@ export default { handleMqlChange(e) { this.isMobileView = !e.matches; }, + inShopZipUpdatedFromServiceLocation(inShopZipServiceLocation) { + if (inShopZipServiceLocation) { + this.mobileProviderNumber = null; + this.selectedMobileZipCode = null; + this.selectedServiceLocation = inShopZipServiceLocation; + } + }, mobileZipUpdatedFromServiceLocation(mobileZipServiceLocation) { if (mobileZipServiceLocation) { this.mobileProviderNumber = mobileZipServiceLocation.mobileProviderNumber; diff --git a/src/layouts/schedule-page/service-location/service-location.vue b/src/layouts/schedule-page/service-location/service-location.vue index 73a8ff9f..e48dddcc 100644 --- a/src/layouts/schedule-page/service-location/service-location.vue +++ b/src/layouts/schedule-page/service-location/service-location.vue @@ -159,7 +159,7 @@ export default { serviceZipQuestion }, mixins: [baseFormMixin], - emits: ['appointment-type-changed', 'city-updated', 'mobile-zip-updated', 'provider-changed'], + emits: ['appointment-type-changed', 'city-updated', 'in-shop-zip-updated', 'mobile-zip-updated', 'provider-changed'], setup() { const mainStore = useMainStore(); return { mainStore }; @@ -427,6 +427,17 @@ export default { if (details) { this.setServiceabilityDetails(details); } + + const inShopZipServiceLocationObj = { + appointmentType: AppointmentTypeStrings.IN_SHOP, + mobileProviderNumber: null, + provider: this.selectedProvider, + refreshDatePicker: false, + resetDatePicker: false, + zipCode: newZip, + zipCodeCtu: zipCodeData.zipCodeCtu + }; + this.$emit('in-shop-zip-updated', inShopZipServiceLocationObj); }); }, refreshAvailabilityRating() {