This commit is contained in:
Sneha 2024-03-04 17:11:59 +05:30
parent b0c931d6fc
commit 23b902b500
2 changed files with 8 additions and 18 deletions

View file

@ -103,7 +103,6 @@
ref="promoModalQuestion"
class="small mt-4"
v-model="lineItems"
emitToGrandparent="true"
:availableVaps="availableVaps"
modalWidgetName="PromoModalWidget" />
</div>
@ -158,7 +157,6 @@ export default {
style: "currency",
currency: "USD",
}),
lineItems: deepClone(this.modelValue),
};
},
methods: {
@ -236,8 +234,6 @@ export default {
this.lineItems[category] = this.lineItems[category].filter(
(lineItemsToKeep) => lineItemsToKeep.cartItemType != cartItemType
);
this.$emit("update:modelValue", this.lineItems);
},
getPromoCodeList() {
if (this.$refs["promoModalQuestion"]) {
@ -247,6 +243,14 @@ export default {
},
},
computed: {
lineItems: {
get: function () {
return this.modelValue;
},
set: function (newValue) {
this.$emit("update:modelValue", newValue);
},
},
screenReaderTotalAmountDueText() {
return this.getCmsContent("ScreenReaderTotalAmountDueWidget", "Text");
},
@ -839,14 +843,6 @@ export default {
return this.subTotal + this.salesTax;
},
},
watch: {
modelValue: {
handler(newValue) {
this.lineItems = deepClone(newValue);
},
deep: true,
},
},
components: {
textBlock,
textLink,

View file

@ -106,11 +106,6 @@ export default {
required: false,
default: true,
},
emitToGrandparent: {
type: Boolean,
required: false,
default: false,
},
},
computed: {
promoLinkText() {
@ -180,7 +175,6 @@ export default {
},
onModalClosed() {
this.resetAlerts();
if (this.emitToGrandparent) this.$parent.$emit("update:modelValue", this.lineItems);
this.$emit("update:modelValue", this.lineItems);
this.promoCode = "";
this.modal.resetForm();