CSR-1977: update copy in promotions-helper

This commit is contained in:
Adam Caouette 2024-03-01 14:49:46 -05:00
parent 8b7c319705
commit 900f790271

View file

@ -331,10 +331,10 @@ export function getNewlyInactivatedPromos(oldInactivePromos, newInactivePromos)
export function createPromoSuccessAlert(promoCode) { export function createPromoSuccessAlert(promoCode) {
return { return {
messageHeadline: "Promo applied!", messageHeadline: "Promo code applied!",
messageCopy: `Promo "${getPromoCodeWithoutBundleIdentifier( messageCopy: `Promo code ${getPromoCodeWithoutBundleIdentifier(
promoCode.toUpperCase() promoCode.toUpperCase()
)}" was successfully applied to your cart.`, )} was successfully applied to your cart.`,
type: "alert-success", type: "alert-success",
isDismissible: true, isDismissible: true,
shouldAutoFade: true, shouldAutoFade: true,
@ -343,19 +343,19 @@ export function createPromoSuccessAlert(promoCode) {
export function createPromoErrorAlert(promoCode, errorCode = null, additionalInfo) { export function createPromoErrorAlert(promoCode, errorCode = null, additionalInfo) {
const alert = { const alert = {
messageHeadline: "Promo error", messageHeadline: "Promo code error",
type: "alert-danger", type: "alert-danger",
shouldAutoFade: false, shouldAutoFade: false,
isDismissible: true, isDismissible: true,
}; };
if (stackingPromoErrorCodes.includes(errorCode)) { if (stackingPromoErrorCodes.includes(errorCode)) {
alert.messageCopy = `Sorry, promo code "${getPromoCodeWithoutBundleIdentifier( alert.messageCopy = `Sorry, promo code ${getPromoCodeWithoutBundleIdentifier(
promoCode.toUpperCase() promoCode.toUpperCase()
)}" cannot be combined with "${additionalInfo[0].toUpperCase()}"`; )} cannot be combined with ${additionalInfo[0].toUpperCase()}`;
} else { } else {
alert.messageCopy = `Sorry, promo code "${getPromoCodeWithoutBundleIdentifier( alert.messageCopy = `Sorry, promo code ${getPromoCodeWithoutBundleIdentifier(
promoCode.toUpperCase() promoCode.toUpperCase()
)}" is not valid`; )} is not valid`;
} }
return alert; return alert;
} }