CSR-1992
This commit is contained in:
parent
95f051c4c5
commit
43fbdb7c2e
2 changed files with 4 additions and 3 deletions
|
|
@ -103,7 +103,7 @@
|
||||||
ref="promoModalQuestion"
|
ref="promoModalQuestion"
|
||||||
class="small mt-4"
|
class="small mt-4"
|
||||||
v-model="lineItems"
|
v-model="lineItems"
|
||||||
@addedPromo="handleAddedPromo"
|
@changePromo="handlePromoChange"
|
||||||
:availableVaps="availableVaps"
|
:availableVaps="availableVaps"
|
||||||
modalWidgetName="PromoModalWidget" />
|
modalWidgetName="PromoModalWidget" />
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -245,7 +245,7 @@ export default {
|
||||||
}
|
}
|
||||||
return [];
|
return [];
|
||||||
},
|
},
|
||||||
handleAddedPromo(lineItems) {
|
handlePromoChange(lineItems) {
|
||||||
// NOTE: these lineItems are passed from promo-modal-question
|
// NOTE: these lineItems are passed from promo-modal-question
|
||||||
this.$emit("update:modelValue", lineItems);
|
this.$emit("update:modelValue", lineItems);
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -213,6 +213,7 @@ export default {
|
||||||
(lineItemsToKeep) =>
|
(lineItemsToKeep) =>
|
||||||
getPromoCodeWithoutBundleIdentifier(lineItemsToKeep.promoCode) != promo
|
getPromoCodeWithoutBundleIdentifier(lineItemsToKeep.promoCode) != promo
|
||||||
);
|
);
|
||||||
|
this.$emit("change-promo", this.lineItems);
|
||||||
},
|
},
|
||||||
getErrorMessage(error, additionalInfo) {
|
getErrorMessage(error, additionalInfo) {
|
||||||
switch (error) {
|
switch (error) {
|
||||||
|
|
@ -304,7 +305,7 @@ export default {
|
||||||
this.lineItems.vaps?.push(...getVaps);
|
this.lineItems.vaps?.push(...getVaps);
|
||||||
}
|
}
|
||||||
this.lineItems?.promos.push(...promoCodeData.promoCode);
|
this.lineItems?.promos.push(...promoCodeData.promoCode);
|
||||||
this.$emit("added-promo", this.lineItems);
|
this.$emit("change-promo", this.lineItems);
|
||||||
this.closeModal();
|
this.closeModal();
|
||||||
} else {
|
} else {
|
||||||
this.getErrorMessage(promoCodeData.errorCode, promoCodeData.additionalInfo);
|
this.getErrorMessage(promoCodeData.errorCode, promoCodeData.additionalInfo);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue