CSR-1384: fixes to keep dev working

This commit is contained in:
Adam Caouette 2023-10-19 16:40:48 -04:00
parent f8819c3690
commit 86a8acd194
2 changed files with 7 additions and 6 deletions

View file

@ -44,13 +44,13 @@ export default {
showAddRainDefense() {
// if not found in the cart
return !this.cartItems.some((vap) => {
return vap.partType === "RAIN DEFENSE";
return vap?.partType === "RAIN DEFENSE";
});
},
showAddWipers() {
// if not found in the cart
return !this.cartItems.some((vap) => {
return vap.partType.includes(" WIPER");
return vap?.partType?.includes(" WIPER");
});
},
rainDefensePrice() {

View file

@ -159,7 +159,10 @@ export default {
const lineItems = store.getters.order.lineItems;
const combinedLineItems = [...glassParts, ...lineItems.supportingItems, ...lineItems.vaps];
const combinedLineItems = [];
combinedLineItems.push(lineItems.glassParts ?? []);
combinedLineItems.push(lineItems.supportingItems ?? []);
combinedLineItems.push(lineItems.vaps ?? []);
const taxedLineItems = await baseMixin.methods.dispatchStoreActionWithLogging(
storeActions.TAX_ORDER_ITEMS_AND_SAVE_SERVER_DATA,
@ -175,11 +178,9 @@ export default {
false
);
const cartItems = [...glassParts, ...lineItems.supportingItems, ...lineItems.vaps]; // TOBEREMOVED BY AJC IN CSR-1384
// Call the "next" function to complete the transition to this page.
next((vm) => {
vm.cartItems = cartItems; // TOBEREMOVED BY AJC IN CSR-1384
vm.cartItems = combinedLineItems; // TOBEREMOVED BY AJC IN CSR-1384
vm.setCmsContent(resultMap.cmsContent);
vm.availableLineItems = pricedAvailableLineItems;