commit
46862f2e7e
1 changed files with 19 additions and 8 deletions
|
|
@ -93,6 +93,7 @@ import replaceOptionsQuestion from "@/layouts/vehicle-damage/replace-options-que
|
||||||
import alert from "@/ux-components/alert/alert";
|
import alert from "@/ux-components/alert/alert";
|
||||||
|
|
||||||
// Supporting files
|
// Supporting files
|
||||||
|
import { skipVinLookup } from "@/helpers/heritage-integration/navigation-helper";
|
||||||
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
|
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
|
||||||
import { settleAllPromises } from "@/helpers/layout-helper";
|
import { settleAllPromises } from "@/helpers/layout-helper";
|
||||||
import { storeActions } from "@/constants/store-actions";
|
import { storeActions } from "@/constants/store-actions";
|
||||||
|
|
@ -365,7 +366,7 @@ export default {
|
||||||
return this.navigateForward();
|
return this.navigateForward();
|
||||||
},
|
},
|
||||||
|
|
||||||
navigateForward() {
|
async navigateForward() {
|
||||||
const payment = this.$store.getters.payment;
|
const payment = this.$store.getters.payment;
|
||||||
const policy = this.$store.getters.policy;
|
const policy = this.$store.getters.policy;
|
||||||
|
|
||||||
|
|
@ -376,17 +377,27 @@ export default {
|
||||||
policy.policyNumber !== "";
|
policy.policyNumber !== "";
|
||||||
|
|
||||||
if (vehicleChangedDuringPolicyLookupInHeritage) {
|
if (vehicleChangedDuringPolicyLookupInHeritage) {
|
||||||
if (store.getters.damage.isRepair) {
|
const skipVin = await skipVinLookup();
|
||||||
|
|
||||||
|
if (skipVin) {
|
||||||
this.$router.navigateWithSaving(
|
this.$router.navigateWithSaving(
|
||||||
this.navigationScenarios.CLICKED_FORWARD_WITH_REPAIR_AND_VERIFIED_INSURANCE,
|
this.navigationScenarios.CLICKED_FORWARD_WITHOUT_VIN,
|
||||||
this.$route
|
this.$route
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
this.$router.navigateWithSaving(
|
if (store.getters.damage.isRepair) {
|
||||||
this.navigationScenarios
|
this.$router.navigateWithSaving(
|
||||||
.CLICKED_FORWARD_WITH_REPLACE_AND_VERIFIED_INSURANCE,
|
this.navigationScenarios
|
||||||
this.$route
|
.CLICKED_FORWARD_WITH_REPAIR_AND_VERIFIED_INSURANCE,
|
||||||
);
|
this.$route
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
this.$router.navigateWithSaving(
|
||||||
|
this.navigationScenarios
|
||||||
|
.CLICKED_FORWARD_WITH_REPLACE_AND_VERIFIED_INSURANCE,
|
||||||
|
this.$route
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If vin already exists, navigate directly to vin-lookup
|
// If vin already exists, navigate directly to vin-lookup
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue