parent
64c09c2429
commit
856ae81993
3 changed files with 13 additions and 45 deletions
|
|
@ -45,9 +45,6 @@
|
||||||
<script>
|
<script>
|
||||||
import textLink from "@/ux-components/text-link/text-link";
|
import textLink from "@/ux-components/text-link/text-link";
|
||||||
import buttonMain from "@/ux-components/button-main/button-main";
|
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 {
|
export default {
|
||||||
name: "navbar",
|
name: "navbar",
|
||||||
|
|
@ -100,17 +97,7 @@ export default {
|
||||||
this.$emit("ForwardClicked");
|
this.$emit("ForwardClicked");
|
||||||
},
|
},
|
||||||
linkClick() {
|
linkClick() {
|
||||||
// check session expired and initSession to recreate cookies
|
this.$emit("BackClicked");
|
||||||
if (analyticsMixin.methods.sessionExpired()) {
|
|
||||||
analyticsMixin.methods.initSession();
|
|
||||||
|
|
||||||
router.push({
|
|
||||||
path: "/",
|
|
||||||
query: { fmgPage: fmgPageValues.RETURN_USER },
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.$emit("BackClicked");
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -712,8 +712,11 @@ 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
|
async validateSession() {
|
||||||
sessionExpired() {
|
// 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 fromHeritage = getQuerystringParameter(queryStrings.FROM_HERITAGE) === "true";
|
||||||
const funnelCookieLastTouched = getFunnelCookie()?.LastTouched;
|
const funnelCookieLastTouched = getFunnelCookie()?.LastTouched;
|
||||||
if (
|
if (
|
||||||
|
|
@ -722,15 +725,11 @@ export default {
|
||||||
funnelCookieLastTouched !== null &&
|
funnelCookieLastTouched !== null &&
|
||||||
funnelCookieLastTouched !== undefined
|
funnelCookieLastTouched !== undefined
|
||||||
) {
|
) {
|
||||||
return true;
|
await this.initSession();
|
||||||
} else {
|
router.push({
|
||||||
return false;
|
path: "/",
|
||||||
}
|
query: { fmgPage: fmgPageValues.RETURN_USER },
|
||||||
},
|
});
|
||||||
|
|
||||||
async validateSession() {
|
|
||||||
// do not init session if it is expired. let the click event on button-main handle session expired logic
|
|
||||||
if (this.sessionExpired()) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,10 +18,6 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import loader from "@/ux-components/loader/loader";
|
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 {
|
export default {
|
||||||
name: "buttonMain",
|
name: "buttonMain",
|
||||||
|
|
@ -50,23 +46,9 @@ export default {
|
||||||
this.buttonText,
|
this.buttonText,
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!this.isDisabled) {
|
if (!this.isDisabled) {
|
||||||
if (!this.suppressLoader) {
|
if (!this.suppressLoader) this.isLoaderDisplayed = true;
|
||||||
this.isLoaderDisplayed = true;
|
this.$emit("click-event");
|
||||||
}
|
|
||||||
|
|
||||||
// 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");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
resetButtonStyle() {
|
resetButtonStyle() {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue