CSR-2074
CSR-2074 allow skipvin logic when returning through flow from heritage
This commit is contained in:
parent
a8ccf7e1c4
commit
b2b355c5f7
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";
|
||||
|
||||
// Supporting files
|
||||
import { skipVinLookup } from "@/helpers/heritage-integration/navigation-helper";
|
||||
import { fetchCmsContentForPage } from "@/helpers/cms-content-helper";
|
||||
import { settleAllPromises } from "@/helpers/layout-helper";
|
||||
import { storeActions } from "@/constants/store-actions";
|
||||
|
|
@ -365,7 +366,7 @@ export default {
|
|||
return this.navigateForward();
|
||||
},
|
||||
|
||||
navigateForward() {
|
||||
async navigateForward() {
|
||||
const payment = this.$store.getters.payment;
|
||||
const policy = this.$store.getters.policy;
|
||||
|
||||
|
|
@ -376,17 +377,27 @@ export default {
|
|||
policy.policyNumber !== "";
|
||||
|
||||
if (vehicleChangedDuringPolicyLookupInHeritage) {
|
||||
if (store.getters.damage.isRepair) {
|
||||
const skipVin = await skipVinLookup();
|
||||
|
||||
if (skipVin) {
|
||||
this.$router.navigateWithSaving(
|
||||
this.navigationScenarios.CLICKED_FORWARD_WITH_REPAIR_AND_VERIFIED_INSURANCE,
|
||||
this.navigationScenarios.CLICKED_FORWARD_WITHOUT_VIN,
|
||||
this.$route
|
||||
);
|
||||
} else {
|
||||
this.$router.navigateWithSaving(
|
||||
this.navigationScenarios
|
||||
.CLICKED_FORWARD_WITH_REPLACE_AND_VERIFIED_INSURANCE,
|
||||
this.$route
|
||||
);
|
||||
if (store.getters.damage.isRepair) {
|
||||
this.$router.navigateWithSaving(
|
||||
this.navigationScenarios
|
||||
.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
|
||||
|
|
|
|||
Loading…
Reference in a new issue