Merge branch 'release/2025.09.11' into feature/bugfix/CASH-1450
This commit is contained in:
commit
2fea3f0d7d
2 changed files with 21 additions and 0 deletions
|
|
@ -108,6 +108,15 @@ export default {
|
|||
}
|
||||
this.globalAlertMessages.push(alertToPush);
|
||||
},
|
||||
removeGlobalAlert(alertId) {
|
||||
const alertIndex = this.globalAlertMessages.findIndex((alert) => alert.id === alertId);
|
||||
if (alertIndex !== -1) {
|
||||
this.globalAlertMessages.splice(alertIndex, 1);
|
||||
}
|
||||
},
|
||||
getGlobalAlerts() {
|
||||
return this.globalAlertMessages;
|
||||
},
|
||||
webchatClicked(event) {
|
||||
event.preventDefault();
|
||||
this.launchWebchat();
|
||||
|
|
|
|||
|
|
@ -850,6 +850,18 @@ export default {
|
|||
(newPromo) => !oldPromoCodes.includes(newPromo.promoCode)
|
||||
);
|
||||
|
||||
// Remove any existing promo error alerts for this promo code
|
||||
const existingAlerts = this.$refs.funnelHeader.getGlobalAlerts();
|
||||
if (existingAlerts.length > 0) {
|
||||
const errorPromoAlertToRemove = existingAlerts.find(
|
||||
(alert) =>
|
||||
alert.messageHeadline === "Promo code error" &&
|
||||
alert.messageCopy.includes(newlyActivatedPromoCodes[0].promoCode)
|
||||
);
|
||||
errorPromoAlertToRemove &&
|
||||
this.$refs.funnelHeader.removeGlobalAlert(errorPromoAlertToRemove.id);
|
||||
}
|
||||
|
||||
const alert = createPromoSuccessAlert(newlyActivatedPromoCodes[0].promoCode);
|
||||
this.$refs.funnelHeader.pushGlobalAlert(alert, alert.shouldAutoFade);
|
||||
} else if (
|
||||
|
|
|
|||
Loading…
Reference in a new issue