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;
|
||||
}
|
||||
|
||||
const fromHeritage = getQuerystringParameter(queryStrings.FROM_HERITAGE) === "true";
|
||||
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
|
||||
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.
|
||||
else if (from.redirectedFrom === undefined || fromReturnUser) {
|
||||
// if entering the funnel from non-funnel 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.
|
||||
// safeliteHop(payment) cancel or clicking back also trigger it so exclude payment.
|
||||
// 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.
|
||||
const funnelCookieLastTouched = getFunnelCookie()?.LastTouched;
|
||||
if (
|
||||
to?.query?.fmgPage !== fmgPageValues.RETURN_USER &&
|
||||
!fromReturnUser &&
|
||||
!fromHeritage &&
|
||||
!toPaymentPage &&
|
||||
if (fromContentSite &&
|
||||
funnelCookieLastTouched !== null &&
|
||||
funnelCookieLastTouched !== undefined
|
||||
funnelCookieLastTouched !== undefined &&
|
||||
!toReturnUserPage
|
||||
) {
|
||||
log(" --navigate to return user");
|
||||
log(" --from content site navigate to return user");
|
||||
router.push({
|
||||
path: "/",
|
||||
query: { fmgPage: fmgPageValues.RETURN_USER },
|
||||
|
|
@ -118,7 +114,7 @@ const routes = [
|
|||
log(" --clear 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
|
||||
// Remove the parameter after quote release
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue