Merge pull request #1296 from Safelite/feature/CSR-1582-revert-first-pr
Revert "Merge pull request #1278 from Safelite/feature/CSR-1582"
This commit is contained in:
commit
e3dfbb6a47
2 changed files with 2 additions and 16 deletions
|
|
@ -98,7 +98,7 @@ export async function skipVinLookupNotRepair() {
|
||||||
/*
|
/*
|
||||||
Logic for getting the last "valid" page a user visited.
|
Logic for getting the last "valid" page a user visited.
|
||||||
*/
|
*/
|
||||||
export async function getLatestPageForRedirection() {
|
async function getLatestPageForRedirection() {
|
||||||
// If this is a non-CTA navigation, determine where to send the user based on page prerequisites.
|
// If this is a non-CTA navigation, determine where to send the user based on page prerequisites.
|
||||||
// This also works if a user has a 'fmg' start_type query string but no current order.
|
// This also works if a user has a 'fmg' start_type query string but no current order.
|
||||||
// That shouldn't happen, but it's possible.
|
// That shouldn't happen, but it's possible.
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@ import { loadSessionIfPresent, saveSession } from "@/helpers/heritage-integratio
|
||||||
import {
|
import {
|
||||||
getPageToRouteExistingOrderTo,
|
getPageToRouteExistingOrderTo,
|
||||||
navigateToHeritageFunnel,
|
navigateToHeritageFunnel,
|
||||||
getLatestPageForRedirection,
|
|
||||||
} from "@/helpers/heritage-integration/navigation-helper";
|
} from "@/helpers/heritage-integration/navigation-helper";
|
||||||
|
|
||||||
import baseMixin from "@/mixins/base-mixin";
|
import baseMixin from "@/mixins/base-mixin";
|
||||||
|
|
@ -125,21 +124,8 @@ const routes = [
|
||||||
.filter((x) => x.name === routeData[0].name)[0]
|
.filter((x) => x.name === routeData[0].name)[0]
|
||||||
.components.default();
|
.components.default();
|
||||||
|
|
||||||
// The save quote link via heritage default.aspx... will land here.
|
|
||||||
// Heritage will attempt to send the customer to the lastest page in NextGen possible.
|
|
||||||
// If the link was created prior to reaching the end of NextGen, the save quote link
|
|
||||||
// was going to GoToFunnelStartOn404. This will send as deep into NextGen as possible.
|
|
||||||
if (!arePagePrerequisitesValid(nextComponent)) {
|
if (!arePagePrerequisitesValid(nextComponent)) {
|
||||||
var pageToRedirectTo = await getLatestPageForRedirection();
|
await GoToFunnelStartOn404(next);
|
||||||
if (pageToRedirectTo) {
|
|
||||||
return next({
|
|
||||||
path: "/",
|
|
||||||
query: { fmgPage: pageToRedirectTo },
|
|
||||||
params: to.params,
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
await GoToFunnelStartOn404(next);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Assign current query string parameters, as well as our fmgPage one.
|
// Assign current query string parameters, as well as our fmgPage one.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue