do not call pricing or deductible methods if unverified
This commit is contained in:
parent
ddd27d35f5
commit
e1a99064c3
1 changed files with 5 additions and 6 deletions
|
|
@ -147,7 +147,6 @@ 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 = [
|
||||
|
|
@ -158,10 +157,6 @@ export default {
|
|||
{
|
||||
resultKey: 'supportingItems',
|
||||
promise: supportingItemsPromise
|
||||
},
|
||||
{
|
||||
resultKey: 'finalDeductible',
|
||||
promise: finalDeductiblePromise
|
||||
}
|
||||
];
|
||||
|
||||
|
|
@ -174,7 +169,11 @@ export default {
|
|||
...(clonedGlassParts ?? [])
|
||||
];
|
||||
|
||||
const pricingResults = await useMainStore().getPriceOrderItems(availableLineItems);
|
||||
let pricingResults = [];
|
||||
if (useMainStore().order.policy.policyLookupSuccessful) {
|
||||
pricingResults = await useMainStore().getPriceOrderItems(availableLineItems);
|
||||
await useMainStore().getFinalDeductible();
|
||||
}
|
||||
|
||||
// Call the "next" function to complete the transition to this page.
|
||||
next((vm) => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue