diff --git a/src/mixins/vehicle-questions-mixin.js b/src/mixins/vehicle-questions-mixin.js index c8d6a554f..60410222c 100644 --- a/src/mixins/vehicle-questions-mixin.js +++ b/src/mixins/vehicle-questions-mixin.js @@ -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