Merge pull request #2255 from Safelite/feature/CASH-109-x

CASH-109
This commit is contained in:
CarlNation 2025-01-27 14:21:23 -05:00 committed by GitHub
commit 497e63f370
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 16 additions and 25 deletions

View file

@ -712,16 +712,10 @@ export default {
return !areAllSessionCookiesSet(); 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() { sessionExpired() {
const fromHeritage = getQuerystringParameter(queryStrings.FROM_HERITAGE) === "true"; const fromHeritage = getQuerystringParameter(queryStrings.FROM_HERITAGE) === "true";
const funnelCookieLastTouched = getFunnelCookie()?.LastTouched; if (this.noSession() && !fromHeritage && store.getters.order.vehicle?.year > 0) {
if (
this.noSession() &&
!fromHeritage &&
funnelCookieLastTouched !== null &&
funnelCookieLastTouched !== undefined
) {
return true; return true;
} else { } else {
return false; return false;

View file

@ -100,14 +100,12 @@ const routes = [
} }
// On entering the funnel "fresh", read cookie information, decide what to do next. // On entering the funnel "fresh", read cookie information, decide what to do next.
else if (from.redirectedFrom === undefined || fromReturnUser) { 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. // if so, send them to return-user page.
const funnelCookieLastTouched = getFunnelCookie()?.LastTouched;
if ( if (
fromContentSite && fromContentSite &&
funnelCookieLastTouched !== null && !toReturnUserPage &&
funnelCookieLastTouched !== undefined && store.getters.order.vehicle?.year > 0
!toReturnUserPage
) { ) {
log(" --from content site navigate to return user"); log(" --from content site navigate to return user");
var qso = { var qso = {
@ -178,8 +176,7 @@ const routes = [
// clear part related state because heritage selected a new vehicle // clear part related state because heritage selected a new vehicle
if ( if (
to.query.fmgPage === fmgPageValues.VEHICLE && to.query.fmgPage === fmgPageValues.VEHICLE &&
eval(getFunnelCookie()?.HasDelayedClaimRegistration && eval(getFunnelCookie()?.HasDelayedClaimRegistration && !fromReturnUser)
!fromReturnUser)
) { ) {
store.commit(storeMutations.RESET_GLASS_PARTS_STATE); store.commit(storeMutations.RESET_GLASS_PARTS_STATE);
} }