Updates for some transitions between appt types

This commit is contained in:
Bill Richardson 2026-02-06 10:15:21 -05:00
parent 54f66b43cf
commit 421977cbf2
2 changed files with 22 additions and 2 deletions

View file

@ -20,6 +20,7 @@
ref="serviceLocation" ref="serviceLocation"
@appointmentTypeChanged="appointmentTypeChangedFromServiceLocation" @appointmentTypeChanged="appointmentTypeChangedFromServiceLocation"
@cityUpdated="cityUpdatedFromServiceLocation" @cityUpdated="cityUpdatedFromServiceLocation"
@inShopZipUpdated="inShopZipUpdatedFromServiceLocation"
@mobileZipUpdated="mobileZipUpdatedFromServiceLocation" @mobileZipUpdated="mobileZipUpdatedFromServiceLocation"
@providerChanged="providerChangedFromServiceLocation" /> @providerChanged="providerChangedFromServiceLocation" />
</div> </div>
@ -182,7 +183,8 @@ const getAvailableDates = async (
storeAction.payload.endDate, storeAction.payload.endDate,
storeAction.payload.zipCodeOverride storeAction.payload.zipCodeOverride
).catch((error) => { ).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) { handleMqlChange(e) {
this.isMobileView = !e.matches; this.isMobileView = !e.matches;
}, },
inShopZipUpdatedFromServiceLocation(inShopZipServiceLocation) {
if (inShopZipServiceLocation) {
this.mobileProviderNumber = null;
this.selectedMobileZipCode = null;
this.selectedServiceLocation = inShopZipServiceLocation;
}
},
mobileZipUpdatedFromServiceLocation(mobileZipServiceLocation) { mobileZipUpdatedFromServiceLocation(mobileZipServiceLocation) {
if (mobileZipServiceLocation) { if (mobileZipServiceLocation) {
this.mobileProviderNumber = mobileZipServiceLocation.mobileProviderNumber; this.mobileProviderNumber = mobileZipServiceLocation.mobileProviderNumber;

View file

@ -159,7 +159,7 @@ export default {
serviceZipQuestion serviceZipQuestion
}, },
mixins: [baseFormMixin], 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() { setup() {
const mainStore = useMainStore(); const mainStore = useMainStore();
return { mainStore }; return { mainStore };
@ -427,6 +427,17 @@ export default {
if (details) { if (details) {
this.setServiceabilityDetails(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() { refreshAvailabilityRating() {