Moved resetting of # of shops to be displayed
This commit is contained in:
parent
c0a93abfbf
commit
59cf55a7fd
1 changed files with 2 additions and 9 deletions
|
|
@ -181,6 +181,7 @@ export default {
|
|||
|
||||
this.updateShopsForZip(this.localZipCode);
|
||||
this.$refs.shopQuestionModal.openModal();
|
||||
|
||||
},
|
||||
updateShopListWithNextShops(numberToGet = 3) {
|
||||
//gaAction = this.GaActions.SHOPS_FIRST_DISPLAYED; --This needs to actually fire on initial display, can never happen here
|
||||
|
|
@ -272,6 +273,7 @@ export default {
|
|||
getShopProviderData(this.localZipCode).then(async (result) => {
|
||||
this.displayNoShopsAlert = false;
|
||||
this.localShopProviderData = result.data;
|
||||
this.indexOfLastShopToBeDisplayed = 3;
|
||||
this.updateShopsForZip(this.localZipCode);
|
||||
});
|
||||
}
|
||||
|
|
@ -289,15 +291,6 @@ export default {
|
|||
return;
|
||||
}
|
||||
|
||||
const selectedIndex = this.shopProviders.findIndex(
|
||||
(provider) => provider.providerNumber == this.localSelectedProviderNumber
|
||||
);
|
||||
|
||||
// If not found, only show the first 3 shops
|
||||
if (selectedIndex === -1) {
|
||||
this.indexOfLastShopToBeDisplayed = 3;
|
||||
}
|
||||
|
||||
const sortedShops = this.getShopsByZip(zipCode, this.shopProviders, this.indexOfLastShopToBeDisplayed);
|
||||
|
||||
const toTitleCase = (str) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue