Merge pull request #1612 from Safelite/feature/CSR-1867

CSR-1867
This commit is contained in:
CarlNation 2023-12-05 05:42:21 -05:00 committed by GitHub
commit 7705fe7d0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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