From 76f9ec39aae9718736807dc5abe566c530395f23 Mon Sep 17 00:00:00 2001 From: Bill Richardson Date: Wed, 22 Jul 2026 12:56:28 -0400 Subject: [PATCH] Committing to compare via Draft --- src/layouts/address-lookup/address-lookup.vue | 3 --- .../address-vehicles/address-vehicles.vue | 8 +------- .../license-plate-lookup.vue | 5 ----- src/layouts/vehicle-damage/vehicle-damage.vue | 16 +++++++++++++--- .../vin-lookup-methods/vin-lookup-methods.vue | 4 ++-- src/layouts/vin-lookup/vin-lookup.vue | 3 ++- src/mixins/vin-pages-mixin.js | 8 ++++++-- 7 files changed, 24 insertions(+), 23 deletions(-) diff --git a/src/layouts/address-lookup/address-lookup.vue b/src/layouts/address-lookup/address-lookup.vue index b2747a0d..1cce098a 100644 --- a/src/layouts/address-lookup/address-lookup.vue +++ b/src/layouts/address-lookup/address-lookup.vue @@ -344,9 +344,6 @@ export default { { [routerParams.DISPLAY_VEHICLE_CHANGE_ALERT]: true } ); } else if (matchingCars.length === 1) { - if (await this.handleVinRequiredVehicle(this.vin)) { - return; - } await this.navigateForwardWithSingleCarMatch(); } else { this.$router.navigate( diff --git a/src/layouts/address-vehicles/address-vehicles.vue b/src/layouts/address-vehicles/address-vehicles.vue index 40d3fb64..d37bb377 100644 --- a/src/layouts/address-vehicles/address-vehicles.vue +++ b/src/layouts/address-vehicles/address-vehicles.vue @@ -232,10 +232,7 @@ export default { }, async forwardButtonAction() { this.mainStore.resetBailout(); - if (await this.handleVinRequiredVehicle(this.vin)) { - return; - } - + const vinLookup = await useMainStore().lookupVehicleByVin(this.selectedVehicle.vin); if (!vinLookup) { return; @@ -276,9 +273,6 @@ export default { { [routerParams.DISPLAY_VEHICLE_CHANGE_ALERT]: true } ); } else { - if (await this.handleVinRequiredVehicle(this.vin)) { - return; - } await this.navigateForwardWithSingleCarMatch(); } }, diff --git a/src/layouts/license-plate-lookup/license-plate-lookup.vue b/src/layouts/license-plate-lookup/license-plate-lookup.vue index 634ad9fc..885fc66d 100644 --- a/src/layouts/license-plate-lookup/license-plate-lookup.vue +++ b/src/layouts/license-plate-lookup/license-plate-lookup.vue @@ -305,11 +305,6 @@ export default { } }); - const ymmsBailoutEnabled = this.getSettingValue(experimentSettings.ISS_YMMS_VIN_REQUIRED_BAILOUT_ENABLED) === 'true'; - if (ymmsBailoutEnabled && this.mainStore.order.vehicle.vinRequired) { - return this.$router.navigateBailout(bailoutMessage.YMMNotFound()); - } - return this.navigateForward(); }, async navigateForward() { diff --git a/src/layouts/vehicle-damage/vehicle-damage.vue b/src/layouts/vehicle-damage/vehicle-damage.vue index 42ae3603..240bc587 100644 --- a/src/layouts/vehicle-damage/vehicle-damage.vue +++ b/src/layouts/vehicle-damage/vehicle-damage.vue @@ -428,9 +428,19 @@ export default { this.$route ); } else if (this.mainStore.order.vehicle.vin || !this.isWindshieldReplace) { - // If vin already exists or not replacing windshield, get parts/questions and navigate forward - - const partsOrQuestionsResponse = await this.getPartsOrQuestions(); + let partsOrQuestionsResponse; + const isVinRequired = this.mainStore.order.vehicle.vinRequired; + if (isVinRequired) { + this.mainStore.resetBailout(); + partsOrQuestionsResponse = await this.getPartsOrQuestionsV2(); + if (partsOrQuestionsResponse.data.partsOrQuestions.length === 0) { + this.navigateBailout(bailoutMessage.YMMNotFound('No Parts Returned')); + return; + } + } else { + // If vin already exists or not replacing windshield, get parts/questions and navigate forward + partsOrQuestionsResponse = await this.getPartsOrQuestions(); + } // Comes from vehicleQuestionsMixin.navigateForward() await this.navigateForward( diff --git a/src/layouts/vehicle-lookup/vin-lookup-methods/vin-lookup-methods.vue b/src/layouts/vehicle-lookup/vin-lookup-methods/vin-lookup-methods.vue index ea6d97df..6e97bbf1 100644 --- a/src/layouts/vehicle-lookup/vin-lookup-methods/vin-lookup-methods.vue +++ b/src/layouts/vehicle-lookup/vin-lookup-methods/vin-lookup-methods.vue @@ -67,9 +67,9 @@ export default { answers.splice(homeAddressIndex, 1); } - const ymmsBailoutEnabled = this.getSettingValue(experimentSettings.ISS_YMMS_VIN_REQUIRED_BAILOUT_ENABLED) === 'true'; + const ymmsPageEnabled = this.getSettingValue(experimentSettings.ISS_YMMS_VIN_REQUIRED_PAGE_ENABLED) === 'true'; const isVinRequired = useMainStore().order.vehicle.vinRequired; - if (isVinRequired && ymmsBailoutEnabled) { + if (isVinRequired && ymmsPageEnabled) { const vinIndex = answers.findIndex(answer => answer.Name === vinLookupMethodSelections.NOVIN); if (vinIndex >= 0) { answers.splice(vinIndex, 1); diff --git a/src/layouts/vin-lookup/vin-lookup.vue b/src/layouts/vin-lookup/vin-lookup.vue index fecbfcd2..9a937146 100644 --- a/src/layouts/vin-lookup/vin-lookup.vue +++ b/src/layouts/vin-lookup/vin-lookup.vue @@ -137,8 +137,9 @@ export default { return vinYmmFound.toLowerCase() === vinYmmExpected.toLowerCase(); }, vinMask() { + const vinRequired = this.mainStore.order.vehicle.vinRequired === true; // TODO: Side effects in computed. - if (this.vinPopulatedOnPageLoad) { + if (this.vinPopulatedOnPageLoad && !vinRequired) { // TODO: Modify to remove side effects in computed this.activeVehicleLookupAlertType = vehicleLookupAlertTypes.PERFECT_MATCH; this.needToLookupVehicle = false; diff --git a/src/mixins/vin-pages-mixin.js b/src/mixins/vin-pages-mixin.js index 49562b30..56a423f8 100644 --- a/src/mixins/vin-pages-mixin.js +++ b/src/mixins/vin-pages-mixin.js @@ -6,9 +6,13 @@ import bailoutMessage from '@/constants/bailoutMessage'; export default { methods: { async navigateForwardWithSingleCarMatch() { - const result = await useMainStore().getPartsOrQuestions(); + let result; + if (this.mainStore.order.vehicle.vinRequired) { + result = await useMainStore().getPartsOrQuestionsV2(); + } else { + result = await useMainStore().getPartsOrQuestions(); + } const { partsOrQuestions } = result.data; - vehicleQuestionsMixin.methods.navigateForward(partsOrQuestions, this); }, async handleVinRequiredVehicle(vin) {