Merge pull request #1434 from Safelite/feature/CSR-1384-modals-for-add-vaps

CSR-1384: fixes to keep dev working
This commit is contained in:
AdamCaouetteSafelite 2023-10-19 16:49:02 -04:00 committed by GitHub
commit decfc9d949
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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;