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

@ -97,16 +97,16 @@ export default {
document.onkeydown = function (e) { document.onkeydown = function (e) {
return false; return false;
}; };
// check session expired and initSession to recreate cookies // check session expired and initSession to recreate cookies
if (analyticsMixin.methods.sessionExpired()) { if (analyticsMixin.methods.sessionExpired()) {
this.routeReturnUser(); this.routeReturnUser();
} else { } else {
this.$emit("ForwardClicked"); this.$emit("ForwardClicked");
} }
}, },
linkClick() { linkClick() {
// check session expired and initSession to recreate cookies // check session expired and initSession to recreate cookies
if (analyticsMixin.methods.sessionExpired()) { if (analyticsMixin.methods.sessionExpired()) {
this.routeReturnUser(); this.routeReturnUser();
} else { } else {
this.$emit("BackClicked"); this.$emit("BackClicked");

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);
} }
@ -187,7 +184,7 @@ const routes = [
// if coming from the return user page, clear the destination page so implicit navigation runs // if coming from the return user page, clear the destination page so implicit navigation runs
log(" --to.query ", JSON.stringify(to.query)); log(" --to.query ", JSON.stringify(to.query));
if (fromReturnUser && to.query) { if (fromReturnUser && to.query) {
log( " --clear to.query"); log(" --clear to.query");
delete to.query[queryStrings.FMG_PAGE]; delete to.query[queryStrings.FMG_PAGE];
//to.query[queryStrings.FMG_PAGE] = ""; //to.query[queryStrings.FMG_PAGE] = "";