Update promo-modal-question.vue
This commit is contained in:
parent
1945bb02d9
commit
860eed4151
1 changed files with 10 additions and 14 deletions
|
|
@ -209,21 +209,17 @@ export default {
|
|||
switch (error) {
|
||||
case promoErrorCodes.PROMO_STACKING_NOT_ALLOWED:
|
||||
case promoErrorCodes.SIMILAR_PROMO_ALREADY_ON_ORDER:
|
||||
if (
|
||||
additionalInfo.length === 1 &&
|
||||
return additionalInfo.length === 1 &&
|
||||
additionalInfo[0] === this.promoCode.toUpperCase()
|
||||
) {
|
||||
return (this.displaySimilarPromoAlert = true);
|
||||
} else {
|
||||
this.errorMessage = this.StackPromoText?.replaceAll(
|
||||
"{custom:NEWPROMOCODE}",
|
||||
this.promoCode.toUpperCase()
|
||||
).replaceAll(
|
||||
"{custom:OLDPROMOCODE}",
|
||||
this.getConflictingPromoCode(additionalInfo)
|
||||
);
|
||||
return (this.displayStackingPromoAlert = true);
|
||||
}
|
||||
? (this.displaySimilarPromoAlert = true)
|
||||
: ((this.errorMessage = this.StackPromoText?.replace(
|
||||
/\{custom:(NEW|OLD)PROMOCODE\}/g,
|
||||
(match, group) =>
|
||||
group === "NEW"
|
||||
? this.promoCode.toUpperCase()
|
||||
: this.getConflictingPromoCode(additionalInfo)
|
||||
)),
|
||||
(this.displayStackingPromoAlert = true));
|
||||
case promoErrorCodes.INVALID_PROMO_ON_ORDER:
|
||||
if (additionalInfo.some((x) => x.toUpperCase() === "APPOINTMENT_TYPE")) {
|
||||
this.errorMessage = this.InShopPromoText?.replaceAll(
|
||||
|
|
|
|||
Loading…
Reference in a new issue