CASH-126
CASH-126 we are only going to check the content site as an external site that triggers the return user page
This commit is contained in:
parent
fd98ed884c
commit
e409ae43a2
1 changed files with 9 additions and 13 deletions
|
|
@ -80,9 +80,9 @@ const routes = [
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const fromHeritage = getQuerystringParameter(queryStrings.FROM_HERITAGE) === "true";
|
|
||||||
const fromReturnUser = from?.name === fmgPageValues.RETURN_USER;
|
const fromReturnUser = from?.name === fmgPageValues.RETURN_USER;
|
||||||
const toPaymentPage = to.query.fmgPage?.startsWith("payment");
|
const fromContentSite = getQuerystringParameter(queryStrings.START_TYPE) === "fmg";
|
||||||
|
const toReturnUserPage = to.query?.fmgPage === fmgPageValues.RETURN_USER;
|
||||||
|
|
||||||
// Intercept all navigation if a submitted order exists in storage
|
// Intercept all navigation if a submitted order exists in storage
|
||||||
if (window.sessionStorage.getItem("submittedOrder") !== null) {
|
if (window.sessionStorage.getItem("submittedOrder") !== null) {
|
||||||
|
|
@ -93,19 +93,15 @@ 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 non-funnel 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 funnel cookie.
|
||||||
// if so, send them to return-user page. this is catching navigation from an external page.
|
// if so, send them to return-user page.
|
||||||
// safeliteHop(payment) cancel or clicking back also trigger it so exclude payment.
|
|
||||||
const funnelCookieLastTouched = getFunnelCookie()?.LastTouched;
|
const funnelCookieLastTouched = getFunnelCookie()?.LastTouched;
|
||||||
if (
|
if (fromContentSite &&
|
||||||
to?.query?.fmgPage !== fmgPageValues.RETURN_USER &&
|
|
||||||
!fromReturnUser &&
|
|
||||||
!fromHeritage &&
|
|
||||||
!toPaymentPage &&
|
|
||||||
funnelCookieLastTouched !== null &&
|
funnelCookieLastTouched !== null &&
|
||||||
funnelCookieLastTouched !== undefined
|
funnelCookieLastTouched !== undefined &&
|
||||||
|
!toReturnUserPage
|
||||||
) {
|
) {
|
||||||
log(" --navigate to return user");
|
log(" --from content site navigate to return user");
|
||||||
router.push({
|
router.push({
|
||||||
path: "/",
|
path: "/",
|
||||||
query: { fmgPage: fmgPageValues.RETURN_USER },
|
query: { fmgPage: fmgPageValues.RETURN_USER },
|
||||||
|
|
@ -118,7 +114,7 @@ const routes = [
|
||||||
log(" --clear promise");
|
log(" --clear promise");
|
||||||
baseMixin.methods.dispatchStoreAction(storeActions.RESET_SAVE_SESSION_PROMISE);
|
baseMixin.methods.dispatchStoreAction(storeActions.RESET_SAVE_SESSION_PROMISE);
|
||||||
|
|
||||||
if (!toPaymentPage) {
|
if (!to.query.fmgPage?.startsWith("payment")) {
|
||||||
//payment pages used to return from safelitehop so exclude here
|
//payment pages used to return from safelitehop so exclude here
|
||||||
// Remove the parameter after quote release
|
// Remove the parameter after quote release
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue