WIP again
This commit is contained in:
parent
4bfeebcec3
commit
c94e3e3740
2 changed files with 18 additions and 16 deletions
|
|
@ -97,7 +97,6 @@ export default {
|
|||
style: "currency",
|
||||
currency: "USD",
|
||||
}),
|
||||
lineItems: deepClone(this.modelValue),
|
||||
lineItemUtilities: new LineItemUtilities(),
|
||||
};
|
||||
},
|
||||
|
|
@ -159,6 +158,9 @@ export default {
|
|||
},
|
||||
},
|
||||
computed: {
|
||||
lineItems() {
|
||||
return this.modelValue;
|
||||
},
|
||||
cartItems: {
|
||||
get: function () {
|
||||
let cartItems = [];
|
||||
|
|
@ -307,11 +309,11 @@ export default {
|
|||
cartItemType: "REAR WIPER",
|
||||
subTotal: 0,
|
||||
salesTax: 0,
|
||||
lineItems: [],
|
||||
lineItemIds: [],
|
||||
};
|
||||
|
||||
rearWiperLineItems.forEach((lineItem) => {
|
||||
cartItem.lineItems.push(lineItem);
|
||||
cartItem.lineItemIds.push(lineItem.id);
|
||||
|
||||
cartItem.subTotal +=
|
||||
(lineItem.kitPrice ?? 0) +
|
||||
|
|
@ -338,10 +340,10 @@ export default {
|
|||
cartItemType: "RAIN DEFENSE",
|
||||
subTotal: 0,
|
||||
salesTax: 0,
|
||||
lineItems: [],
|
||||
lineItemIds: [],
|
||||
};
|
||||
|
||||
cartItem.lineItems.push(rainDefenseLineItem);
|
||||
cartItem.lineItemIds.push(rainDefenseLineItem.id);
|
||||
|
||||
cartItem.subTotal +=
|
||||
(rainDefenseLineItem.kitPrice ?? 0) +
|
||||
|
|
@ -368,11 +370,11 @@ export default {
|
|||
cartItemType: "GLASS PARTS",
|
||||
subTotal: 0,
|
||||
salesTax: 0,
|
||||
lineItems: [],
|
||||
lineItemIds: [],
|
||||
};
|
||||
|
||||
flattenedGlassPartsLineItems.forEach((lineItem) => {
|
||||
cartItem.lineItems.push(lineItem);
|
||||
cartItem.lineItemIds.push(lineItem.id);
|
||||
|
||||
cartItem.subTotal +=
|
||||
(lineItem.kitPrice ?? 0) +
|
||||
|
|
@ -395,11 +397,11 @@ export default {
|
|||
cartItemType: "SUPPORTING ITEMS",
|
||||
subTotal: 0,
|
||||
salesTax: 0,
|
||||
lineItems: [],
|
||||
lineItemIds: [],
|
||||
};
|
||||
|
||||
this.supportingItems.forEach((lineItem) => {
|
||||
cartItem.lineItems.push(lineItem);
|
||||
cartItem.lineItemIds.push(lineItem.id);
|
||||
|
||||
cartItem.subTotal +=
|
||||
(lineItem.kitPrice ?? 0) +
|
||||
|
|
@ -426,10 +428,10 @@ export default {
|
|||
cartItemType: "SUPPORTING ITEMS",
|
||||
subTotal: 0,
|
||||
salesTax: 0,
|
||||
lineItems: [],
|
||||
lineItemIds: [],
|
||||
};
|
||||
|
||||
cartItem.lineItems.push(recycleFeeLineItem);
|
||||
cartItem.lineItemIds.push(recycleFeeLineItem.id);
|
||||
|
||||
cartItem.subTotal +=
|
||||
(recycleFeeLineItem.kitPrice ?? 0) +
|
||||
|
|
@ -455,10 +457,10 @@ export default {
|
|||
cartItemType: "SUPPORTING ITEMS",
|
||||
subTotal: 0,
|
||||
salesTax: 0,
|
||||
lineItems: [],
|
||||
lineItemIds: [],
|
||||
};
|
||||
|
||||
cartItem.lineItems.push(mobileFeeLineItem);
|
||||
cartItem.lineItemIds.push(mobileFeeLineItem.id);
|
||||
|
||||
cartItem.subTotal +=
|
||||
(mobileFeeLineItem.kitPrice ?? 0) +
|
||||
|
|
|
|||
|
|
@ -159,9 +159,9 @@ export default {
|
|||
watch: {
|
||||
modelValue: {
|
||||
handler(newValue) {
|
||||
console.log(newValue)
|
||||
}
|
||||
}
|
||||
console.log(newValue);
|
||||
},
|
||||
},
|
||||
},
|
||||
components: {
|
||||
buttonQuestion,
|
||||
|
|
|
|||
Loading…
Reference in a new issue