CSR-2177
CSR-2177 we need to allow navigation forward on a policy vehicle change so that we call parts again for the new vehicle. Having the jump back to heritage on service-zip prevents parts from being called again so we end up in heritage with no items on the order. Nav to heritage will still happen in the vehicle-questions-mixin logic or the quote beforerouteenter logic.
This commit is contained in:
parent
8262294b74
commit
b6df3ac8d2
5 changed files with 22 additions and 22 deletions
|
|
@ -33,7 +33,7 @@ export async function getDirectNavigation(toRoute) {
|
|||
// vehicle -> vehicle-damage
|
||||
// quote -> vin-lookup/estimate
|
||||
// insurance-company -> vin-lookup/estimate
|
||||
if (store.getters.requiresVerifiedRedirecting) {
|
||||
if (store.getters.payment?.insuranceCoverage?.isVerified) {
|
||||
if (fmgPageValue === fmgPageValues.VEHICLE) {
|
||||
return fmgPageValues.VEHICLE_DAMAGE;
|
||||
}
|
||||
|
|
@ -132,7 +132,7 @@ export async function navigateToHeritageFunnel({ shouldSaveSession, pageNameToLo
|
|||
) {
|
||||
heritageParms["forceEndToEndInsurance"] = true;
|
||||
}
|
||||
|
||||
|
||||
router.navigateToExternalUrl(externalUrls.HERITAGE_FUNNEL, heritageParms);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -125,6 +125,7 @@ import { partTypeStrings } from "@/constants/part-type-strings";
|
|||
import { containsLineItemWithPartType } from "@/helpers/service-package-helper";
|
||||
import { nextTick } from "vue";
|
||||
import { packageNames } from "@/constants/package-names";
|
||||
import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper";
|
||||
defineRule("option-required", required(errorMessages.OPTION_REQUIRED));
|
||||
|
||||
export default {
|
||||
|
|
@ -271,6 +272,20 @@ export default {
|
|||
validateAlerts[0].shouldAutoFade
|
||||
);
|
||||
}
|
||||
|
||||
const payment = store.getters.payment;
|
||||
const policy = store.getters.policy;
|
||||
const vehicleChangedDuringPolicyLookupInHeritage =
|
||||
payment.isInsurance &&
|
||||
payment.insuranceCoverage.coverageStatus &&
|
||||
policy.policyNumber !== "";
|
||||
|
||||
// This is a safeguard to prevent insurance from seeing quote page again.
|
||||
// Usually this is caught in vehicle-questions-mixin with a referral length 6 check
|
||||
if (vehicleChangedDuringPolicyLookupInHeritage) {
|
||||
navigateToHeritageFunnel({ shouldSaveSession: true, pageNameToLog: "quote" });
|
||||
}
|
||||
|
||||
if (store.getters.isExternalParameter) {
|
||||
if (store.getters.externalParameterQuote.isInsurance == true) {
|
||||
vm.isInsuranceSelected = true;
|
||||
|
|
|
|||
|
|
@ -87,7 +87,6 @@ import {
|
|||
skipVinLookupNotRepair,
|
||||
} from "@/helpers/heritage-integration/navigation-helper";
|
||||
import vinPagesMixin from "@/mixins/vin-pages-mixin";
|
||||
import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper";
|
||||
import { saveSession } from "@/helpers/heritage-integration/order-helper.js";
|
||||
import baseMixin from "@/mixins/base-mixin.js";
|
||||
import { queryStrings } from "@/constants/query-strings";
|
||||
|
|
@ -208,17 +207,7 @@ export default {
|
|||
const payment = this.$store.getters.payment;
|
||||
const policy = this.$store.getters.policy;
|
||||
|
||||
const vehicleChangedDuringPolicyLookupInHeritage =
|
||||
payment.isInsurance &&
|
||||
payment.insuranceCoverage.coverageStatus &&
|
||||
policy.policyNumber !== "";
|
||||
|
||||
if (vehicleChangedDuringPolicyLookupInHeritage) {
|
||||
navigateToHeritageFunnel({
|
||||
shouldSaveSession: true,
|
||||
pageNameToLog: "estimate",
|
||||
});
|
||||
} else if (this.$store.getters.order.referralNumber?.length === 6) {
|
||||
if (this.$store.getters.order.referralNumber?.length === 6) {
|
||||
await this.navigateForwardWithSingleCarMatch();
|
||||
} else if (this.isRepair) {
|
||||
const supportingItemsPromise = await this.dispatchStoreActionWithLogging(
|
||||
|
|
|
|||
|
|
@ -398,11 +398,7 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
isDisabled(options) {
|
||||
if (
|
||||
!options.length ||
|
||||
store.getters.requiresVerifiedRedirecting ||
|
||||
getFunnelCookie()?.HasDelayedClaimRegistration
|
||||
) {
|
||||
if (!options.length || store.getters.payment.insuranceCoverage.isVerified) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ const routes = [
|
|||
// Reroute around pages that should not be available.
|
||||
|
||||
// Exception 1: Integrated Users should not see vehicle or quote pages.
|
||||
if (store.getters.requiresVerifiedRedirecting) {
|
||||
if (store.getters.payment?.insuranceCoverage?.isVerified) {
|
||||
if (to.query.fmgPage === fmgPageValues.VEHICLE) {
|
||||
to.query.fmgPage = fmgPageValues.VEHICLE_DAMAGE;
|
||||
} else if (
|
||||
|
|
@ -521,7 +521,7 @@ async function DisplayPageError() {
|
|||
// we use the pageError querystring as a counter to how many times a user has experienced an error and been routed here.
|
||||
// once they receive more than 1 pageerrors, we'll reset their state to hopefully correct any issues they may be having.
|
||||
var navPage = fmgPageValues.VEHICLE;
|
||||
if (store.getters.requiresVerifiedRedirecting) {
|
||||
if (store.getters.payment?.insuranceCoverage?.isVerified) {
|
||||
navPage = fmgPageValues.VEHICLE_DAMAGE;
|
||||
}
|
||||
|
||||
|
|
@ -587,7 +587,7 @@ async function runExperiments(nextPage) {
|
|||
}
|
||||
|
||||
function getRedirectedStartPage() {
|
||||
if (store.getters.requiresVerifiedRedirecting) {
|
||||
if (store.getters.payment?.insuranceCoverage?.isVerified) {
|
||||
return fmgPageValues.VEHICLE_DAMAGE;
|
||||
} else {
|
||||
return funnelStartPageName;
|
||||
|
|
|
|||
Loading…
Reference in a new issue