Merge pull request #1785 from Safelite/feature/CSR-1992

CSR-1992
This commit is contained in:
AMSNEHA 2024-03-04 18:40:45 +05:30 committed by GitHub
commit a0b2598ab2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 18 deletions

View file

@ -102,7 +102,6 @@
ref="promoModalQuestion"
class="small mt-4"
v-model="lineItems"
emitToGrandparent="true"
:availableVaps="availableVaps"
modalWidgetName="PromoModalWidget" />
</div>
@ -157,7 +156,6 @@ export default {
style: "currency",
currency: "USD",
}),
lineItems: deepClone(this.modelValue),
};
},
methods: {
@ -235,8 +233,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"]) {
@ -246,6 +242,14 @@ export default {
},
},
computed: {
lineItems: {
get: function () {
return this.modelValue;
},
set: function (newValue) {
this.$emit("update:modelValue", newValue);
},
},
screenReaderTotalAmountDueText() {
return this.getCmsContent("ScreenReaderTotalAmountDueWidget", "Text");
},
@ -838,14 +842,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();