From be6ed5099b5328ebd8e73e395b9571b347cf0251 Mon Sep 17 00:00:00 2001 From: hiteshkumar87 Date: Fri, 22 Nov 2024 19:03:11 +0530 Subject: [PATCH 01/19] CSR-2338 Page advance to Schedule page --- .../mobile-location-modal-questions.vue | 10 ++++++++-- src/layouts/service-location/service-location.vue | 3 ++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue index 89e095279..84087cb6e 100644 --- a/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue +++ b/src/layouts/service-location/mobile-location-modal-questions/mobile-location-modal-questions.vue @@ -97,6 +97,7 @@ export default { "updated-mobile-fee-part", "updated-contains-military-base", "updated-bill-to-account-number", + "mobileLocationSelected", ], data() { return { @@ -286,13 +287,15 @@ export default { // update the page level model this.$emit("update:modelValue", this.internalModel); - this.closeModal(); + //Page advance to Schedule page + this.$emit("mobileLocationSelected"); } } else { // Update the page level model this.$emit("update:modelValue", this.internalModel); - this.closeModal(); + //Page advance to Schedule page + this.$emit("mobileLocationSelected"); } }, }, @@ -305,6 +308,9 @@ export default { deep: true, }, }, + unmounted() { + if (this.isModalOpened) this.closeModal(); + }, components: { textLink, modal, diff --git a/src/layouts/service-location/service-location.vue b/src/layouts/service-location/service-location.vue index 9a6e649ec..0496df54c 100644 --- a/src/layouts/service-location/service-location.vue +++ b/src/layouts/service-location/service-location.vue @@ -96,7 +96,8 @@ validationRules="mobile-location-required" ref="mobileLocationQuestions" linkWidgetName="MobileLocationLinkWidget" - modalWidgetName="MobileLocationModalWidget" /> + modalWidgetName="MobileLocationModalWidget" + @mobileLocationSelected="forwardButtonAction" /> Date: Thu, 5 Dec 2024 10:50:39 -0500 Subject: [PATCH 02/19] CSR-2410: fix typo, add missing prop --- src/layouts/payment/payment.vue | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/layouts/payment/payment.vue b/src/layouts/payment/payment.vue index 7103091e6..062f3c218 100644 --- a/src/layouts/payment/payment.vue +++ b/src/layouts/payment/payment.vue @@ -55,11 +55,12 @@ v-model="lineItems" servicePackageOptionsCmsName="ServicePackageTitle" recyclingModalCmsWidgetName="RecycleModal" + :isInsurance="isInsurance" :insuranceDeductible="currentDeductible" :insuranceCompanyName="insuranceCompanyName" :showInsuranceCoverageAs="showInsuranceCoverageAs" :isItac="isItac" - :isNocomp="isNocomp" + :isNoComp="isNoComp" :isExpandedOnLoad="true" />
From e7913c3cbdc688d1b01eb490409d6cb270d48a90 Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Thu, 5 Dec 2024 10:51:04 -0500 Subject: [PATCH 03/19] CSR-2410: rearrange order to match /payment for consistency --- src/layouts/payment-method/payment-method.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/layouts/payment-method/payment-method.vue b/src/layouts/payment-method/payment-method.vue index 8cd8c13a3..78ec4cc84 100644 --- a/src/layouts/payment-method/payment-method.vue +++ b/src/layouts/payment-method/payment-method.vue @@ -31,9 +31,9 @@ :insuranceCompanyName="insuranceCompanyName" :showInsuranceCoverageAs="showInsuranceCoverageAs" :shouldHideRecalibration="shouldHideRecalibration" - :isExpandedOnLoad="false" :isItac="isItac" - :isNoComp="isNoComp" /> + :isNoComp="isNoComp" + :isExpandedOnLoad="false" />
From d1cb245099e2fc742196922aec626b57d9411fe1 Mon Sep 17 00:00:00 2001 From: Chloe Herd Date: Thu, 5 Dec 2024 12:21:23 -0500 Subject: [PATCH 04/19] Hide recalibration text regardless of insurance selection. --- src/layouts/quote/quote.vue | 1 - 1 file changed, 1 deletion(-) diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index 357db44dd..533081210 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -428,7 +428,6 @@ export default { ); }, shouldHideRecalibration() { - if (this.isInsuranceSelected) return false; return ( experimentMixin.methods .getSettingValue(experimentSettings.RECAL_PRICE_REMOVE) From f244f29cced10e69f3a06dc084c182063350898d Mon Sep 17 00:00:00 2001 From: Sneha Date: Fri, 6 Dec 2024 16:45:59 +0530 Subject: [PATCH 05/19] CSR-2434 --- .../promo-modal-question/promo-modal-question.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 911522668..656aeaa38 100644 --- a/src/fmg-components/promo-modal-question/promo-modal-question.vue +++ b/src/fmg-components/promo-modal-question/promo-modal-question.vue @@ -10,7 +10,7 @@ :ref="modalName" :headerText="modalHeaderText" :onModalClosedCallback="onModalClosed" - :onModalOpenedCallback="focusOnPromoInput" + :onModalOpenedCallback="openModal" :footerButtonText="modalFooterText" @footer-button-event="addPromoCode"> Date: Fri, 6 Dec 2024 08:35:03 -0500 Subject: [PATCH 06/19] Add logging to debug QA automation failure. Add logging to debug QA automation failure. Kishan reports about 1 out of 10 requests to this endpoint fail running qa regression. --- src/constants/store-actions.js | 2 ++ src/constants/store-mutations.js | 1 + src/layouts/payment-method/payment-method.vue | 7 ++++--- src/router/index.js | 1 + src/store/index.js | 18 +++++++++++++++++- 5 files changed, 25 insertions(+), 4 deletions(-) diff --git a/src/constants/store-actions.js b/src/constants/store-actions.js index c9592c315..41e5896bd 100644 --- a/src/constants/store-actions.js +++ b/src/constants/store-actions.js @@ -102,6 +102,8 @@ const storeActions = { RESET_SUBMITTED_ORDER: "resetSubmittedOrder", RESET_EXTERNAL_PARAMETER_STATE: "resetExternalParameterState", UPDATE_EXTERNAL_PARAMETER_MMS: "updateExternalParameterMMS", + + SAVE_LOGGING_OPTION: "saveLoggingOption", }; export { storeActions }; diff --git a/src/constants/store-mutations.js b/src/constants/store-mutations.js index 02b05bd28..740c5a47e 100644 --- a/src/constants/store-mutations.js +++ b/src/constants/store-mutations.js @@ -84,6 +84,7 @@ const storeMutations = { UPDATE_STATE_WITH_ORDER_INFORMATION: "updateStateWithOrderInformation", UPDATE_SAVE_SESSION_PROMISE: "updateSaveSessionPromise", UPDATE_LAST_PAGE_VISITED: "updateLastPageVisited", + UPDATE_LOGGING_OPTION: "updateLoggingOption", // EXPERIMENT MUTATIONS UPDATE_EXPERIMENTS: "updateExperiments", diff --git a/src/layouts/payment-method/payment-method.vue b/src/layouts/payment-method/payment-method.vue index 78ec4cc84..fa6fd234c 100644 --- a/src/layouts/payment-method/payment-method.vue +++ b/src/layouts/payment-method/payment-method.vue @@ -47,15 +47,16 @@ v-bind:isDismissible="false" /> -
+

-
+
{ experiments: [], triggeredSiteEntry: false, affiliateCookies: [], + loggingOption: false, }, }; }; @@ -414,6 +415,9 @@ export const mutations = { updateLastPageVisited(state, lastPageVisited) { state.applicationUser.lastPageVisited = lastPageVisited; }, + updateLoggingOption(state, loggingOption) { + state.applicationUser.loggingOption = loggingOption; + }, // EVENT BUS MUTATIONS addEventToBus(state, event) { state.applicationUser.eventBus.push(event); @@ -689,7 +693,9 @@ export const mutations = { !sessionInformation.order.payment.isInsurance && !sessionInformation.order.serviceLocation.provider?.providerNumber ) { - console.log("------------- updateStateWithOrderInformation reset isInsurance -----------------"); + console.log( + "------------- updateStateWithOrderInformation reset isInsurance -----------------" + ); console.log(new Date() + " sessionInformation: " + JSON.stringify(sessionInformation)); state.order.payment.isInsurance = null; } else { @@ -1031,6 +1037,7 @@ export const actions = { endpoint: endpoints.LookupVehicleByVin.url, payload: { vin: vin, // EX "1J4GW58S4XC541166" + logEnabled: context.getters.applicationUser.loggingOption, }, logApiCall: true, pageNameToLog: pageNameToLog, @@ -3016,6 +3023,15 @@ export const actions = { ); }, + saveLoggingOption(context, loggingOption) { + var option = false; + if (loggingOption != null) { + option = loggingOption == "true" ? true : false; + } + + context.commit(storeMutations.UPDATE_LOGGING_OPTION, option); + }, + async getRecalPartsAndSaveToLineItems(context, { pageNameToLog }) { // identify each part that needs recal const glassParts = context.state.order?.lineItems?.glassParts From 57e21e55f05f72c5f6bce126b683ffc60231ddad Mon Sep 17 00:00:00 2001 From: CarlNation Date: Fri, 6 Dec 2024 09:52:49 -0500 Subject: [PATCH 07/19] fix test fix test --- src/store/store.spec.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/store/store.spec.js b/src/store/store.spec.js index 313e7e37f..094793bc1 100644 --- a/src/store/store.spec.js +++ b/src/store/store.spec.js @@ -404,6 +404,11 @@ describe("Actions", () => { it("lookupVehicleByVin action, should return car data", async () => { // Arrange const context = state; + context.getters = { + applicationUser: { + loggingOption: false, + }, + }; // Act globalMethods.callHttpClient.mockImplementation(() => { From 2ae25e6bd019e37fce64e76e93b5dcb1f43d2cec Mon Sep 17 00:00:00 2001 From: CarlNation Date: Fri, 6 Dec 2024 10:33:05 -0500 Subject: [PATCH 08/19] cookie date time fix The cookie is storing date time attributes in UTC causing an exception in heritage code when it hits the comma separating parts of the string. ie: SavedSessionTimeoutDate":"Mon, 20 Jan 2025 15:31:51 GMT" --- src/helpers/heritage-integration/cookie-helper.js | 2 +- src/helpers/heritage-integration/session-helper.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/helpers/heritage-integration/cookie-helper.js b/src/helpers/heritage-integration/cookie-helper.js index 0bd4ae563..4ff5c0c8e 100644 --- a/src/helpers/heritage-integration/cookie-helper.js +++ b/src/helpers/heritage-integration/cookie-helper.js @@ -13,7 +13,7 @@ export function updateOrCreateFunnelCookie() { // Set up cookie with all the props. setFunnelCookieProperties({ - LastTouched: new Date().toUTCString(), + LastTouched: new Date().toJSON(), SavedSessionTimeoutDate: store.getters.applicationUser.savedSessionTimeout, DidHeritageFunnelUpdateLast: false, ShouldResetState: false, diff --git a/src/helpers/heritage-integration/session-helper.js b/src/helpers/heritage-integration/session-helper.js index 291ebfaf8..d932969d1 100644 --- a/src/helpers/heritage-integration/session-helper.js +++ b/src/helpers/heritage-integration/session-helper.js @@ -43,5 +43,5 @@ Function to calculate the date for the saved session timeout. export function getDateForSavedSessionTimeout() { const currentDate = new Date(new Date().toUTCString()); currentDate.setDate(currentDate.getDate() + applicationConfig.SAVED_SESSION_TIMEOUT_DAYS); - return currentDate.toUTCString(); + return currentDate.toJSON(); } From b02cbf5ceb73e1c789912ed9b5f2fb80b968b021 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Fri, 6 Dec 2024 10:54:09 -0500 Subject: [PATCH 09/19] test fix test fix --- src/helpers/heritage-integration/session-helper.spec.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/helpers/heritage-integration/session-helper.spec.js b/src/helpers/heritage-integration/session-helper.spec.js index fe3e308da..11440c544 100644 --- a/src/helpers/heritage-integration/session-helper.spec.js +++ b/src/helpers/heritage-integration/session-helper.spec.js @@ -81,7 +81,7 @@ describe("getDateForSavedSessionTimeout", () => { currentDate.setDate(currentDate.getDate() + applicationConfig.SAVED_SESSION_TIMEOUT_DAYS); // Act - const result = getDateForSavedSessionTimeout(); + const result = new Date(getDateForSavedSessionTimeout()).toUTCString(); // Assert expect(result).toEqual(currentDate.toUTCString()); From f332449ef6b190633ef41faf344362499dce615f Mon Sep 17 00:00:00 2001 From: hiteshkumar87 Date: Tue, 10 Dec 2024 18:49:08 +0530 Subject: [PATCH 10/19] CSR-2419 Home Address lookup remove default focus --- .../address-questions/address-questions.vue | 8 +++++++- src/layouts/address-lookup/address-lookup.vue | 6 +++++- .../customer-questions/customer-questions.vue | 10 +++++++++- 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/src/fmg-components/address-questions/address-questions.vue b/src/fmg-components/address-questions/address-questions.vue index 4226b014c..1dd52d7ed 100644 --- a/src/fmg-components/address-questions/address-questions.vue +++ b/src/fmg-components/address-questions/address-questions.vue @@ -124,6 +124,10 @@ export default { type: Boolean, default: false, }, + isAddressFieldFocused: { + type: Boolean, + default: true, + }, }, data() { return { @@ -225,7 +229,9 @@ export default { ).then(() => { // When loaded, trigger the setup this.initializeAutocomplete(); - this.addressField1.focus(); + if (this.isAddressFieldFocused) { + this.addressField1.focus(); + } }); }, initializeAutocomplete() { diff --git a/src/layouts/address-lookup/address-lookup.vue b/src/layouts/address-lookup/address-lookup.vue index 467177139..55d8a0499 100644 --- a/src/layouts/address-lookup/address-lookup.vue +++ b/src/layouts/address-lookup/address-lookup.vue @@ -19,7 +19,8 @@ ref="customerQuestions" v-model="customerQuestions" :validationRules="EmailValidationRules" - :isEmailOptional="IsEmailOptional" /> + :isEmailOptional="IsEmailOptional" + :isAddressFieldFocused="IsAddressFieldFocused" />
- +
Date: Tue, 10 Dec 2024 18:42:59 -0500 Subject: [PATCH 11/19] toString on the referralDate issue toString on the referralDate issue. the toString javascript function is adding timezone causing issues after 7pm --- src/store/index.js | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/store/index.js b/src/store/index.js index 6a67a9bc7..97fac2d0b 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -693,10 +693,6 @@ export const mutations = { !sessionInformation.order.payment.isInsurance && !sessionInformation.order.serviceLocation.provider?.providerNumber ) { - console.log( - "------------- updateStateWithOrderInformation reset isInsurance -----------------" - ); - console.log(new Date() + " sessionInformation: " + JSON.stringify(sessionInformation)); state.order.payment.isInsurance = null; } else { state.order.payment.isInsurance = sessionInformation.order.payment.isInsurance; @@ -2104,6 +2100,18 @@ export const actions = { ) { const order = context.state.order; + var dt = new Date(referralDate); + var month = "" + (dt.getMonth() + 1); + var day = "" + dt.getDate(); + const year = dt.getFullYear(); + + if (month.length < 2) + month = "0" + month; + if (day.length < 2) + day = "0" + day; + + const loadDate = `${year}-${month}-${day}`; + return globalMethods .callHttpClient({ method: endpoints.LoadSession.method, @@ -2111,7 +2119,7 @@ export const actions = { payload: { savedSessionId: savedSessionId?.toString(), referralNumber: referralNumber?.toString(), - referralDate: referralDate?.toString(), + referralDate: loadDate, parentAccountNumber: parentAccountNumber?.toString(), referralCorrelationId: referralCorrelationId, }, From a431a58fd558adf7369afab9ad27996f97c7eba4 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Wed, 11 Dec 2024 13:41:36 -0500 Subject: [PATCH 12/19] date functions use client browser for date parts date functions use client browser for date parts. just parse it instead --- src/store/index.js | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/store/index.js b/src/store/index.js index 97fac2d0b..d5fa1e0d9 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -2100,15 +2100,10 @@ export const actions = { ) { const order = context.state.order; - var dt = new Date(referralDate); - var month = "" + (dt.getMonth() + 1); - var day = "" + dt.getDate(); - const year = dt.getFullYear(); - - if (month.length < 2) - month = "0" + month; - if (day.length < 2) - day = "0" + day; + var dtParts = referralDate.split("-"); + const year = dtParts[0]; + const month = dtParts[1]; + const day = dtParts[2].substring(0, 2); const loadDate = `${year}-${month}-${day}`; From 33166f71c664dbeaf5f140822aa4d3f0070dc155 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Wed, 11 Dec 2024 13:58:33 -0500 Subject: [PATCH 13/19] tests tests --- src/store/store.spec.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/store/store.spec.js b/src/store/store.spec.js index 094793bc1..69e2feb66 100644 --- a/src/store/store.spec.js +++ b/src/store/store.spec.js @@ -784,6 +784,7 @@ describe("Actions", () => { const response = await actions.loadSession(context, { payload: { savedSessionId: "", + referralDate: "2024-12-11T00:29:41.967", }, pageNameToLog: "test", }); @@ -813,6 +814,7 @@ describe("Actions", () => { const response = await actions.loadSession(context, { payload: { savedSessionId: "", + referralDate: "2024-12-11T00:29:41.967", }, pageNameToLog: "test", }); @@ -841,6 +843,7 @@ describe("Actions", () => { const response = await actions.loadSession(context, { payload: { savedSessionId: "", + referralDate: "2024-12-11T00:29:41.967", }, pageNameToLog: "test", }); From 5a629be7416d64e82459520c68e89a105a149c63 Mon Sep 17 00:00:00 2001 From: Sneha Date: Thu, 12 Dec 2024 11:49:21 +0530 Subject: [PATCH 14/19] CSR-2486 --- src/layouts/license-plate-lookup/license-plate-lookup.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/layouts/license-plate-lookup/license-plate-lookup.vue b/src/layouts/license-plate-lookup/license-plate-lookup.vue index 2aba11db4..07dea7b21 100644 --- a/src/layouts/license-plate-lookup/license-plate-lookup.vue +++ b/src/layouts/license-plate-lookup/license-plate-lookup.vue @@ -232,6 +232,11 @@ export default { const resultMap = await settleAllPromises(promiseResultMap); // Lookup vin + if (!resultMap.registrationZipValidationResponse.isValid) { + this.displayInvalidZipAlert = true; + return this.$refs.navbar.removeLoader(); + } + const vinLookup = await this.lookupVin( this.licensePlate, resultMap.registrationZipValidationResponse.state @@ -251,7 +256,6 @@ export default { this.displayInvalidZipAlert = true; return this.$refs.navbar.removeLoader(); } - this.displayInvalidZipAlert = false; // Check if the CarId has changed. this.isCarIdDifferent = @@ -346,6 +350,7 @@ export default { this.displayNonServiceableZipAlert = false; this.displayMatchedDifferentVehicleAlert = false; this.displayVinLookupByHomeAddressNotAllowedAlert = false; + this.displayInvalidZipAlert = false; }, }, mounted() { From c6baefd0fb61b963185f06ede95169b8fbc7b61e Mon Sep 17 00:00:00 2001 From: Sneha Date: Thu, 12 Dec 2024 11:52:13 +0530 Subject: [PATCH 15/19] Update license-plate-lookup.vue --- src/layouts/license-plate-lookup/license-plate-lookup.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layouts/license-plate-lookup/license-plate-lookup.vue b/src/layouts/license-plate-lookup/license-plate-lookup.vue index 07dea7b21..b374e8bb6 100644 --- a/src/layouts/license-plate-lookup/license-plate-lookup.vue +++ b/src/layouts/license-plate-lookup/license-plate-lookup.vue @@ -231,12 +231,12 @@ export default { const resultMap = await settleAllPromises(promiseResultMap); - // Lookup vin if (!resultMap.registrationZipValidationResponse.isValid) { this.displayInvalidZipAlert = true; return this.$refs.navbar.removeLoader(); } + // Lookup vin const vinLookup = await this.lookupVin( this.licensePlate, resultMap.registrationZipValidationResponse.state From 515262488b5efaef29cb9f843bcd5ff96a1ec4c7 Mon Sep 17 00:00:00 2001 From: Scott Kiener Date: Thu, 12 Dec 2024 05:38:38 -0500 Subject: [PATCH 16/19] Changing target pool This is to get around issue in azure on release day 12/12 --- azure-pipelines.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3ac871d20..fd9044d5f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -30,6 +30,9 @@ resources: endpoint: Safelite ref: refs/tags/t5.6.41 +pool: + name: AmazonWindowsPool + variables: - group: Digital-Infrastructure - group: FixMyGlass-BuildBranches From 75bad802a17d6fb697c7fba52d90836883d8c0f8 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Thu, 12 Dec 2024 07:13:39 -0500 Subject: [PATCH 17/19] Revert "Changing target pool" This reverts commit 515262488b5efaef29cb9f843bcd5ff96a1ec4c7. --- azure-pipelines.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index fd9044d5f..3ac871d20 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -30,9 +30,6 @@ resources: endpoint: Safelite ref: refs/tags/t5.6.41 -pool: - name: AmazonWindowsPool - variables: - group: Digital-Infrastructure - group: FixMyGlass-BuildBranches From 4757dd93d0b64999d1acc7f5159b0c33d55a6f90 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Thu, 12 Dec 2024 15:12:47 -0500 Subject: [PATCH 18/19] Do not send safeliteHop amounts less than 0 Do not send safeliteHop amounts less than 0 --- src/layouts/payment/payment.vue | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/layouts/payment/payment.vue b/src/layouts/payment/payment.vue index 062f3c218..2fbe5ca6d 100644 --- a/src/layouts/payment/payment.vue +++ b/src/layouts/payment/payment.vue @@ -604,7 +604,10 @@ export default { cartItems.forEach((item) => { if (item.name !== null && item.category != "promos") { - lineItems.push(`${item.name}|${(item.salesTax + item.subTotal).toFixed(2)}|1`); + const total = (item.salesTax + item.subTotal).toFixed(2); + if (total > 0) { + lineItems.push(`${item.name}|${(item.salesTax + item.subTotal).toFixed(2)}|1`); + } } }); From 97232fa7372ead53ee7fa13f2da3cd0be370816d Mon Sep 17 00:00:00 2001 From: Adam Caouette Date: Thu, 12 Dec 2024 17:16:32 -0500 Subject: [PATCH 19/19] CSR-2489: add insuranceCompanyName value to dataLayer --- src/mixins/analytics-mixin.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mixins/analytics-mixin.js b/src/mixins/analytics-mixin.js index ac2cdee89..e970e94a8 100644 --- a/src/mixins/analytics-mixin.js +++ b/src/mixins/analytics-mixin.js @@ -340,6 +340,7 @@ export default { //Insurance if (order.payment.isInsurance) { payload.isInsuranceVerified = order.payment.insuranceCoverage.isVerified ?? ""; + payload.insuranceCompanyName = order.policy.insuranceCompanyName ?? ""; if (!order.payment.insuranceCoverage.isVerified) { payload.isInsuranceItac = ""; payload.isInsuranceNoComp = ""; @@ -361,6 +362,7 @@ export default { payload.insuranceDeductible = ""; payload.isInsuranceItac = ""; payload.isInsuranceNoComp = ""; + payload.insuranceCompanyName = ""; } pushToDataLayerIfDefined(payload);