Merge pull request #1145 from Safelite/feature/skiener/INSR-8913

INSR-8913 | Ensure all items are priced before being taxed
This commit is contained in:
scottkiener-at-safelite 2026-03-20 10:00:22 -04:00 committed by GitHub
commit de9a856f9b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -142,6 +142,10 @@ export default {
availableLineItems.push(...feeItems);
}
if (resultMap?.supportingItems?.length > 0) {
availableLineItems.push(...resultMap.supportingItems);
}
let hasBailedOut = false;
const pricedItems = await store.getCombinedQuote(availableLineItems)
.catch((err) => {
@ -153,11 +157,13 @@ export default {
next(`/?issPage=${issPageValues.BAILOUT_PAGE}`);
});
const pricedVaps = pricedItems.filter((item) => !resultMap.supportingItems.some((si) => si.partNumber === item.partNumber));
// Call the "next" function to complete the transition to this page.
if (!hasBailedOut) {
next((vm) => {
vm.setCmsContent(resultMap.cmsContent);
vm.setData(pricedItems);
vm.setData(pricedVaps);
});
}
},