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
|
||||
const cmsContentPromise = fetchCmsContentForPage(to?.query?.issPage);
|
||||
const supportingItemsPromise = await useMainStore().getSupportingItems();
|
||||
const finalDeductiblePromise = await useMainStore().getFinalDeductible();
|
||||
|
||||
// Settle promises and get results
|
||||
const promiseResultMap = [
|
||||
|
|
@ -157,6 +158,10 @@ export default {
|
|||
{
|
||||
resultKey: 'supportingItems',
|
||||
promise: supportingItemsPromise
|
||||
},
|
||||
{
|
||||
resultKey: 'finalDeductible',
|
||||
promise: finalDeductiblePromise
|
||||
}
|
||||
];
|
||||
|
||||
|
|
@ -328,9 +333,6 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
beforeMount() {
|
||||
this.getVehicleDeductible();
|
||||
},
|
||||
mounted() {
|
||||
setupModalLinks(this);
|
||||
},
|
||||
|
|
@ -453,9 +455,6 @@ export default {
|
|||
},
|
||||
setSupportingItems(newSupportingItems) {
|
||||
this.supportingItems = newSupportingItems;
|
||||
},
|
||||
async getVehicleDeductible() {
|
||||
await useMainStore().getFinalDeductible();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue