Merge pull request #2118 from Safelite/feature/CSR-2386
CSR-2386 nav corrections
This commit is contained in:
commit
d68ba1bde6
2 changed files with 6 additions and 2 deletions
|
|
@ -30,11 +30,12 @@ export async function getPageToRouteExistingOrderTo(toRoute = {}) {
|
|||
export async function getDirectNavigation(toRoute) {
|
||||
const fmgPageValue = toRoute.query[queryStrings.FMG_PAGE];
|
||||
|
||||
// Verified insurance users need to be routed around some pages
|
||||
// Verified insurance users need to be routed around some pages. Same goes for C&C unverified 6 digit referrals
|
||||
// vehicle -> vehicle-damage
|
||||
// quote -> vin-lookup/estimate
|
||||
// insurance-company -> vin-lookup/estimate
|
||||
if (store.getters.payment?.insuranceCoverage?.isVerified) {
|
||||
if (store.getters.payment?.insuranceCoverage?.isVerified ||
|
||||
store.getters.order?.referralNumber?.length === 6) {
|
||||
if (fmgPageValue === fmgPageValues.VEHICLE) {
|
||||
return fmgPageValues.VEHICLE_DAMAGE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,6 +83,7 @@ const routes = [
|
|||
else if (from.redirectedFrom === undefined) {
|
||||
// clear the saveSessionPromise - if it exists in the vuex store but a new instance was created
|
||||
// the saveSessionPromise will no longer point to a valid promise
|
||||
log(" --clear promise");
|
||||
baseMixin.methods.dispatchStoreAction(storeActions.RESET_SAVE_SESSION_PROMISE);
|
||||
|
||||
if (!to.query.fmgPage?.startsWith("payment")) {
|
||||
|
|
@ -104,6 +105,7 @@ const routes = [
|
|||
storeMutations.UPDATE_REFERRAL_CORRELATION_ID,
|
||||
correlationId
|
||||
);
|
||||
log(" --update cookie");
|
||||
updateOrCreateFunnelCookie();
|
||||
}
|
||||
|
||||
|
|
@ -136,6 +138,7 @@ const routes = [
|
|||
}
|
||||
|
||||
const pageToRedirectTo = await getPageToRouteExistingOrderTo(to);
|
||||
log(" --pageToRedirectTo ", JSON.stringify(pageToRedirectTo));
|
||||
|
||||
// This logic may determine that the user should be sent to heritage -- if so, do that here.
|
||||
if (pageToRedirectTo === fmgPageValues.HERITAGE) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue