diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index e6cb2138e..bfec46932 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -183,6 +183,7 @@ export default { zipContainsMilitaryBase: false, zipCodeCtu: null, shopProviderData: null, + navigatingForward: false, }; }, async beforeRouteEnter(to, from, next) { @@ -477,6 +478,8 @@ export default { } }, async forwardButtonAction() { + this.navigatingForward = true; + // clear items not needed for appointmentType if (this.selectedAppointmentType == AppointmentTypeStrings.IN_SHOP) { // if we have a provider.zipCodeCtu that's different than the servicelocation.zipCodeCtu then they @@ -537,16 +540,18 @@ export default { watch: { zipCode: { handler(newValue) { - getShopProviderData(this.zipCode).then(async (result) => { - this.shopProviderData = result.data; - if (this.selectedAppointmentType === "Mobile") { - this.selectedProvider = new Provider( - this.shopProviderData.mobileProviderNumber - ); - } else { - this.selectedProvider = new Provider(); - } - }); + if (!this.navigatingForward) { + getShopProviderData(this.zipCode).then(async (result) => { + this.shopProviderData = result.data; + if (this.selectedAppointmentType === "Mobile") { + this.selectedProvider = new Provider( + this.shopProviderData.mobileProviderNumber + ); + } else { + this.selectedProvider = new Provider(); + } + }); + } }, }, selectedAppointmentType: {