provider.providerNumber == providerNumber) ??
- new Provider();
-
- return provider;
- },
async getNextShopsFromList(numberToGet = 3) {
const logFirstShopsDisplayed = this.shopIndex == 0;
@@ -303,35 +279,14 @@ export default {
await nextTick();
- if (this.shopIndex == this.shopProviders.length) {
- this.displaySeeMoreLocationsLink = false;
- } else {
- this.displaySeeMoreLocationsLink = true;
- }
-
- await nextTick();
-
this.scrollToPageBottom();
},
- async handleUpdate(selectedShopIndex = null) {
- this.resetAnswers();
- if (selectedShopIndex >= 3) {
- await this.getNextShopsFromList(selectedShopIndex + 1);
- } else {
- await this.getNextShopsFromList();
- await nextTick();
- }
- },
copyModel(modelToCopy) {
return {
state: modelToCopy.state,
zipCode: modelToCopy.zipCode,
};
},
- resetAnswers() {
- this.answers = [];
- this.shopIndex = 0;
- },
onModalOpened() {
const preSelectedIndex = this.shopProviders.findIndex(
(provider) => provider.providerNumber == this.preSelectedProviderNumber
@@ -419,7 +374,7 @@ export default {
}
}
},
- async updateShopsForZip(zipCode) {
+ updateShopsForZip(zipCode) {
if (!this.appointmentType) {
this.answers = [];
this.isLoadingShops = false;
@@ -492,7 +447,6 @@ export default {
this.selectedProviderNumber = null;
}
this.shopIndex = mappedData.length;
- this.displaySeeMoreLocationsLink = this.shopIndex < this.shopProviders.length;
if (mappedData.length > 0) {
this.lastSuccessfulZip = zipCode;
}
@@ -613,7 +567,6 @@ export default {
immediate: true,
handler(newVal) {
this.localShopProviderData = newVal;
- this.hasLoadedShopData = true;
},
},
},