diff --git a/src/fmg-components/nav-bar/nav-bar.vue b/src/fmg-components/nav-bar/nav-bar.vue index 6f981f9e0..f23ecd244 100644 --- a/src/fmg-components/nav-bar/nav-bar.vue +++ b/src/fmg-components/nav-bar/nav-bar.vue @@ -97,16 +97,16 @@ export default { document.onkeydown = function (e) { return false; }; - // check session expired and initSession to recreate cookies - if (analyticsMixin.methods.sessionExpired()) { + // check session expired and initSession to recreate cookies + if (analyticsMixin.methods.sessionExpired()) { this.routeReturnUser(); } else { this.$emit("ForwardClicked"); } }, linkClick() { - // check session expired and initSession to recreate cookies - if (analyticsMixin.methods.sessionExpired()) { + // check session expired and initSession to recreate cookies + if (analyticsMixin.methods.sessionExpired()) { this.routeReturnUser(); } else { this.$emit("BackClicked"); diff --git a/src/layouts/quote/quote.vue b/src/layouts/quote/quote.vue index f3590cbc3..860aaf087 100644 --- a/src/layouts/quote/quote.vue +++ b/src/layouts/quote/quote.vue @@ -298,7 +298,7 @@ export default { // to restore, uncomment the 2 lines below // vm.showSaveProgressPopup = showSaveProgressPopup; // vm.showSaveProgressModal = showSaveProgressModal; - + vm.addableVaps = addableVaps; vm.lineItems = lineItems; vm.availableLineItems = pricingResults; diff --git a/src/layouts/vehicle-parts/vehicle-parts.vue b/src/layouts/vehicle-parts/vehicle-parts.vue index 43f66c376..832589043 100644 --- a/src/layouts/vehicle-parts/vehicle-parts.vue +++ b/src/layouts/vehicle-parts/vehicle-parts.vue @@ -97,7 +97,7 @@ export default { // turned off Save Your Progress for 1/23/25 release // to restore, uncomment line below // vm.showSaveProgressModal = !(emailFromStore?.length > 0); - + // Glass Part Question dynamic component Object.keys(vm.$refs) .filter((r) => r.includes(vm.RefPrefix) && vm.$refs[r][0] !== undefined) diff --git a/src/mixins/analytics-mixin.js b/src/mixins/analytics-mixin.js index 1c70722a1..9bb8f0cda 100644 --- a/src/mixins/analytics-mixin.js +++ b/src/mixins/analytics-mixin.js @@ -712,16 +712,10 @@ export default { return !areAllSessionCookiesSet(); }, - // sessionExpired is true when one of the analytics cookies(sid, dxdev) has expired but we still have the funnelSessionInfo cookie + // sessionExpired is true when one of the analytics cookies(sid, dxdev) has expired but we still have the vehicle year in vuex sessionExpired() { const fromHeritage = getQuerystringParameter(queryStrings.FROM_HERITAGE) === "true"; - const funnelCookieLastTouched = getFunnelCookie()?.LastTouched; - if ( - this.noSession() && - !fromHeritage && - funnelCookieLastTouched !== null && - funnelCookieLastTouched !== undefined - ) { + if (this.noSession() && !fromHeritage && store.getters.order.vehicle?.year > 0) { return true; } else { return false; diff --git a/src/router/index.js b/src/router/index.js index 49d3b0e4f..adbb2d022 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -57,7 +57,7 @@ const routes = [ log(` --from.redirectedFrom:>${JSON.stringify(from.redirectedFrom)}<`, ""); await analyticsMixin.methods.validateSession(); - + // after session is validated, remove the fromHeritage querystring if it exists so session expiration works if (to.query) { delete to.query[queryStrings.FROM_HERITAGE]; @@ -100,14 +100,12 @@ const routes = [ } // On entering the funnel "fresh", read cookie information, decide what to do next. else if (from.redirectedFrom === undefined || fromReturnUser) { - // if entering the funnel from the content site, check and see if there is already a funnel cookie. + // if entering the funnel from the content site, check and see if there is already a vehicle year in vuex. // if so, send them to return-user page. - const funnelCookieLastTouched = getFunnelCookie()?.LastTouched; if ( fromContentSite && - funnelCookieLastTouched !== null && - funnelCookieLastTouched !== undefined && - !toReturnUserPage + !toReturnUserPage && + store.getters.order.vehicle?.year > 0 ) { log(" --from content site navigate to return user"); var qso = { @@ -178,8 +176,7 @@ const routes = [ // clear part related state because heritage selected a new vehicle if ( to.query.fmgPage === fmgPageValues.VEHICLE && - eval(getFunnelCookie()?.HasDelayedClaimRegistration && - !fromReturnUser) + eval(getFunnelCookie()?.HasDelayedClaimRegistration && !fromReturnUser) ) { store.commit(storeMutations.RESET_GLASS_PARTS_STATE); } @@ -187,7 +184,7 @@ const routes = [ // if coming from the return user page, clear the destination page so implicit navigation runs log(" --to.query ", JSON.stringify(to.query)); if (fromReturnUser && to.query) { - log( " --clear to.query"); + log(" --clear to.query"); delete to.query[queryStrings.FMG_PAGE]; //to.query[queryStrings.FMG_PAGE] = ""; @@ -571,7 +568,7 @@ async function navigate( const pageError = getQuerystringParameter(queryStrings.PAGE_ERROR); const logQs = getQuerystringParameter(queryStrings.LOG); baseMixin.methods.dispatchStoreAction(storeActions.SAVE_LOGGING_OPTION, logQs, false); - + log("------------- router index.js navigate start -----------------"); log(" --scenario: ", scenario); log(" --isSavingNavigation: ", isSavingNavigation); @@ -636,7 +633,7 @@ function getNavigationMap(scenario, currentRoute) { function log(message, data) { const log = getQuerystringParameter(queryStrings.LOG); baseMixin.methods.dispatchStoreAction(storeActions.SAVE_LOGGING_OPTION, log, false); - + data = data ?? ""; const outData = typeof data === "object" ? JSON.stringify(data) : data;