From 5509910c4c975622da4782e7476ba0820a25e73d Mon Sep 17 00:00:00 2001 From: CarlNation Date: Tue, 6 Dec 2022 09:00:07 -0500 Subject: [PATCH 1/2] CSR-963 correct navigation to part question pages for vin skip --- src/layouts/estimate/estimate.vue | 16 ++++++++++++---- src/router/router-constants/routing-table.js | 16 ++++++++++++++++ src/store/index.js | 8 +++----- 3 files changed, 31 insertions(+), 9 deletions(-) diff --git a/src/layouts/estimate/estimate.vue b/src/layouts/estimate/estimate.vue index 764334544..720de9152 100644 --- a/src/layouts/estimate/estimate.vue +++ b/src/layouts/estimate/estimate.vue @@ -104,6 +104,7 @@ import { vinLookupMethodSelections } from "@/constants/vin-lookup-method-selecti import { navigateToHeritageFunnel } from "@/helpers/heritage-integration/navigation-helper"; import experimentMixin from "@/mixins/experiment-mixin"; import { experimentSettings } from "@/constants/experiments"; +import vinPagesMixin from "@/mixins/vin-pages-mixin"; // Define Validation Rules defineRule("zip-required", required(errorMessages.SERVICE_ZIP_REQUIRED)); @@ -120,6 +121,7 @@ defineRule("option-required", required(errorMessages.OPTION_REQUIRED)); export default { name: "estimate", + mixins: [vinPagesMixin], data() { return { selectedVinLookupMethod: null, @@ -203,10 +205,16 @@ export default { } this.displayNonServiceableZipAlert = false; - return this.$router.navigateWithSaving( - this.navigationScenarios.CLICKED_FORWARD_WITH_NO_QUESTIONS, - this.$route - ); + if (this.isRepair){ + return this.$router.navigateWithSaving( + this.navigationScenarios.CLICKED_FORWARD_WITH_NO_QUESTIONS, + this.$route + ); + } + else{ + // if we're skipping the vin-lookup but it's not a repair, we still need to get the parts + await this.navigateForwardWithSingleCarMatch(); + } } if (this.selectedVinLookupMethod === vinLookupMethodSelections.MANUALVIN) { diff --git a/src/router/router-constants/routing-table.js b/src/router/router-constants/routing-table.js index 1c060b082..a431e342e 100644 --- a/src/router/router-constants/routing-table.js +++ b/src/router/router-constants/routing-table.js @@ -241,6 +241,22 @@ const routingTable = function (store) { scenario: navigationScenarios.CLICKED_FORWARD_WITH_NO_QUESTIONS, destinationFmgPageValue: fmgPageValues.QUOTE, }, + { + scenario: navigationScenarios.CLICKED_FORWARD_WITH_PART_QUESTIONS, + destinationFmgPageValue: fmgPageValues.PART_QUESTIONS, + }, + { + scenario: navigationScenarios.CLICKED_FORWARD_WITH_MULTIPLE_PARTS_TO_CHOOSE, + destinationFmgPageValue: fmgPageValues.VEHICLE_PARTS, + }, + { + scenario: navigationScenarios.CLICKED_FORWARD_WITH_MOLDING_QUESTIONS, + destinationFmgPageValue: fmgPageValues.MOLDING_QUESTIONS, + }, + { + scenario: navigationScenarios.CLICKED_FORWARD_WITH_CAPABILITY_QUESTIONS, + destinationFmgPageValue: fmgPageValues.CAPABILITY_QUESTIONS, + }, ], }, { diff --git a/src/store/index.js b/src/store/index.js index 29bd7c0c6..12e718e5d 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1432,11 +1432,9 @@ export const actions = { default: } - if ( - context.state.order.vehicle.make.toLowerCase() === "ford" && - context.state.order.vehicle.year >= 2018 - ) - return true; + // if (context.state.order.vehicle.make.toLowerCase() === "ford" && context.state.order.vehicle.year >= 2018) { + // return true; + // } if ( context.state.order.vehicle.make.toLowerCase() === "bmw" && From 5edca889aee5ebfdb29d7bf65be3fbbfacc1ffc5 Mon Sep 17 00:00:00 2001 From: CarlNation Date: Tue, 6 Dec 2022 09:10:49 -0500 Subject: [PATCH 2/2] CSR-963 uncomment ford test and run prettier --- src/layouts/estimate/estimate.vue | 13 ++++++------- src/store/index.js | 9 ++++++--- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/layouts/estimate/estimate.vue b/src/layouts/estimate/estimate.vue index 720de9152..9d31083d6 100644 --- a/src/layouts/estimate/estimate.vue +++ b/src/layouts/estimate/estimate.vue @@ -205,15 +205,14 @@ export default { } this.displayNonServiceableZipAlert = false; - if (this.isRepair){ + if (this.isRepair) { return this.$router.navigateWithSaving( - this.navigationScenarios.CLICKED_FORWARD_WITH_NO_QUESTIONS, - this.$route + this.navigationScenarios.CLICKED_FORWARD_WITH_NO_QUESTIONS, + this.$route ); - } - else{ - // if we're skipping the vin-lookup but it's not a repair, we still need to get the parts - await this.navigateForwardWithSingleCarMatch(); + } else { + // if we're skipping the vin-lookup but it's not a repair, we still need to get the parts + await this.navigateForwardWithSingleCarMatch(); } } diff --git a/src/store/index.js b/src/store/index.js index 12e718e5d..32c4f71b6 100644 --- a/src/store/index.js +++ b/src/store/index.js @@ -1432,9 +1432,12 @@ export const actions = { default: } - // if (context.state.order.vehicle.make.toLowerCase() === "ford" && context.state.order.vehicle.year >= 2018) { - // return true; - // } + if ( + context.state.order.vehicle.make.toLowerCase() === "ford" && + context.state.order.vehicle.year >= 2018 + ) { + return true; + } if ( context.state.order.vehicle.make.toLowerCase() === "bmw" &&