From 43fbdb7c2ef50571ab26db8794863a755633f77a Mon Sep 17 00:00:00 2001 From: Sneha Date: Fri, 1 Mar 2024 11:57:31 +0530 Subject: [PATCH] CSR-1992 --- src/fmg-components/cart/cart.vue | 4 ++-- .../promo-modal-question/promo-modal-question.vue | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/fmg-components/cart/cart.vue b/src/fmg-components/cart/cart.vue index 76847f3e9..577ec5516 100644 --- a/src/fmg-components/cart/cart.vue +++ b/src/fmg-components/cart/cart.vue @@ -103,7 +103,7 @@ ref="promoModalQuestion" class="small mt-4" v-model="lineItems" - @addedPromo="handleAddedPromo" + @changePromo="handlePromoChange" :availableVaps="availableVaps" modalWidgetName="PromoModalWidget" /> @@ -245,7 +245,7 @@ export default { } return []; }, - handleAddedPromo(lineItems) { + handlePromoChange(lineItems) { // NOTE: these lineItems are passed from promo-modal-question this.$emit("update:modelValue", lineItems); }, diff --git a/src/fmg-components/promo-modal-question/promo-modal-question.vue b/src/fmg-components/promo-modal-question/promo-modal-question.vue index 59c1523b2..f8c8f5f16 100644 --- a/src/fmg-components/promo-modal-question/promo-modal-question.vue +++ b/src/fmg-components/promo-modal-question/promo-modal-question.vue @@ -213,6 +213,7 @@ export default { (lineItemsToKeep) => getPromoCodeWithoutBundleIdentifier(lineItemsToKeep.promoCode) != promo ); + this.$emit("change-promo", this.lineItems); }, getErrorMessage(error, additionalInfo) { switch (error) { @@ -304,7 +305,7 @@ export default { this.lineItems.vaps?.push(...getVaps); } this.lineItems?.promos.push(...promoCodeData.promoCode); - this.$emit("added-promo", this.lineItems); + this.$emit("change-promo", this.lineItems); this.closeModal(); } else { this.getErrorMessage(promoCodeData.errorCode, promoCodeData.additionalInfo);