Removed unused code & keep old provider selected
This commit is contained in:
parent
d3695695e4
commit
5e09e05216
1 changed files with 1 additions and 16 deletions
|
|
@ -236,15 +236,6 @@ export default {
|
||||||
this.answers = [];
|
this.answers = [];
|
||||||
this.updateShopsForZip(this.localZipCode);
|
this.updateShopsForZip(this.localZipCode);
|
||||||
this.localSelectedProviderNumber = this.selectedProviderNumberFromParent;
|
this.localSelectedProviderNumber = this.selectedProviderNumberFromParent;
|
||||||
if (
|
|
||||||
(!this.localSelectedProviderNumber ||
|
|
||||||
!this.shopProviders.some(
|
|
||||||
(p) => p.providerNumber == this.localSelectedProviderNumber
|
|
||||||
)) &&
|
|
||||||
this.shopProviders.length > 0
|
|
||||||
) {
|
|
||||||
this.localSelectedProviderNumber = this.shopProviders[0].providerNumber;
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
closeModal() {
|
closeModal() {
|
||||||
this.modal.closeModal();
|
this.modal.closeModal();
|
||||||
|
|
@ -291,7 +282,7 @@ export default {
|
||||||
this.answers = [];
|
this.answers = [];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!zipCode || !this.shopProviders.length) {
|
if (!this.shopProviders.length) {
|
||||||
this.answers = [];
|
this.answers = [];
|
||||||
this.displayNoShopsAlert = true;
|
this.displayNoShopsAlert = true;
|
||||||
this.displaySeeMoreLocationsLink = false;
|
this.displaySeeMoreLocationsLink = false;
|
||||||
|
|
@ -332,12 +323,6 @@ export default {
|
||||||
});
|
});
|
||||||
this.answers = mappedData;
|
this.answers = mappedData;
|
||||||
// I think we should call our new pushGA Event here with new mapped data
|
// I think we should call our new pushGA Event here with new mapped data
|
||||||
if (
|
|
||||||
this.localSelectedProviderNumber &&
|
|
||||||
!this.answers.some((a) => String(a.value) === String(this.localSelectedProviderNumber))
|
|
||||||
) {
|
|
||||||
this.localSelectedProviderNumber = null;
|
|
||||||
}
|
|
||||||
this.indexOfLastShopToBeDisplayed = mappedData.length;
|
this.indexOfLastShopToBeDisplayed = mappedData.length;
|
||||||
this.displayNoShopsAlert = this.answers.length === 0;
|
this.displayNoShopsAlert = this.answers.length === 0;
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue