move method call to beforeRouteEnter
This commit is contained in:
parent
87bd8e7259
commit
790db50814
1 changed files with 5 additions and 6 deletions
|
|
@ -147,6 +147,7 @@ export default {
|
||||||
// Call APIs
|
// Call APIs
|
||||||
const cmsContentPromise = fetchCmsContentForPage(to?.query?.issPage);
|
const cmsContentPromise = fetchCmsContentForPage(to?.query?.issPage);
|
||||||
const supportingItemsPromise = await useMainStore().getSupportingItems();
|
const supportingItemsPromise = await useMainStore().getSupportingItems();
|
||||||
|
const finalDeductiblePromise = await useMainStore().getFinalDeductible();
|
||||||
|
|
||||||
// Settle promises and get results
|
// Settle promises and get results
|
||||||
const promiseResultMap = [
|
const promiseResultMap = [
|
||||||
|
|
@ -157,6 +158,10 @@ export default {
|
||||||
{
|
{
|
||||||
resultKey: 'supportingItems',
|
resultKey: 'supportingItems',
|
||||||
promise: supportingItemsPromise
|
promise: supportingItemsPromise
|
||||||
|
},
|
||||||
|
{
|
||||||
|
resultKey: 'finalDeductible',
|
||||||
|
promise: finalDeductiblePromise
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
@ -328,9 +333,6 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
beforeMount() {
|
|
||||||
this.getVehicleDeductible();
|
|
||||||
},
|
|
||||||
mounted() {
|
mounted() {
|
||||||
setupModalLinks(this);
|
setupModalLinks(this);
|
||||||
},
|
},
|
||||||
|
|
@ -453,9 +455,6 @@ export default {
|
||||||
},
|
},
|
||||||
setSupportingItems(newSupportingItems) {
|
setSupportingItems(newSupportingItems) {
|
||||||
this.supportingItems = newSupportingItems;
|
this.supportingItems = newSupportingItems;
|
||||||
},
|
|
||||||
async getVehicleDeductible() {
|
|
||||||
await useMainStore().getFinalDeductible();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue