diff --git a/src/fmg-components/save-progress-popup-question/save-progress-popup-question.vue b/src/fmg-components/save-progress-popup-question/save-progress-popup-question.vue index 4ab1213c4..808163fe6 100644 --- a/src/fmg-components/save-progress-popup-question/save-progress-popup-question.vue +++ b/src/fmg-components/save-progress-popup-question/save-progress-popup-question.vue @@ -148,7 +148,7 @@ export default { position: relative; color: $black; border: none; - border-radius: .25rem; + border-radius: 0.25rem; font-weight: 900; font-size: 0.875rem; text-align: center; diff --git a/src/mixins/analytics-mixin.js b/src/mixins/analytics-mixin.js index 136c0ef14..114cacbfb 100644 --- a/src/mixins/analytics-mixin.js +++ b/src/mixins/analytics-mixin.js @@ -27,6 +27,8 @@ import store from "@/store"; import baseMixin from "@/mixins/base-mixin"; import { applicationConfig } from "../constants/application-config"; import { getFunnelCookie } from "@/helpers/heritage-integration/cookie-helper"; +import { fmgPageValues } from "@/router/router-constants/fmgPage-values"; +import router from "@/router/index.js"; export default { methods: { @@ -721,7 +723,10 @@ export default { funnelCookieLastTouched !== undefined ) { await this.initSession(); - window.location.href = applicationConfig.RETURN_USER_PAGE; + router.push({ + path: "/", + query: { fmgPage: fmgPageValues.RETURN_USER }, + }); return; } diff --git a/src/router/index.js b/src/router/index.js index f04c0613d..594630221 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -103,7 +103,11 @@ const routes = [ funnelCookieLastTouched !== undefined ) { log(" --navigate to return user"); - NavigateToReturnUser(next, to); + router.push({ + path: "/", + query: { fmgPage: fmgPageValues.RETURN_USER }, + }); + return; } // clear the saveSessionPromise - if it exists in the vuex store but a new instance was created @@ -651,42 +655,6 @@ function GetRouteInfoFromPageName(pageName) { return routeData; } -async function NavigateToReturnUser(next, to) { - const returnRoute = GetRouteInfoFromPageName(fmgPageValues.RETURN_USER); - log("--returnRoute:", returnRoute); - - if (router.hasRoute(to.query.fmgPage)) { - // Since our route is already in scope, we can grab the component from it and call the arePagePrerequisitesValid function. - let component = router - .getRoutes() - .filter((x) => x.name === fmgPageValues.RETURN_USER)[0].components; - - log("--return-user component:", component); - - // If the component hasn't been loaded fully, load it before we check prerequisites. - if (component.default.methods === undefined) { - component = await component.default(); - } - - log(" --has route for return-user:", fmgPageValues.RETURN_USER); - return next({ name: fmgPageValues.RETURN_USER, query: to.query, params: to.params }); - } else { - log(" --add route for return-user:", fmgPageValues.RETURN_USER); - router.addRoute({ - path: returnRoute[0].path, // Always the same path, because we control it with query strings. - name: returnRoute[0].name, - component: returnRoute[0].component, - }); - - next({ - name: returnRoute[0].name, - query: Object.assign(to.query, { fmgPage: returnRoute[0].name }), - params: to.params, - }); - return; - } -} - // Go to our start page on a 404. function GoToFunnelStartOn404(next, errorPayload = null) { if (errorPayload !== null) { diff --git a/src/ux-components/button-main/button-main.vue b/src/ux-components/button-main/button-main.vue index 848cf3866..7980adf99 100644 --- a/src/ux-components/button-main/button-main.vue +++ b/src/ux-components/button-main/button-main.vue @@ -5,7 +5,7 @@ :class="[ isPrimary ? 'btn-primary' : 'btn-secondary', isFloat ? 'float-end' : '', - (isLoaderDisplayed && !suppressLoader) ? 'has-loader' : '', + isLoaderDisplayed && !suppressLoader ? 'has-loader' : '', ]" @click="clicked"> {{ this.buttonText }}