Merge branch 'release/2024.11.21' into feature/routerLogs
This commit is contained in:
commit
ae87c3653d
2 changed files with 6 additions and 3 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) {
|
||||
|
|
@ -462,7 +465,6 @@ async function navigate(
|
|||
|
||||
log("------------- router index.js navigate start -----------------");
|
||||
log(" --scenario: ", scenario);
|
||||
log(" --currentRoute: ", JSON.stringify(currentRoute));
|
||||
log(" --isSavingNavigation: ", isSavingNavigation);
|
||||
log(" --optionalQuery: ", JSON.stringify(optionalQuery));
|
||||
log(" --optionalParams: ", JSON.stringify(optionalParams));
|
||||
|
|
|
|||
Loading…
Reference in a new issue