From 2205b7104dce02a5b5e8c34f9cba4f215ab5869d Mon Sep 17 00:00:00 2001 From: hiteshkumar87 Date: Wed, 28 Feb 2024 19:14:29 +0530 Subject: [PATCH 1/6] CSR-1993 Green tint privacy --- src/assets/img/tints/Glass-NoShade-GreenTint-Privacy.svg | 1 + src/constants/tint-mapper.js | 1 + 2 files changed, 2 insertions(+) create mode 100644 src/assets/img/tints/Glass-NoShade-GreenTint-Privacy.svg diff --git a/src/assets/img/tints/Glass-NoShade-GreenTint-Privacy.svg b/src/assets/img/tints/Glass-NoShade-GreenTint-Privacy.svg new file mode 100644 index 000000000..fecc16e63 --- /dev/null +++ b/src/assets/img/tints/Glass-NoShade-GreenTint-Privacy.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/constants/tint-mapper.js b/src/constants/tint-mapper.js index 519de0855..e5d1a3b30 100644 --- a/src/constants/tint-mapper.js +++ b/src/constants/tint-mapper.js @@ -33,6 +33,7 @@ const tintMap = { { name: "green tint", src: "Glass-NoShade-GreenTint.svg" }, { name: "gray tint privacy", src: "Glass-NoShade-GrayTint.svg" }, { name: "blue tint", src: "Glass-NoShade-BlueTint.svg" }, + { name: "green tint privacy", src: "Glass-NoShade-GreenTint-Privacy.svg" }, // No shade or tint { name: "clear", src: "Glass-NoShade-NoTint.svg" }, From ad4c113c2681410fa77cc4c33db5e30f9544ea11 Mon Sep 17 00:00:00 2001 From: Bryan Mauger Date: Wed, 28 Feb 2024 09:38:26 -0500 Subject: [PATCH 2/6] Fix svg image. --- src/assets/img/tints/Glass-NoShade-GreenTint.svg | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/assets/img/tints/Glass-NoShade-GreenTint.svg b/src/assets/img/tints/Glass-NoShade-GreenTint.svg index 5f5b99de0..cdf96aa3d 100644 --- a/src/assets/img/tints/Glass-NoShade-GreenTint.svg +++ b/src/assets/img/tints/Glass-NoShade-GreenTint.svg @@ -1,3 +1 @@ - - - + \ No newline at end of file From 43fbdb7c2ef50571ab26db8794863a755633f77a Mon Sep 17 00:00:00 2001 From: Sneha Date: Fri, 1 Mar 2024 11:57:31 +0530 Subject: [PATCH 3/6] CSR-1992 --- src/fmg-components/cart/cart.vue | 4 ++-- .../promo-modal-question/promo-modal-question.vue | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/fmg-components/cart/cart.vue b/src/fmg-components/cart/cart.vue index 76847f3e9..577ec5516 100644 --- a/src/fmg-components/cart/cart.vue +++ b/src/fmg-components/cart/cart.vue @@ -103,7 +103,7 @@ ref="promoModalQuestion" class="small mt-4" v-model="lineItems" - @addedPromo="handleAddedPromo" + @changePromo="handlePromoChange" :availableVaps="availableVaps" modalWidgetName="PromoModalWidget" /> @@ -245,7 +245,7 @@ export default { } return []; }, - handleAddedPromo(lineItems) { + handlePromoChange(lineItems) { // NOTE: these lineItems are passed from promo-modal-question this.$emit("update:modelValue", lineItems); }, diff --git a/src/fmg-components/promo-modal-question/promo-modal-question.vue b/src/fmg-components/promo-modal-question/promo-modal-question.vue index 59c1523b2..f8c8f5f16 100644 --- a/src/fmg-components/promo-modal-question/promo-modal-question.vue +++ b/src/fmg-components/promo-modal-question/promo-modal-question.vue @@ -213,6 +213,7 @@ export default { (lineItemsToKeep) => getPromoCodeWithoutBundleIdentifier(lineItemsToKeep.promoCode) != promo ); + this.$emit("change-promo", this.lineItems); }, getErrorMessage(error, additionalInfo) { switch (error) { @@ -304,7 +305,7 @@ export default { this.lineItems.vaps?.push(...getVaps); } this.lineItems?.promos.push(...promoCodeData.promoCode); - this.$emit("added-promo", this.lineItems); + this.$emit("change-promo", this.lineItems); this.closeModal(); } else { this.getErrorMessage(promoCodeData.errorCode, promoCodeData.additionalInfo); From b0c931d6fc57f0a860bccebf26177f9198c1c108 Mon Sep 17 00:00:00 2001 From: Sneha Date: Fri, 1 Mar 2024 17:13:07 +0530 Subject: [PATCH 4/6] CSR-1992 --- src/fmg-components/cart/cart.vue | 6 +----- .../promo-modal-question/promo-modal-question.vue | 8 ++++++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/fmg-components/cart/cart.vue b/src/fmg-components/cart/cart.vue index 577ec5516..8a7714410 100644 --- a/src/fmg-components/cart/cart.vue +++ b/src/fmg-components/cart/cart.vue @@ -103,7 +103,7 @@ ref="promoModalQuestion" class="small mt-4" v-model="lineItems" - @changePromo="handlePromoChange" + emitToGrandparent="true" :availableVaps="availableVaps" modalWidgetName="PromoModalWidget" /> @@ -245,10 +245,6 @@ export default { } return []; }, - handlePromoChange(lineItems) { - // NOTE: these lineItems are passed from promo-modal-question - this.$emit("update:modelValue", lineItems); - }, }, computed: { screenReaderTotalAmountDueText() { diff --git a/src/fmg-components/promo-modal-question/promo-modal-question.vue b/src/fmg-components/promo-modal-question/promo-modal-question.vue index f8c8f5f16..56d235afc 100644 --- a/src/fmg-components/promo-modal-question/promo-modal-question.vue +++ b/src/fmg-components/promo-modal-question/promo-modal-question.vue @@ -106,6 +106,11 @@ export default { required: false, default: true, }, + emitToGrandparent: { + type: Boolean, + required: false, + default: false, + }, }, computed: { promoLinkText() { @@ -175,6 +180,7 @@ 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(); @@ -213,7 +219,6 @@ export default { (lineItemsToKeep) => getPromoCodeWithoutBundleIdentifier(lineItemsToKeep.promoCode) != promo ); - this.$emit("change-promo", this.lineItems); }, getErrorMessage(error, additionalInfo) { switch (error) { @@ -305,7 +310,6 @@ export default { this.lineItems.vaps?.push(...getVaps); } this.lineItems?.promos.push(...promoCodeData.promoCode); - this.$emit("change-promo", this.lineItems); this.closeModal(); } else { this.getErrorMessage(promoCodeData.errorCode, promoCodeData.additionalInfo); From 3ebffb11289eadb6acd2074a77529df068f328c0 Mon Sep 17 00:00:00 2001 From: hiteshkumar87 Date: Fri, 1 Mar 2024 18:48:04 +0530 Subject: [PATCH 5/6] tint image optional tint image optional --- .../img/tints/Glass-NoShade-GreenTint-Privacy.svg | 1 - src/assets/img/tints/Glass-NoShade-GreenTint.svg | 4 +++- src/constants/tint-mapper.js | 1 - .../glass-part-question/glass-part-question.vue | 15 +++++---------- src/ux-components/list-card/list-card.vue | 1 + 5 files changed, 9 insertions(+), 13 deletions(-) delete mode 100644 src/assets/img/tints/Glass-NoShade-GreenTint-Privacy.svg diff --git a/src/assets/img/tints/Glass-NoShade-GreenTint-Privacy.svg b/src/assets/img/tints/Glass-NoShade-GreenTint-Privacy.svg deleted file mode 100644 index fecc16e63..000000000 --- a/src/assets/img/tints/Glass-NoShade-GreenTint-Privacy.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/src/assets/img/tints/Glass-NoShade-GreenTint.svg b/src/assets/img/tints/Glass-NoShade-GreenTint.svg index cdf96aa3d..5f5b99de0 100644 --- a/src/assets/img/tints/Glass-NoShade-GreenTint.svg +++ b/src/assets/img/tints/Glass-NoShade-GreenTint.svg @@ -1 +1,3 @@ - \ No newline at end of file + + + diff --git a/src/constants/tint-mapper.js b/src/constants/tint-mapper.js index e5d1a3b30..519de0855 100644 --- a/src/constants/tint-mapper.js +++ b/src/constants/tint-mapper.js @@ -33,7 +33,6 @@ const tintMap = { { name: "green tint", src: "Glass-NoShade-GreenTint.svg" }, { name: "gray tint privacy", src: "Glass-NoShade-GrayTint.svg" }, { name: "blue tint", src: "Glass-NoShade-BlueTint.svg" }, - { name: "green tint privacy", src: "Glass-NoShade-GreenTint-Privacy.svg" }, // No shade or tint { name: "clear", src: "Glass-NoShade-NoTint.svg" }, diff --git a/src/layouts/vehicle-parts/glass-part-question/glass-part-question.vue b/src/layouts/vehicle-parts/glass-part-question/glass-part-question.vue index 25a73e112..280edfc6c 100644 --- a/src/layouts/vehicle-parts/glass-part-question/glass-part-question.vue +++ b/src/layouts/vehicle-parts/glass-part-question/glass-part-question.vue @@ -95,19 +95,14 @@ export default { }, tintSelectionOptions() { - let tintOptions = []; - - Object.keys(this.featureListData).forEach((tintOption) => { - tintOptions.push({ + const tintOptions = Object.keys(this.featureListData).map((tintOption) => { + const buttonImage = this.getTintSourceImage(this.glassLocation, tintOption); + return { value: tintOption, buttonLabel: tintOption, - buttonImage: require(`@/assets/img/tints/${this.getTintSourceImage( - this.glassLocation, - tintOption - )}`), - }); + buttonImage: buttonImage ? require(`@/assets/img/tints/${buttonImage}`) : null, + }; }); - return tintOptions; }, diff --git a/src/ux-components/list-card/list-card.vue b/src/ux-components/list-card/list-card.vue index 902baa1e1..ffdf4efc0 100644 --- a/src/ux-components/list-card/list-card.vue +++ b/src/ux-components/list-card/list-card.vue @@ -10,6 +10,7 @@ class="d-flex w-100 align-items-center px-2 h-100 list-card-content button-content rounded-3" :class="labelClasses"> Date: Fri, 1 Mar 2024 14:49:46 -0500 Subject: [PATCH 6/6] CSR-1977: update copy in promotions-helper --- src/helpers/promotions-helper.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/helpers/promotions-helper.js b/src/helpers/promotions-helper.js index c9b305f99..e8d5f4e8f 100644 --- a/src/helpers/promotions-helper.js +++ b/src/helpers/promotions-helper.js @@ -331,10 +331,10 @@ export function getNewlyInactivatedPromos(oldInactivePromos, newInactivePromos) export function createPromoSuccessAlert(promoCode) { return { - messageHeadline: "Promo applied!", - messageCopy: `Promo "${getPromoCodeWithoutBundleIdentifier( + messageHeadline: "Promo code applied!", + messageCopy: `Promo code ${getPromoCodeWithoutBundleIdentifier( promoCode.toUpperCase() - )}" was successfully applied to your cart.`, + )} was successfully applied to your cart.`, type: "alert-success", isDismissible: true, shouldAutoFade: true, @@ -343,19 +343,19 @@ export function createPromoSuccessAlert(promoCode) { export function createPromoErrorAlert(promoCode, errorCode = null, additionalInfo) { const alert = { - messageHeadline: "Promo error", + messageHeadline: "Promo code error", type: "alert-danger", shouldAutoFade: false, isDismissible: true, }; if (stackingPromoErrorCodes.includes(errorCode)) { - alert.messageCopy = `Sorry, promo code "${getPromoCodeWithoutBundleIdentifier( + alert.messageCopy = `Sorry, promo code ${getPromoCodeWithoutBundleIdentifier( promoCode.toUpperCase() - )}" cannot be combined with "${additionalInfo[0].toUpperCase()}"`; + )} cannot be combined with ${additionalInfo[0].toUpperCase()}`; } else { - alert.messageCopy = `Sorry, promo code "${getPromoCodeWithoutBundleIdentifier( + alert.messageCopy = `Sorry, promo code ${getPromoCodeWithoutBundleIdentifier( promoCode.toUpperCase() - )}" is not valid`; + )} is not valid`; } return alert; }