From fc5f9edde2dafc6bbe629a05e1668f08c4ef6758 Mon Sep 17 00:00:00 2001 From: bmauger Date: Wed, 11 Jun 2025 08:24:21 -0400 Subject: [PATCH 01/17] Merge pull request #2581 from Safelite/CASH-926-move-charitable-donation-in-cart CASH-926 move FL donation to other location in cart. --- src/fmg-components/cart/cart.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/fmg-components/cart/cart.vue b/src/fmg-components/cart/cart.vue index 7d1637a94..0a200f5cf 100644 --- a/src/fmg-components/cart/cart.vue +++ b/src/fmg-components/cart/cart.vue @@ -117,6 +117,10 @@ {{ amountPaidText }} {{ getLineItemAmount(amountPaid) }} +
+ {{ donationCartItemName }} + {{ getLineItemAmount(donationCartItem.subTotal) }} +
{{ amountDueText }} {{ getLineItemAmount(amountDue, showCoverageAsPending) }} @@ -472,10 +476,6 @@ export default { }); } - if (this.donationCartItem) { - cartItems.push(this.donationCartItem); - } - return cartItems; }, }, From 9ab076cbdf6fb3df51f44a097d14c16b4ea0ffdd Mon Sep 17 00:00:00 2001 From: bmauger Date: Mon, 16 Jun 2025 15:08:07 -0400 Subject: [PATCH 02/17] Merge pull request #2588 from Safelite/CASH-959-hop-font-update Cash 959 hop font update --- public/css/hop-styling.css | 11 ++++++++--- public/scss/hop-styling.scss | 12 +++++++++--- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/public/css/hop-styling.css b/public/css/hop-styling.css index abe8a4599..a79c2f049 100644 --- a/public/css/hop-styling.css +++ b/public/css/hop-styling.css @@ -2,14 +2,18 @@ /* IMPORTANT: READ README.md in this folder! Do not edit .css file directly! */ /* IMPORTANT: READ README.md in this folder! Do not edit .css file directly! */ /* IMPORTANT: READ README.md in this folder! Do not edit .css file directly! */ +@import url("https://fonts.googleapis.com/css2?family=Urbanist:ital,wght@0,100..900;1,100..900&display=swap"); body { - font-family: Roboto; + font-family: Urbanist, Arial, Helvetica, sans-serif; font-weight: 400; color: #000; margin: 0; background-color: white; padding: 8px; } +body h3 { + font-weight: 600; +} body .validation-info { display: none; } @@ -31,7 +35,7 @@ body .form-group { body .headerlinecontainer .headerline1 { font-size: 20px; line-height: 32px; - font-weight: 400; + font-weight: 500; margin: 24px 0; text-align: center; } @@ -92,7 +96,7 @@ body .creditCardSpecific div .headerlinecontainer { display: none; } body .creditCardSpecific div label { - font-weight: 500; + font-weight: 600; } body .creditCardSpecific #infoRow2 { margin-bottom: 0; @@ -268,6 +272,7 @@ body .cc-error-container #alert-message { #fmg-checkout-shared #other-payments-container label span.paymentOptionText { margin: auto 0; padding-left: 0; + font-weight: 600; } #fmg-checkout-shared #other-payments-container #afterpayParentLink label > span:first-of-type { width: 100%; diff --git a/public/scss/hop-styling.scss b/public/scss/hop-styling.scss index e721af1d2..3d30255cc 100644 --- a/public/scss/hop-styling.scss +++ b/public/scss/hop-styling.scss @@ -2,14 +2,19 @@ /* IMPORTANT: READ README.md in this folder! Do not edit .css file directly! */ /* IMPORTANT: READ README.md in this folder! Do not edit .css file directly! */ /* IMPORTANT: READ README.md in this folder! Do not edit .css file directly! */ +@import url("https://fonts.googleapis.com/css2?family=Urbanist:ital,wght@0,100..900;1,100..900&display=swap"); body { - font-family: Roboto; + font-family: Urbanist, Arial, Helvetica, sans-serif; font-weight: 400; color: #000; margin: 0; background-color: white; padding: 8px; + h3 { + font-weight: 600; + } + .validation-info { display: none; } @@ -37,7 +42,7 @@ body { .headerline1 { font-size: 20px; line-height: 32px; - font-weight: 400; + font-weight: 500; margin: 24px 0; text-align: center; } @@ -98,7 +103,7 @@ body { display: none; } label { - font-weight: 500; + font-weight: 600; } } #infoRow2 { @@ -325,6 +330,7 @@ body { &.paymentOptionText { margin: auto 0; padding-left: 0; + font-weight: 600; } } } From 76a181ae6458a04743ec2e91cb4fb455528db8d1 Mon Sep 17 00:00:00 2001 From: Johnny Shultz Date: Wed, 18 Jun 2025 10:39:14 -0400 Subject: [PATCH 03/17] Merge pull request #2589 from Safelite/feature/CASH-341 CASH-341 --- src/layouts/schedule/schedule.vue | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/layouts/schedule/schedule.vue b/src/layouts/schedule/schedule.vue index 04b9ecb98..8c548a906 100644 --- a/src/layouts/schedule/schedule.vue +++ b/src/layouts/schedule/schedule.vue @@ -542,10 +542,11 @@ export default { forwardButtonAction() { this.updateSupportingItems(); - if (this.waitListRequested) { - var gaLabel = store.getters.isMobileAppointment - ? "checked_mobile" - : "checked_inshop"; + if (this.displayWaitList) { + var gaLabel = ""; + const status = this.waitListRequested ? "checked" : "unchecked"; + const type = store.getters.isMobileAppointment ? "mobile" : "inshop"; + gaLabel = `${status}_${type}`; const currentDate = new Date(); const dateString = this.selectableDatesData.days[0].date; From a3c738e86dbccb76a0b21d5d137c3707cca87130 Mon Sep 17 00:00:00 2001 From: bmauger Date: Mon, 23 Jun 2025 15:10:26 -0400 Subject: [PATCH 04/17] Merge pull request #2600 from Safelite/CASH-1028-add-ein-add-footer-copy Cash 1028 add ein add footer copy --- src/experiment-components/donation-block.vue | 34 +++++++++++++++++--- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/src/experiment-components/donation-block.vue b/src/experiment-components/donation-block.vue index fde5509f8..34cd4178a 100644 --- a/src/experiment-components/donation-block.vue +++ b/src/experiment-components/donation-block.vue @@ -7,8 +7,10 @@
-
- +
+ + EIN: 26-3043727 +

