diff --git a/src/layouts/address-lookup/address-lookup.vue b/src/layouts/address-lookup/address-lookup.vue index 6c24c2076..c33ef68e5 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 && 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 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/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: [], }, diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index fd21971b0..b02b0d807 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/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. diff --git a/src/store/index.js b/src/store/index.js index 9fec43a77..c36af8bb0 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; @@ -3214,8 +3217,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 }) {