Merge pull request #2246 from Safelite/feature/CASH-139-revert

Revert "CASH-139"
This commit is contained in:
CarlNation 2025-01-23 09:56:16 -05:00 committed by GitHub
commit 01986fcd4a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 20 additions and 51 deletions

View file

@ -45,9 +45,6 @@
<script>
import textLink from "@/ux-components/text-link/text-link";
import buttonMain from "@/ux-components/button-main/button-main";
import { fmgPageValues } from "@/router/router-constants/fmgPage-values";
import analyticsMixin from "@/mixins/analytics-mixin";
import router from "@/router/index.js";
export default {
name: "navbar",
@ -100,17 +97,7 @@ export default {
this.$emit("ForwardClicked");
},
linkClick() {
// check session expired and initSession to recreate cookies
if (analyticsMixin.methods.sessionExpired()) {
analyticsMixin.methods.initSession();
router.push({
path: "/",
query: { fmgPage: fmgPageValues.RETURN_USER },
});
} else {
this.$emit("BackClicked");
}
this.$emit("BackClicked");
},
},
};

View file

@ -8,7 +8,7 @@
<funnelHeader cmsWidgetName="FunnelHeaderWidget" ref="funnelHeader" />
</div>
</div>
<div class="row justify-content-center">
<div class="row justify-content-center return-user-spacing">
<div class="col-md-6 col-xl-4 mt-4">
<funnelSubHeader
ref="funnelSubHeader"
@ -121,4 +121,9 @@ export default {
text-decoration: underline;
}
}
.return-user {
.return-user-spacing {
margin-top: 14rem;
}
}
</style>

View file

@ -712,8 +712,11 @@ 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() {
async validateSession() {
// The noSession function checks the cookies related to analytics logging(sid). it is not the funnel info cookie.
// The sid cookie for analytics will expire every 30 minutes and get recreated in initSession. If this happens
// and we also have the funnel cookie present, that indicates they have an existing session that is now expired
// so route them to the return user page.
const fromHeritage = getQuerystringParameter(queryStrings.FROM_HERITAGE) === "true";
const funnelCookieLastTouched = getFunnelCookie()?.LastTouched;
if (
@ -722,15 +725,11 @@ export default {
funnelCookieLastTouched !== null &&
funnelCookieLastTouched !== undefined
) {
return true;
} else {
return false;
}
},
async validateSession() {
// do not init session if it is expired. let the click event on button-main handle session expired logic
if (this.sessionExpired()) {
await this.initSession();
router.push({
path: "/",
query: { fmgPage: fmgPageValues.RETURN_USER },
});
return;
}

View file

@ -58,11 +58,6 @@ const routes = [
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];
}
if (getFunnelCookie()?.SuppressConceptFunnel) {
log(" --go to heritage suppressConceptFunnel: ");
await navigateToHeritageFunnel({ shouldSaveSession: false });
@ -190,6 +185,7 @@ const routes = [
log( " --clear to.query");
delete to.query[queryStrings.FMG_PAGE];
//to.query[queryStrings.FMG_PAGE] = "";
log(" --to.query cleared ", JSON.stringify(to.query));
}

View file

@ -18,10 +18,6 @@
<script>
import loader from "@/ux-components/loader/loader";
import { fmgPageValues } from "@/router/router-constants/fmgPage-values";
import analyticsMixin from "@/mixins/analytics-mixin";
import router from "@/router/index.js";
export default {
name: "buttonMain",
@ -50,23 +46,9 @@ export default {
this.buttonText,
true
);
if (!this.isDisabled) {
if (!this.suppressLoader) {
this.isLoaderDisplayed = true;
}
// check session expired and initSession to recreate cookies
if (analyticsMixin.methods.sessionExpired()) {
analyticsMixin.methods.initSession();
router.push({
path: "/",
query: { fmgPage: fmgPageValues.RETURN_USER },
});
} else {
this.$emit("click-event");
}
if (!this.suppressLoader) this.isLoaderDisplayed = true;
this.$emit("click-event");
}
},
resetButtonStyle() {