@@ -79,7 +81,8 @@
-

+

+

@@ -121,6 +124,9 @@ export default { DonationFooterText() { return this.getCmsContent(this.cmsWidgetName, "FooterText"); }, + DonationFooterText2() { + return this.getCmsContent(this.cmsWidgetName, "FooterText2"); + }, LogoImage() { return this.getCmsContent("DonationWidget", "Image"); }, @@ -195,8 +201,26 @@ export default { } } - img { - width: 5rem; + .logo-block { + display: flex; + flex-direction: column; + background: white; + align-items: flex-start; + justify-content: center; + padding: 0 0.5rem; + margin-right: 1rem; + height: max-content; + + img { + width: 88px; + } + + span { + font-size: 0.625rem; + margin: 0 auto; + padding: 0.5rem 0; + font-family: UrbanistSemibold; + } } .donation-slider { From 1ee10b7cdefdb9a97d2d9ff530f1717a3106d9ab Mon Sep 17 00:00:00 2001 From: Scott Kiener Date: Mon, 14 Jul 2025 09:20:56 -0400 Subject: [PATCH 05/17] Merge --- src/fmg-components/cart/cart.vue | 48 +++++++---------------- src/helpers/pricing-helper.js | 8 ++++ src/layouts/confirmation/confirmation.vue | 24 ++++++++++-- 3 files changed, 44 insertions(+), 36 deletions(-) diff --git a/src/fmg-components/cart/cart.vue b/src/fmg-components/cart/cart.vue index 0a200f5cf..42c0bbb52 100644 --- a/src/fmg-components/cart/cart.vue +++ b/src/fmg-components/cart/cart.vue @@ -119,7 +119,7 @@
{{ donationCartItemName }} - {{ getLineItemAmount(donationCartItem.subTotal) }} + {{ getLineItemAmount(donationCartItem.sellingPrice) }}
{{ amountDueText }} @@ -182,6 +182,7 @@ import { getAmountDue, getSubTotal, getSalesTax, + getAmountDueWithDonation, } from "@/helpers/pricing-helper.js"; // Constants @@ -211,6 +212,7 @@ export default { isNoComp: Boolean, isExpandedOnLoad: Boolean, isMSRFeeApplicable: Boolean, + donationCartItem: Object, }, data() { return { @@ -1083,33 +1085,6 @@ export default { donationCartItemName() { return this.getCmsContent("DonationCartTextWidget", "Text"); }, - donationCartItem() { - if (!this.lineItems || !this.lineItems.supportingItems) { - return null; - } - - const donationLineItem = this.lineItems.supportingItems.find( - (item) => item.partType === partTypeStrings.DONATION - ); - - if (donationLineItem) { - return { - name: this.donationCartItemName, - category: cartItemCategories.SUPPORTING_ITEMS, - cartItemType: cartItemTypes.DONATION, - isDisplayed: true, - isRemovable: false, - subTotal: donationLineItem.sellingPrice, - salesTax: 0, - lineItems: [], - isCoveredByInsurance: cartItemTypesCoveredByInsurance.includes( - cartItemTypes.DONATION - ), - }; - } - - return null; - }, removeLinkText() { return this.getCmsContent("RemoveCartItemTextWidget", "Text"); }, @@ -1156,9 +1131,15 @@ export default { amountDue() { if (!this.lineItems || this.lineItems.length < 1) return; if (this.showAsPaid) return 0; - return this.isInsurance || !this.shouldHideRecalibration - ? getAmountDue(this.lineItems) // calculate with recal (if on order) - : getAmountDue(this.lineItemsWithoutRecal); // calculated without recal + if (this.isInsurance || !this.shouldHideRecalibration) { + return this.donationCartItem + ? getAmountDueWithDonation(this.lineItems, this.donationCartItem) + : getAmountDue(this.lineItems); + } else { + return this.donationCartItem + ? getAmountDueWithDonation(this.lineItemsWithoutRecal, this.donationCartItem) + : getAmountDue(this.lineItemsWithoutRecal); + } }, amountPaid() { if (!this.showAsPaid) { @@ -1309,8 +1290,9 @@ export default { .sub-total, .sales-tax, .amount-due, - .amount-paid { - font-weight: 500; + .amount-paid, + .donation-amount { + font-family: UrbanistSemibold; color: $black; } .sub-total { diff --git a/src/helpers/pricing-helper.js b/src/helpers/pricing-helper.js index fda5b3b9c..33311fd21 100644 --- a/src/helpers/pricing-helper.js +++ b/src/helpers/pricing-helper.js @@ -1,6 +1,7 @@ import store from "@/store"; import { storeActions } from "@/constants/store-actions"; import baseMixin from "@/mixins/base-mixin.js"; +import { deepClone } from "@/helpers/object-helper"; export function getDisplayAmountDue(lineItemsObject, includeTax = true) { return getAmountDue(lineItemsObject, includeTax).toLocaleString("en-US", { @@ -62,6 +63,13 @@ export function getSalesTax(lineItemsObject) { ); } +export function getAmountDueWithDonation(lineItemsObject, donationLineItem) { + // this is amount due with Donation added + const lineItemsCloneWithDonation = deepClone(lineItemsObject); + lineItemsCloneWithDonation.supportingItems.push(donationLineItem); + return getAmountDue(lineItemsCloneWithDonation, false); +} + export async function getPricingByDayPartWithPrice(pageNameToLog) { // Get the Pricing By Day Part const basePriceByDayPart = await baseMixin.methods.dispatchStoreActionWithLogging( diff --git a/src/layouts/confirmation/confirmation.vue b/src/layouts/confirmation/confirmation.vue index e65eacc3c..e8c01fd05 100644 --- a/src/layouts/confirmation/confirmation.vue +++ b/src/layouts/confirmation/confirmation.vue @@ -55,7 +55,8 @@ :damage="damageInfo" :availableVaps="vaps" :allowItemRemoval="false" - v-model="lineItems" + v-model="lineItemsWithoutDonation" + :donationCartItem="donationLineItem" :showAsPaid="isPia" servicePackageOptionsCmsName="ServicePackageTitle" :isInsurance="isInsurance" @@ -123,6 +124,7 @@ import experimentMixin from "@/mixins/experiment-mixin.js"; import { containsRecalParts } from "@/helpers/recal-helper.js"; import donationBlock from "@/experiment-components/donation-block.vue"; import { partNumberStrings } from "@/constants/part-number-strings"; +import { partTypeStrings } from "@/constants/part-type-strings"; import analyticsMixin from "@/mixins/analytics-mixin"; export default { @@ -229,7 +231,7 @@ export default { }; const donationItems = lineItemsFromSubmittedOrder.supportingItems?.filter( - (item) => item.partNumber === partNumberStrings.DONATION + (item) => item.partType === partTypeStrings.DONATION ); const donationAmount = donationItems?.length > 0 ? donationItems[0].sellingPrice : 0; @@ -243,7 +245,7 @@ export default { vm.shouldDisplayFosterLove = hasFosterLoveExperiment; vm.donationAmount = donationAmount; vm.showDonationSuccess = lineItemsFromSubmittedOrder.supportingItems?.some( - (item) => item.partType === partNumberStrings.DONATION + (item) => item.partType === partTypeStrings.DONATION ); vm.pushAnalytics(); @@ -490,6 +492,22 @@ export default { donationValues() { return [1, 3, 5]; }, + lineItemsWithoutDonation() { + const lineItemsClone = deepClone(this.lineItems); + lineItemsClone.supportingItems = lineItemsClone.supportingItems?.filter( + (item) => item.partType !== partTypeStrings.DONATION + ); + return lineItemsClone; + }, + donationLineItem() { + if (!this.lineItems) return null; + const donationLineItems = this.lineItems.supportingItems?.filter( + (item) => item.partType === partTypeStrings.DONATION + ); + let output = + donationLineItems && donationLineItems.length > 0 ? donationLineItems[0] : null; + return output; + }, }, methods: { arePagePrerequisitesValid() { From 4b211550d17385c6c81394515878764f28ebd353 Mon Sep 17 00:00:00 2001 From: CarlNation <32103961+CarlNation@users.noreply.github.com> Date: Tue, 24 Jun 2025 20:47:54 -0400 Subject: [PATCH 06/17] Merge pull request #2602 from Safelite/nation/CASH-1029 CASH-1029 Dynamo Logging --- src/constants/endpoints.js | 4 +++ src/constants/experiments.js | 1 + src/constants/store-actions.js | 1 + src/global-methods.js | 58 +++++++++++++++++--------------- src/mixins/analytics-mixin.js | 57 ++++++++++++++++++++++++++++++- src/mixins/base-mixin.js | 12 +++++++ src/router/methods/after-each.js | 3 ++ src/store/index.js | 36 +++++++++++++++++++- 8 files changed, 143 insertions(+), 29 deletions(-) diff --git a/src/constants/endpoints.js b/src/constants/endpoints.js index aa0643821..085651f20 100644 --- a/src/constants/endpoints.js +++ b/src/constants/endpoints.js @@ -176,6 +176,10 @@ const endpoints = { url: "/analytics/api/v1/analytics/log-part-questions", method: "POST", }, + LogDigitalConsumer: { + url: "/analytics/api/v1/analytics/digitalconsumer-log", + method: "POST", + }, GetExperimentsByUser: { url: "/analytics/api/v1/analytics/get-experiments", method: "GET", diff --git a/src/constants/experiments.js b/src/constants/experiments.js index c5c24536d..871c6fd24 100644 --- a/src/constants/experiments.js +++ b/src/constants/experiments.js @@ -26,6 +26,7 @@ const experimentSettings = { FOSTER_LOVE: "DisplayFosterLove", SKIP_TO_INSURANCE: "SkipToInsurance", DISPLAY_AFTERPAY_BREAKOUT_DISPLAY: "Display_AfterpayBreakoutDisplay", + DYNAMO_LOGGING: "DynamoLogging", }; const experimentTriggers = { diff --git a/src/constants/store-actions.js b/src/constants/store-actions.js index 9f0965480..cb2c84940 100644 --- a/src/constants/store-actions.js +++ b/src/constants/store-actions.js @@ -63,6 +63,7 @@ const storeActions = { LOG_CUSTOM_EVENT: "logCustomEvent", INITIALIZE_SESSION: "initializeSession", LOG_PART_QUESTIONS: "logPartQuestions", + LOG_DIGITALCONSUMER: "logDigitalConsumer", // DEPENDENCY MUTATIONS RESET_VEHICLE_STATE_AND_DEPENDENCIES: "resetVehicleStateAndDependencies", diff --git a/src/global-methods.js b/src/global-methods.js index e90843bdc..75fabb356 100644 --- a/src/global-methods.js +++ b/src/global-methods.js @@ -100,34 +100,38 @@ export default { return resolve(response); }, (error) => { - if (logApiCall) { - analyticsMixIn.methods.pushEventToGA( - GaCategories.API_RESPONSE, - GaActions.RESULT, - `${GaLabels.ERROR}_${endpoint}`, - true - ); + if (endpoint.toLowerCase().includes("/digitalconsumer-log")) { + return resolve({ data: null, error: "Ignore errors when logging" }); + } else { + if (logApiCall) { + analyticsMixIn.methods.pushEventToGA( + GaCategories.API_RESPONSE, + GaActions.RESULT, + `${GaLabels.ERROR}_${endpoint}`, + true + ); + } + + if (error.response.status && error.response.status != "404") { + // Do not route to error logic when no wipers found or no promo found (404s) + const errorPayload = { + cause: `Response error ${error.response.status}`, + currentPage: pageNameToLog, + endpoint: endpoint, + }; + + router.bailout(errorPayload); + + // do not log 404 errors from services because we return NotFound + // when a service doesn't return an object + global.$logger.logError( + `${method}: ${endpoint}: ${error.message}`, + error.response + ); + } + + return reject(error.response); } - - if (error.response.status && error.response.status != "404") { - // Do not route to error logic when no wipers found or no promo found (404s) - const errorPayload = { - cause: `Response error ${error.response.status}`, - currentPage: pageNameToLog, - endpoint: endpoint, - }; - - router.bailout(errorPayload); - - // do not log 404 errors from services because we return NotFound - // when a service doesn't return an object - global.$logger.logError( - `${method}: ${endpoint}: ${error.message}`, - error.response - ); - } - - return reject(error.response); } ); }); diff --git a/src/mixins/analytics-mixin.js b/src/mixins/analytics-mixin.js index 298a3af8f..90513e764 100644 --- a/src/mixins/analytics-mixin.js +++ b/src/mixins/analytics-mixin.js @@ -12,7 +12,8 @@ import { setSessionKeyIfUnset, } from "@/helpers/heritage-integration/cookie-helper"; import { queryStrings } from "@/constants/query-strings"; -import { experimentSettings } from "@/constants/experiments"; +import { experimentSettings, experimentUniverses } from "@/constants/experiments"; +import experimentMixin from "@/mixins/experiment-mixin"; import { analyticsPageEvents, GaCategories, @@ -128,6 +129,60 @@ export default { } }, + async logDigitalConsumer() { + const currentPageName = getPageNameFromRouter(); + const universes = store.getters.applicationUser.experiments; + console.log(JSON.stringify(universes)); + + let hasDynamoLogging = experimentMixin.methods.hasSettingEqualTo( + experimentSettings.DYNAMO_LOGGING, + "true", + universes + ); + if (!hasDynamoLogging) { + return; + } + + const variationNames = universes + .filter((item) => item.universeName === experimentUniverses.CONCEPT_FUNNEL) + .map((item) => item.variationName) + .filter(Boolean); // removes undefined/null + + const conceptVariation = variationNames.length > 0 ? variationNames[0] : ""; + + const submittedOrder = baseMixin.methods.getSubmittedOrder(); + const hasSubmittedOrder = baseMixin.methods.hasSubmittedOrder(); + const hasSubmittedOrderAtConfirmationPage = + hasSubmittedOrder && currentPageName?.toLowerCase() == routeData.CONFIRMATION.name; + + const refSequenceNum = hasSubmittedOrderAtConfirmationPage + ? submittedOrder.referralSequenceNumber + : store.getters.order.referralSequenceNumber; + + var payload = { + actionName: `Browser page:${currentPageName}`, + referralSequenceNumber: hasSubmittedOrderAtConfirmationPage + ? submittedOrder.referralSequenceNumber + : store.getters.order.referralSequenceNumber, + referralNumber: hasSubmittedOrderAtConfirmationPage + ? submittedOrder.referralNumber + : store.getters.order.referralNumber, + workOrderId: hasSubmittedOrderAtConfirmationPage + ? submittedOrder.workOrderId + : store.getters.order.workOrderId, + workOrderNumber: hasSubmittedOrderAtConfirmationPage + ? submittedOrder.workOrderNumber + : store.getters.order.workOrderNumber, + conceptVariation: conceptVariation, + }; + + await baseMixin.methods.dispatchStoreAction( + storeActions.LOG_DIGITALCONSUMER, + payload, + false + ); + }, + async pushEventForChatsToGA(category, action, label, pushToLogApp = false) { const currentPageName = getPageNameFromRouter(); const value = `2.0_${currentPageName}`; diff --git a/src/mixins/base-mixin.js b/src/mixins/base-mixin.js index ecce2632d..4046fa477 100644 --- a/src/mixins/base-mixin.js +++ b/src/mixins/base-mixin.js @@ -197,6 +197,18 @@ export default { return [parseInt(v[1], 10), parseInt(v[2], 10), parseInt(v[3] || 0, 10)]; } }, + isMobileDevice() { + const userAgent = navigator.userAgent; + return ( + userAgent.includes("Android") || + userAgent.includes("Mobile") || + userAgent.includes("iPod") || + userAgent.includes("iPhone") || + userAgent.includes("IEMobile") || + userAgent.includes("BlackBerry") || + userAgent.includes("webOS") + ); + }, getSubmittedOrder() { return JSON.parse( window.sessionStorage.getItem(sessionStorageKeyConstants.SUBMITTED_STATE) diff --git a/src/router/methods/after-each.js b/src/router/methods/after-each.js index ef3dc0d93..27cecffde 100644 --- a/src/router/methods/after-each.js +++ b/src/router/methods/after-each.js @@ -1,6 +1,9 @@ import analyticsMixin from "@/mixins/analytics-mixin"; export async function afterEach(to, from) { + // digital consumer logging + analyticsMixin.methods.logDigitalConsumer(); + // Push page view to GA analyticsMixin.methods.pushPageViewToGA(); diff --git a/src/store/index.js b/src/store/index.js index 073a50e23..2cfe39ead 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -11,7 +11,11 @@ import { experimentTriggers } from "@/constants/experiments"; import { damageLocationsSelected } from "@/constants/damage-locations-selected"; import { singleWindshieldCarIds } from "@/constants/single-windshield-carids"; import { routeData } from "@/router/constants/routes"; -import { deleteFunnelCookie } from "@/helpers/heritage-integration/cookie-helper.js"; +import { + deleteFunnelCookie, + getSessionIdValue, + getDeviceIdValue, +} from "@/helpers/heritage-integration/cookie-helper.js"; import { deepEqual } from "@/helpers/object-helper"; import baseMixin from "@/mixins/base-mixin.js"; import { @@ -1551,6 +1555,36 @@ export const actions = { }); }, + logDigitalConsumer( + context, + { + actionName, + referralSequenceNumber, + referralNumber, + workOrderId, + workOrderNumber, + conceptVariation, + } + ) { + var payload = { + sessionId: getSessionIdValue(), + deviceId: getDeviceIdValue(), + actionName: actionName ?? "", + referralSequenceNumber: referralSequenceNumber ?? "", + referralNumber: referralNumber ?? "", + applicationName: baseMixin.methods.isMobileDevice() ? "2.0 Mobile" : "2.0", + workOrderId: workOrderId ?? "", + workOrderNumber: workOrderNumber ?? "", + conceptVariation: conceptVariation, + }; + + return globalMethods.callHttpClient({ + method: endpoints.LogDigitalConsumer.method, + endpoint: endpoints.LogDigitalConsumer.url, + payload: payload, + }); + }, + // Misc Actions setReferralInformation(context, { referralNumber, referralDate, referralCorrelationId, eon }) { context.commit(storeMutations.UPDATE_REFERRAL_NUMBER, referralNumber); From b92d2f3d3aa77a9113f4616746502493b417a855 Mon Sep 17 00:00:00 2001 From: Chris <85180749+credelinghuys@users.noreply.github.com> Date: Wed, 25 Jun 2025 15:22:12 -0400 Subject: [PATCH 07/17] Merge pull request #2604 from Safelite/feature/CASH-952 CASH-952: Afterpay banner update --- src/constants/experiments.js | 1 + src/helpers/cms-content-helper.js | 4 + .../afterpay-modal-banner.vue | 110 ++++++++++++------ src/layouts/quote/quote.vue | 19 ++- src/styles/ux-variables.scss | 8 +- 5 files changed, 91 insertions(+), 51 deletions(-) diff --git a/src/constants/experiments.js b/src/constants/experiments.js index 871c6fd24..6a2796da9 100644 --- a/src/constants/experiments.js +++ b/src/constants/experiments.js @@ -26,6 +26,7 @@ const experimentSettings = { FOSTER_LOVE: "DisplayFosterLove", SKIP_TO_INSURANCE: "SkipToInsurance", DISPLAY_AFTERPAY_BREAKOUT_DISPLAY: "Display_AfterpayBreakoutDisplay", + AFTERPAY_EXTENDED_PAY_OPTION_THRESHOLD: "AfterPayExtendedPayOptionThreshold", DYNAMO_LOGGING: "DynamoLogging", }; diff --git a/src/helpers/cms-content-helper.js b/src/helpers/cms-content-helper.js index c1d28097a..727add296 100644 --- a/src/helpers/cms-content-helper.js +++ b/src/helpers/cms-content-helper.js @@ -339,3 +339,7 @@ export function splitCMSCopyOnParagraphTag(copy) { // filter removes empty strings that are a result of string.split with regex return copy.split(/(?:)|(?:<\/p>)/g).filter((paragraph) => paragraph !== ""); } + +export function splitCMSCopyOnBR(copy) { + return copy.split("
"); +} diff --git a/src/layouts/quote/afterpay-modal-banner/afterpay-modal-banner.vue b/src/layouts/quote/afterpay-modal-banner/afterpay-modal-banner.vue index 4c3644cac..32960509c 100644 --- a/src/layouts/quote/afterpay-modal-banner/afterpay-modal-banner.vue +++ b/src/layouts/quote/afterpay-modal-banner/afterpay-modal-banner.vue @@ -1,13 +1,14 @@