CASH-2380 potential approach to logic to skip part question pages
This commit is contained in:
parent
885e8b2f39
commit
382374021b
1 changed files with 15 additions and 0 deletions
|
|
@ -3,6 +3,10 @@ import { storeMutations } from "@/constants/store-mutations.js";
|
|||
import { navigationScenarios } from "@/router/constants/navigation-scenarios";
|
||||
import { storeActions } from "@/constants/store-actions";
|
||||
import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper";
|
||||
import { singleWindshieldCarIds } from "@/constants/single-windshield-carids";
|
||||
import { skipVinCaptureCarIds } from "@/constants/skip-vin-capture-car-ids.js";
|
||||
import { skipPartsQuestionsCarIds } from "@/constants/skip-parts-questions-car-ids.js";
|
||||
import { getIsWindshieldOnly } from "@/helpers/damage-helper";
|
||||
import baseMixin from "@/mixins/base-mixin.js";
|
||||
import store from "@/store";
|
||||
|
||||
|
|
@ -366,10 +370,17 @@ export default {
|
|||
this.hasGlassLocationWithMultipleParts(partsOrQuestions);
|
||||
const hasChildPartQuestions = this.hasChildPartQuestions(partsOrQuestions);
|
||||
const hasCapabilityQuestions = this.hasCapabilityQuestions(partsOrQuestions);
|
||||
const isWindshieldOnly = getIsWindshieldOnly();
|
||||
const isIncludedInSkipPartsQuestionsCarIds = skipPartsQuestionsCarIds.includes(vm.carId);
|
||||
|
||||
console.log("isWindshieldOnly: ", isWindshieldOnly);
|
||||
console.log("isIncludedInSkipPartsQuestionsCarIds: ", isIncludedInSkipPartsQuestionsCarIds);
|
||||
|
||||
if (
|
||||
hasPartQuestions &&
|
||||
this.currentPageComesBeforePage(currentPage, routeData.PART_QUESTIONS.name)
|
||||
&& !isWindshieldOnly
|
||||
&& !isIncludedInSkipPartsQuestionsCarIds
|
||||
) {
|
||||
self.$router.navigateWithPageData(
|
||||
self.navigationScenarios.CLICKED_FORWARD_WITH_PART_QUESTIONS,
|
||||
|
|
@ -379,6 +390,8 @@ export default {
|
|||
} else if (
|
||||
hasGlassLocationWithMultipleParts &&
|
||||
this.currentPageComesBeforePage(currentPage, routeData.VEHICLE_PARTS.name)
|
||||
&& !isWindshieldOnly
|
||||
&& !isIncludedInSkipPartsQuestionsCarIds
|
||||
) {
|
||||
// if multiple parts on any glass
|
||||
// go to vehicle-parts page and pass the partsData
|
||||
|
|
@ -390,6 +403,8 @@ export default {
|
|||
} else if (
|
||||
hasChildPartQuestions &&
|
||||
this.currentPageComesBeforePage(currentPage, routeData.MOLDING_QUESTIONS.name)
|
||||
&& !isWindshieldOnly
|
||||
&& !isIncludedInSkipPartsQuestionsCarIds
|
||||
) {
|
||||
// if any childpart questions
|
||||
// go to molding-questions page and pass the partsData
|
||||
|
|
|
|||
Loading…
Reference in a new issue