From 5e09c22e3388c86d2ee80473de0f875bae4b7749 Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Wed, 7 Feb 2024 18:24:35 -0500 Subject: [PATCH 1/3] CSR-1952: include promo cart items into selected package cart items --- src/fmg-components/cart/cart.vue | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/fmg-components/cart/cart.vue b/src/fmg-components/cart/cart.vue index 2d268e81a..65701db71 100644 --- a/src/fmg-components/cart/cart.vue +++ b/src/fmg-components/cart/cart.vue @@ -167,6 +167,12 @@ export default { }); }); + if (this.promoCartItems) { + this.promoCartItems.forEach((promoCartItem) => { + vapsCartItemsForSelectedPackage.push(promoCartItem); + }); + } + return vapsCartItemsForSelectedPackage; }, getCmsContentForVapsType(vapsType) { From 9f527ce18d211bb3348eda88b615a353d00d8ee3 Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Fri, 9 Feb 2024 12:00:00 -0500 Subject: [PATCH 2/3] CSR-1952: rearrange promo link and promos applied into cart --- src/fmg-components/cart/cart.vue | 182 +++++++++++------- src/layouts/payment-method/payment-method.vue | 10 +- 2 files changed, 113 insertions(+), 79 deletions(-) diff --git a/src/fmg-components/cart/cart.vue b/src/fmg-components/cart/cart.vue index 65701db71..59a5c8646 100644 --- a/src/fmg-components/cart/cart.vue +++ b/src/fmg-components/cart/cart.vue @@ -13,78 +13,94 @@ {{ getFormattedAmount("", amountDue) }} -
-
- - - {{ getFormattedAmount("", packagePrice) }} - -
+
+
+
+ + + {{ getFormattedAmount("", packagePrice) }} + +
- -
- {{ cartItem.name }} - - - -
+ +
+ <{{ cartItem.name }}> + + + +
- -
- {{ cartItem.name }} - - - - {{ recycleFeeCartItem.name }} - - {{ getFormattedAmount(cartItem.category, cartItem.subTotal) }} -
+ +
+ {{ cartItem.name }} + + + + {{ recycleFeeCartItem.name }} + + {{ getFormattedAmount(cartItem.category, cartItem.subTotal) }} +
- -
- {{ subtotalText }}{{ getFormattedAmount("", subTotal) }} -
-
- {{ salesTaxText }}{{ getFormattedAmount("", salesTax) }} -
-
- {{ amountPaidText }}{{ getFormattedAmount("", amountPaid) }} -
-
- {{ amountDueText }}{{ getFormattedAmount("", amountDue) }} + +
+ {{ subtotalText }}{{ getFormattedAmount("", subTotal) }} +
+
+ {{ salesTaxText }}{{ getFormattedAmount("", salesTax) }} +
+
+ {{ amountPaidText }}{{ getFormattedAmount("", amountPaid) }} +
+
+ {{ amountDueText }}{{ getFormattedAmount("", amountDue) }} +
+
+
+ Promo code <{{ promoCode }}> applied +
@@ -96,6 +112,7 @@ import textLink from "@/ux-components/text-link/text-link"; import textBlock from "@/digital-components/text-block/text-block"; import contentGroupModal from "@/fmg-components/content-group-modal/content-group-modal"; +import promoModalQuestion from "@/layouts/payment-method/promo-modal-question/promo-modal-question"; // Mixins import baseMixin from "@/mixins/base-mixin.js"; @@ -198,6 +215,12 @@ export default { this.$emit("update:modelValue", this.lineItems); }, + getPromoCodeList() { + if (this.$refs["promoModalQuestion"]) { + return this.$refs["promoModalQuestion"].getPromoCodeList(); + } + return []; + }, }, computed: { screenReaderTotalAmountDueText() { @@ -796,16 +819,23 @@ export default { }, deep: true, }, + lineItems: { + handler(newValue) { + this.$emit("update:modelValue", this.lineItems); + }, + deep: true, + }, }, components: { textBlock, textLink, contentGroupModal, + promoModalQuestion, }, }; -