Fix for no supporting items on repair

This commit is contained in:
Bill Richardson 2024-10-15 15:24:52 -04:00
parent dc357dbc36
commit 90c7c459a7
2 changed files with 4 additions and 3 deletions

View file

@ -395,9 +395,10 @@ export default {
showIssLoadingModal(false); showIssLoadingModal(false);
}, },
async getPricedParts() { async getPricedParts() {
const { glassParts } = this.mainStore.order.lineItems; const { glassParts, supportingItems } = this.mainStore.order.lineItems;
const availableLineItems = [ const availableLineItems = [
...(glassParts ?? []) ...(glassParts ?? []),
...(supportingItems ?? [])
]; ];
// We only call the ITAC pricing endpoint if we are not repair or we are NoComp // We only call the ITAC pricing endpoint if we are not repair or we are NoComp

View file

@ -415,7 +415,7 @@ export default {
if (this.isWindshieldRepair) { if (this.isWindshieldRepair) {
const results = await Promise.allSettled([useMainStore().getSupportingItems(), useMainStore().getRecalParts()]); const results = await Promise.allSettled([useMainStore().getSupportingItems(), useMainStore().getRecalParts()]);
const supportingItems = results[0]; const supportingItems = results[0].value;
useMainStore().updateSupportingItems(supportingItems.data); useMainStore().updateSupportingItems(supportingItems.data);
} else { } else {
useMainStore().updateSupportingItems([]); useMainStore().updateSupportingItems([]);