From 5f9ce0f36c30452a8b4076c590d2cca8d6c2347c Mon Sep 17 00:00:00 2001 From: Minojhini Valaiyapathi Date: Wed, 9 Apr 2025 14:37:14 -0400 Subject: [PATCH 1/6] CASH-353 - Added null check --- src/layouts/address-lookup/address-lookup.vue | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/layouts/address-lookup/address-lookup.vue b/src/layouts/address-lookup/address-lookup.vue index 6c24c2076..66f03547e 100644 --- a/src/layouts/address-lookup/address-lookup.vue +++ b/src/layouts/address-lookup/address-lookup.vue @@ -301,13 +301,15 @@ export default { return this.$refs.navbar.removeLoader(); } this.displayInvalidZipAlert = false; - const closestShops = await this.findClosestApplicableShops( - this.serviceZipCode, - this.carId - ); - this.displayNoServiceAlert = !closestShops?.data?.providers?.length; - if (this.displayNoServiceAlert) { - return this.$refs.navbar.removeLoader(); + if (this.serviceZipCode != null) { + const closestShops = await this.findClosestApplicableShops( + this.serviceZipCode, + this.carId + ); + this.displayNoServiceAlert = !closestShops?.data?.providers?.length; + if (this.displayNoServiceAlert) { + return this.$refs.navbar.removeLoader(); + } } const carsFound = resultMap.vinLookupResponse.vinVehicles; From b62d3b90660be0f0be6931f7c63c4d41ac545897 Mon Sep 17 00:00:00 2001 From: Matt Caimi Date: Thu, 10 Apr 2025 10:13:29 -0400 Subject: [PATCH 2/6] CASH-491 load isBigTruck in updateStateWithOrderInformation --- src/store/index.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/store/index.js b/src/store/index.js index 9fec43a77..e6c0585c4 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -678,6 +678,9 @@ export const mutations = { imageUrl: sessionInformation.order.vehicle?.imageUrl, imageVifNumber: sessionInformation.order.vehicle?.imageVifNumber, imageColor: sessionInformation.order.vehicle?.imageVifColor, + vehicleSubType: sessionInformation.order.vehicle?.vehicleSubType, + vehicleSpecialClass: sessionInformation.order.vehicle?.vehicleSpecialClass, + isBigTruck: sessionInformation.order.vehicle?.isBigTruck, }); state.order.damage.glassToReplace = sessionInformation.order.damage.glassToReplace; From f0cfe5c0de373d6703043da9a77d4634f7410e7f Mon Sep 17 00:00:00 2001 From: Johnny shultz Date: Thu, 10 Apr 2025 10:18:52 -0400 Subject: [PATCH 3/6] CASH-489 CASH-489 fixed email modal popping up when user has clicked skip and navigates back to quote page --- src/layouts/quote/quote.vue | 14 +++++++++++++- src/store/index.js | 4 ++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index 0ff86494d..6d4d07e46 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -166,6 +166,7 @@ import { getDeviceIdValue, } from "@/helpers/heritage-integration/cookie-helper"; import { showFmgLoadingModal } from "@/helpers/loading-modal-helper"; +import { fmgPageValues } from "@/router/router-constants/fmgPage-values"; defineRule("option-required", required(errorMessages.OPTION_REQUIRED)); @@ -242,7 +243,9 @@ export default { const resultMap = await settleAllPromises(promiseResultMap); const emailFromStore = store.getters.order.customer.emailAddress; const isEmailInStoreOnPageLoad = emailFromStore?.length > 0; - const showSaveProgressPopup = isEmailInStoreOnPageLoad ? false : true; + const isPopupSkipped = + store.getters.pageData(fmgPageValues.QUOTE).saveProgressPopupSkipped === true; + const showSaveProgressPopup = isEmailInStoreOnPageLoad || isPopupSkipped ? false : true; const showSaveProgressModal = isEmailInStoreOnPageLoad ? false : true; const shouldSkipToInsurance = getBoolFromString( @@ -626,6 +629,15 @@ export default { async closeSaveProgressPopup() { this.showSaveProgressPopup = false; + await this.dispatchStoreAction( + storeActions.SAVE_PAGE_DATA, + { + page: fmgPageValues.QUOTE, + data: { saveProgressPopupSkipped: true }, + }, + false + ); + if (this.skipToInsurance) { // skip ahead now if in IGQ skip experiment await this.skip(true, externalParamPackageLabels.GLASS_ONLY); diff --git a/src/store/index.js b/src/store/index.js index 032660c6f..e67db8f1e 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -3202,8 +3202,8 @@ export const actions = { context.commit(storeMutations.UPDATE_CUSTOMER_WAITLIST_REQUESTED, waitListRequested); }, - savePageData(context, emailOrSms) { - context.commit(storeMutations.UPDATE_PAGE_DATA, emailOrSms); + savePageData(context, pageData) { + context.commit(storeMutations.UPDATE_PAGE_DATA, pageData); }, saveVin(context, { isSelectedGlassAvailableForVehicle, vehicleInfo }) { From 99d223b2877ed3875115acc23a175ae317e9c02a Mon Sep 17 00:00:00 2001 From: Minojhini Valaiyapathi Date: Thu, 10 Apr 2025 11:24:56 -0400 Subject: [PATCH 4/6] CASH-353 - Added a check to see if it is heavy truck --- src/layouts/address-lookup/address-lookup.vue | 16 +++++++++------- .../license-plate-lookup.vue | 17 +++++++++-------- src/layouts/service-zip/service-zip.vue | 16 +++++++++------- src/layouts/vin-lookup/vin-lookup.vue | 18 ++++++++++-------- 4 files changed, 37 insertions(+), 30 deletions(-) diff --git a/src/layouts/address-lookup/address-lookup.vue b/src/layouts/address-lookup/address-lookup.vue index 6c24c2076..887b2db8e 100644 --- a/src/layouts/address-lookup/address-lookup.vue +++ b/src/layouts/address-lookup/address-lookup.vue @@ -301,13 +301,15 @@ export default { return this.$refs.navbar.removeLoader(); } this.displayInvalidZipAlert = false; - const closestShops = await this.findClosestApplicableShops( - this.serviceZipCode, - this.carId - ); - this.displayNoServiceAlert = !closestShops?.data?.providers?.length; - if (this.displayNoServiceAlert) { - return this.$refs.navbar.removeLoader(); + if (this.isHeavyTruck && this.serviceZipCode != null) { + const closestShops = await this.findClosestApplicableShops( + this.serviceZipCode, + this.carId + ); + this.displayNoServiceAlert = !closestShops?.data?.providers?.length; + if (this.displayNoServiceAlert) { + return this.$refs.navbar.removeLoader(); + } } const carsFound = resultMap.vinLookupResponse.vinVehicles; diff --git a/src/layouts/license-plate-lookup/license-plate-lookup.vue b/src/layouts/license-plate-lookup/license-plate-lookup.vue index 3ce42fc80..a359d3a9d 100644 --- a/src/layouts/license-plate-lookup/license-plate-lookup.vue +++ b/src/layouts/license-plate-lookup/license-plate-lookup.vue @@ -281,14 +281,15 @@ export default { this.displayInvalidZipAlert = true; return this.$refs.navbar.removeLoader(); } - - const closestShops = await this.findClosestApplicableShops( - this.serviceZipCode, - this.carId - ); - this.displayNoServiceAlert = !closestShops?.data?.providers?.length; - if (this.displayNoServiceAlert) { - return this.$refs.navbar.removeLoader(); + if (this.isHeavyTruck) { + const closestShops = await this.findClosestApplicableShops( + this.serviceZipCode, + this.carId + ); + this.displayNoServiceAlert = !closestShops?.data?.providers?.length; + if (this.displayNoServiceAlert) { + return this.$refs.navbar.removeLoader(); + } } // Check if the CarId has changed. diff --git a/src/layouts/service-zip/service-zip.vue b/src/layouts/service-zip/service-zip.vue index f8952a206..7d53d105d 100644 --- a/src/layouts/service-zip/service-zip.vue +++ b/src/layouts/service-zip/service-zip.vue @@ -276,13 +276,15 @@ export default { return this.$refs.navbar.removeLoader(); } this.displayNonServiceableZipAlert = false; - const closestShops = await this.findClosestApplicableShops( - this.serviceZipCode, - this.carId - ); - this.displayNoServiceAlert = !closestShops?.data?.providers?.length; - if (this.displayNoServiceAlert) { - return this.$refs.navbar.removeLoader(); + if (this.isHeavyTruck) { + const closestShops = await this.findClosestApplicableShops( + this.serviceZipCode, + this.carId + ); + this.displayNoServiceAlert = !closestShops?.data?.providers?.length; + if (this.displayNoServiceAlert) { + return this.$refs.navbar.removeLoader(); + } } const payment = this.$store.getters.payment; diff --git a/src/layouts/vin-lookup/vin-lookup.vue b/src/layouts/vin-lookup/vin-lookup.vue index aaef69fe8..788425861 100644 --- a/src/layouts/vin-lookup/vin-lookup.vue +++ b/src/layouts/vin-lookup/vin-lookup.vue @@ -303,14 +303,16 @@ export default { return this.$refs.navbar.removeLoader(); } this.displayInvalidZipAlert = false; - // If a VIN has already been found. Validate the Service Zip (in case of changes) - var closestShops = await this.findClosestApplicableShops( - this.serviceZipCode, - this.carId - ); - this.displayNoServiceAlert = !closestShops?.data?.providers?.length; - if (this.displayNoServiceAlert) { - return this.$refs.navbar.removeLoader(); + if (this.isHeavyTruck) { + // If a VIN has already been found. Validate the Service Zip (in case of changes) + var closestShops = await this.findClosestApplicableShops( + this.serviceZipCode, + this.carId + ); + this.displayNoServiceAlert = !closestShops?.data?.providers?.length; + if (this.displayNoServiceAlert) { + return this.$refs.navbar.removeLoader(); + } } // If either lookup fails, remove the loader and stop processing the page. From c68dac598273d254f2da1f9544f22c0d758d3640 Mon Sep 17 00:00:00 2001 From: Minojhini Valaiyapathi Date: Thu, 10 Apr 2025 11:40:59 -0400 Subject: [PATCH 5/6] CASH-353 - Resolving conflicts --- src/layouts/address-lookup/address-lookup.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/layouts/address-lookup/address-lookup.vue b/src/layouts/address-lookup/address-lookup.vue index 887b2db8e..c33ef68e5 100644 --- a/src/layouts/address-lookup/address-lookup.vue +++ b/src/layouts/address-lookup/address-lookup.vue @@ -301,7 +301,7 @@ export default { return this.$refs.navbar.removeLoader(); } this.displayInvalidZipAlert = false; - if (this.isHeavyTruck && this.serviceZipCode != null) { + if (this.serviceZipCode != null && this.isHeavyTruck) { const closestShops = await this.findClosestApplicableShops( this.serviceZipCode, this.carId From d1c8232b8958ec2568baac8d7b686ed8915fa4cd Mon Sep 17 00:00:00 2001 From: Johnny shultz Date: Thu, 10 Apr 2025 13:12:24 -0400 Subject: [PATCH 6/6] CASH-489 CASH-489 fixed unit tests --- src/layouts/quote/quote.spec.js | 66 +++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/src/layouts/quote/quote.spec.js b/src/layouts/quote/quote.spec.js index 49b90cfb3..9602780db 100644 --- a/src/layouts/quote/quote.spec.js +++ b/src/layouts/quote/quote.spec.js @@ -264,6 +264,12 @@ describe("quote.vue", () => { lineItems: { glassParts: ["item", "item2"], }, + pageData: jest.fn((page) => { + if (page === "quote") { + return { saveProgressPopupSkipped: true }; + } + return {}; + }), applicationUser: { experiments: [], }, @@ -313,6 +319,12 @@ describe("quote.vue", () => { lineItems: { glassParts: ["item", "item2"], }, + pageData: jest.fn((page) => { + if (page === "quote") { + return { saveProgressPopupSkipped: true }; + } + return {}; + }), applicationUser: { experiments: [], }, @@ -360,6 +372,12 @@ describe("quote.vue", () => { lineItems: { glassParts: ["item", "item2"], }, + pageData: jest.fn((page) => { + if (page === "quote") { + return { saveProgressPopupSkipped: true }; + } + return {}; + }), applicationUser: { experiments: [], }, @@ -404,6 +422,12 @@ describe("quote.vue", () => { lineItems: { glassParts: ["item", "item2"], }, + pageData: jest.fn((page) => { + if (page === "quote") { + return { saveProgressPopupSkipped: true }; + } + return {}; + }), applicationUser: { experiments: [], }, @@ -449,6 +473,12 @@ describe("quote.vue", () => { lineItems: { glassParts: ["item", "item2"], }, + pageData: jest.fn((page) => { + if (page === "quote") { + return { saveProgressPopupSkipped: true }; + } + return {}; + }), applicationUser: { experiments: [], }, @@ -494,6 +524,12 @@ describe("quote.vue", () => { lineItems: { glassParts: ["item", "item2"], }, + pageData: jest.fn((page) => { + if (page === "quote") { + return { saveProgressPopupSkipped: true }; + } + return {}; + }), applicationUser: { experiments: [], }, @@ -540,6 +576,12 @@ describe("quote.vue", () => { lineItems: { glassParts: ["item", "item2"], }, + pageData: jest.fn((page) => { + if (page === "quote") { + return { saveProgressPopupSkipped: true }; + } + return {}; + }), applicationUser: { experiments: [], }, @@ -588,6 +630,12 @@ describe("quote.vue", () => { lineItems: { glassParts: ["item", "item2"], }, + pageData: jest.fn((page) => { + if (page === "quote") { + return { saveProgressPopupSkipped: true }; + } + return {}; + }), applicationUser: { experiments: [], }, @@ -634,6 +682,12 @@ describe("quote.vue", () => { lineItems: { glassParts: ["item", "item2"], }, + pageData: jest.fn((page) => { + if (page === "quote") { + return { saveProgressPopupSkipped: true }; + } + return {}; + }), applicationUser: { experiments: [], }, @@ -681,6 +735,12 @@ describe("quote.vue", () => { lineItems: { glassParts: ["item", "item2"], }, + pageData: jest.fn((page) => { + if (page === "quote") { + return { saveProgressPopupSkipped: true }; + } + return {}; + }), applicationUser: { experiments: [], }, @@ -780,6 +840,12 @@ describe("quote.vue", () => { lineItems: { glassParts: ["item", "item2"], }, + pageData: jest.fn((page) => { + if (page === "quote") { + return { saveProgressPopupSkipped: true }; + } + return {}; + }), applicationUser: { experiments: [], },