CSR-1391 get lineitem names from cart
This commit is contained in:
parent
e167bfd05e
commit
d869962652
1 changed files with 14 additions and 6 deletions
|
|
@ -25,6 +25,7 @@
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
<cart
|
<cart
|
||||||
|
ref="cart"
|
||||||
:damage="damageInfo"
|
:damage="damageInfo"
|
||||||
:availableVaps="availableVaps"
|
:availableVaps="availableVaps"
|
||||||
:allowItemRemoval="false"
|
:allowItemRemoval="false"
|
||||||
|
|
@ -227,7 +228,7 @@ export default {
|
||||||
invoiceNumber: this.getInvoiceNumber(),
|
invoiceNumber: this.getInvoiceNumber(),
|
||||||
totalAmount: this.getAmountDue(),
|
totalAmount: this.getAmountDue(),
|
||||||
displayAmount: this.getDisplayAmountDue(),
|
displayAmount: this.getDisplayAmountDue(),
|
||||||
piaLineItems: this.getPiaLineItems(),
|
piaLineItems: "",
|
||||||
paypalPayment: this.isPaypal(),
|
paypalPayment: this.isPaypal(),
|
||||||
lineItems: [],
|
lineItems: [],
|
||||||
availableVaps: [],
|
availableVaps: [],
|
||||||
|
|
@ -357,11 +358,18 @@ export default {
|
||||||
// Call the "next" function to complete the transition to this page.
|
// Call the "next" function to complete the transition to this page.
|
||||||
next(async (vm) => {
|
next(async (vm) => {
|
||||||
vm.setCmsContent(resultMap.cmsContent);
|
vm.setCmsContent(resultMap.cmsContent);
|
||||||
vm.fetchSignatureInfo(resultMap.signature);
|
|
||||||
vm.setIFrameListener();
|
|
||||||
|
|
||||||
vm.availableVaps = taxedVaps;
|
vm.availableVaps = taxedVaps;
|
||||||
vm.lineItems = lineItems;
|
vm.lineItems = lineItems;
|
||||||
|
|
||||||
|
vm.$nextTick(() => {
|
||||||
|
if (vm.$refs.cart) {
|
||||||
|
const cartItems = vm.$refs.cart.cartItems;
|
||||||
|
vm.getPiaLineItems(cartItems);
|
||||||
|
}
|
||||||
|
|
||||||
|
vm.fetchSignatureInfo(resultMap.signature);
|
||||||
|
vm.setIFrameListener();
|
||||||
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
@ -506,7 +514,7 @@ export default {
|
||||||
return store.getters.payment.piaType;
|
return store.getters.payment.piaType;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getPiaLineItems() {
|
getPiaLineItems(cartItems) {
|
||||||
const itemMap = new Map();
|
const itemMap = new Map();
|
||||||
const glassParts = store.getters.order.lineItems.glassParts;
|
const glassParts = store.getters.order.lineItems.glassParts;
|
||||||
const supportingItems = store.getters.order.lineItems.supportingItems;
|
const supportingItems = store.getters.order.lineItems.supportingItems;
|
||||||
|
|
@ -524,7 +532,7 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return Array.from(itemMap.values())
|
this.piaLineItems = Array.from(itemMap.values())
|
||||||
.map((item) => `${item.partType}|${item.amount}|${item.quantity}`)
|
.map((item) => `${item.partType}|${item.amount}|${item.quantity}`)
|
||||||
.join("||");
|
.join("||");
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue