do not call pricing or deductible methods if unverified

This commit is contained in:
Katie Kroell 2023-11-16 16:55:44 -05:00
parent ddd27d35f5
commit e1a99064c3

View file

@ -147,7 +147,6 @@ 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 = [
@ -158,10 +157,6 @@ export default {
{ {
resultKey: 'supportingItems', resultKey: 'supportingItems',
promise: supportingItemsPromise promise: supportingItemsPromise
},
{
resultKey: 'finalDeductible',
promise: finalDeductiblePromise
} }
]; ];
@ -174,7 +169,11 @@ export default {
...(clonedGlassParts ?? []) ...(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. // Call the "next" function to complete the transition to this page.
next((vm) => { next((vm) => {