lastSearchedZip removed
This commit is contained in:
parent
12c3cabb25
commit
d41afdcee1
1 changed files with 3 additions and 9 deletions
|
|
@ -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,
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue