CSR-2386 nav corrections
CSR-2386 nav corrections
This commit is contained in:
parent
579beb937a
commit
b0d6ad304e
2 changed files with 6 additions and 2 deletions
|
|
@ -30,11 +30,12 @@ export async function getPageToRouteExistingOrderTo(toRoute = {}) {
|
||||||
export async function getDirectNavigation(toRoute) {
|
export async function getDirectNavigation(toRoute) {
|
||||||
const fmgPageValue = toRoute.query[queryStrings.FMG_PAGE];
|
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
|
// vehicle -> vehicle-damage
|
||||||
// quote -> vin-lookup/estimate
|
// quote -> vin-lookup/estimate
|
||||||
// insurance-company -> 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) {
|
if (fmgPageValue === fmgPageValues.VEHICLE) {
|
||||||
return fmgPageValues.VEHICLE_DAMAGE;
|
return fmgPageValues.VEHICLE_DAMAGE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,7 @@ const routes = [
|
||||||
else if (from.redirectedFrom === undefined) {
|
else if (from.redirectedFrom === undefined) {
|
||||||
// clear the saveSessionPromise - if it exists in the vuex store but a new instance was created
|
// 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
|
// the saveSessionPromise will no longer point to a valid promise
|
||||||
|
log(" --clear promise");
|
||||||
baseMixin.methods.dispatchStoreAction(storeActions.RESET_SAVE_SESSION_PROMISE);
|
baseMixin.methods.dispatchStoreAction(storeActions.RESET_SAVE_SESSION_PROMISE);
|
||||||
|
|
||||||
if (!to.query.fmgPage?.startsWith("payment")) {
|
if (!to.query.fmgPage?.startsWith("payment")) {
|
||||||
|
|
@ -104,6 +105,7 @@ const routes = [
|
||||||
storeMutations.UPDATE_REFERRAL_CORRELATION_ID,
|
storeMutations.UPDATE_REFERRAL_CORRELATION_ID,
|
||||||
correlationId
|
correlationId
|
||||||
);
|
);
|
||||||
|
log(" --update cookie");
|
||||||
updateOrCreateFunnelCookie();
|
updateOrCreateFunnelCookie();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -136,6 +138,7 @@ const routes = [
|
||||||
}
|
}
|
||||||
|
|
||||||
const pageToRedirectTo = await getPageToRouteExistingOrderTo(to);
|
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.
|
// This logic may determine that the user should be sent to heritage -- if so, do that here.
|
||||||
if (pageToRedirectTo === fmgPageValues.HERITAGE) {
|
if (pageToRedirectTo === fmgPageValues.HERITAGE) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue