Fix for no supporting items on repair
This commit is contained in:
parent
dc357dbc36
commit
90c7c459a7
2 changed files with 4 additions and 3 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
|
|
@ -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([]);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue