From d41afdcee12578369c8e9aac9af703da6acf3da3 Mon Sep 17 00:00:00 2001 From: Scott Kiener Date: Tue, 15 Jul 2025 15:42:15 -0400 Subject: [PATCH] lastSearchedZip removed --- .../shop-question/shop-question-popup.vue | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/src/layouts/service-location/shop-question/shop-question-popup.vue b/src/layouts/service-location/shop-question/shop-question-popup.vue index d74744a20..d194a19a0 100644 --- a/src/layouts/service-location/shop-question/shop-question-popup.vue +++ b/src/layouts/service-location/shop-question/shop-question-popup.vue @@ -117,7 +117,6 @@ export default { shopIndex: 0, localShopProviderData: this.shopProviderData, // Why does parent manage this sometimes, but not all of the time selectedProviderNumber: null, // Revisit this, maybe not too hard - lastSearchedZip: "", // zip refactor lastSuccessfulZip: "", // zip refactor displayInvalidZipAlert: false, // part of big refactor of asyn calls displayNoShopsAlert: false, // part of big refactor of asyn calls @@ -298,7 +297,6 @@ export default { event.stopPropagation(); } this.resetsOnZipInput(); - this.displayNoShopsAlert = false; const zipCodeData = await this.getZipCodeData( this.newZipCode, "service-location" @@ -323,9 +321,7 @@ export default { } } else { getShopProviderData(this.newZipCode).then(async (result) => { - if (this.displayNoShopsAlert === true) { - this.displayNoShopsAlert = false; - } + this.displayNoShopsAlert = false; this.localShopProviderData = result.data; this.updateShopsForZip(this.newZipCode); this.selectedProvider = new Provider(); @@ -334,7 +330,6 @@ export default { } }, updateShopsForZip(zipCode) { - this.lastSearchedZip = zipCode; if (!zipCode) { this.answers = []; return; @@ -421,14 +416,13 @@ export default { ) { return; } - const zipToEmit = this.lastSearchedZip; const selectedProvider = this.shopProviders.find( (provider) => provider.providerNumber == this.selectedProviderNumber ); this.resetAlerts(); - const zipCodeData = await this.getZipCodeData(zipToEmit, "service-location"); + const zipCodeData = await this.getZipCodeData(this.newZipCode, "service-location"); if (!zipCodeData.isValid) { this.displayInvalidZipAlert = true; @@ -486,7 +480,7 @@ export default { this.$emit("shop-selected", { providerNumber: selectedProvider?.providerNumber, address: selectedProvider?.address, - searchedZip: zipToEmit, + searchedZip: this.newZipCode, searchedState: zipCodeData.state, });