Committing to compare via Draft

This commit is contained in:
Bill Richardson 2026-07-22 12:56:28 -04:00
parent 457c112243
commit 76f9ec39aa
7 changed files with 24 additions and 23 deletions

View file

@ -344,9 +344,6 @@ export default {
{ [routerParams.DISPLAY_VEHICLE_CHANGE_ALERT]: true } { [routerParams.DISPLAY_VEHICLE_CHANGE_ALERT]: true }
); );
} else if (matchingCars.length === 1) { } else if (matchingCars.length === 1) {
if (await this.handleVinRequiredVehicle(this.vin)) {
return;
}
await this.navigateForwardWithSingleCarMatch(); await this.navigateForwardWithSingleCarMatch();
} else { } else {
this.$router.navigate( this.$router.navigate(

View file

@ -232,9 +232,6 @@ export default {
}, },
async forwardButtonAction() { async forwardButtonAction() {
this.mainStore.resetBailout(); this.mainStore.resetBailout();
if (await this.handleVinRequiredVehicle(this.vin)) {
return;
}
const vinLookup = await useMainStore().lookupVehicleByVin(this.selectedVehicle.vin); const vinLookup = await useMainStore().lookupVehicleByVin(this.selectedVehicle.vin);
if (!vinLookup) { if (!vinLookup) {
@ -276,9 +273,6 @@ export default {
{ [routerParams.DISPLAY_VEHICLE_CHANGE_ALERT]: true } { [routerParams.DISPLAY_VEHICLE_CHANGE_ALERT]: true }
); );
} else { } else {
if (await this.handleVinRequiredVehicle(this.vin)) {
return;
}
await this.navigateForwardWithSingleCarMatch(); await this.navigateForwardWithSingleCarMatch();
} }
}, },

View file

@ -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(); return this.navigateForward();
}, },
async navigateForward() { async navigateForward() {

View file

@ -428,9 +428,19 @@ export default {
this.$route this.$route
); );
} else if (this.mainStore.order.vehicle.vin || !this.isWindshieldReplace) { } else if (this.mainStore.order.vehicle.vin || !this.isWindshieldReplace) {
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 // If vin already exists or not replacing windshield, get parts/questions and navigate forward
partsOrQuestionsResponse = await this.getPartsOrQuestions();
const partsOrQuestionsResponse = await this.getPartsOrQuestions(); }
// Comes from vehicleQuestionsMixin.navigateForward() // Comes from vehicleQuestionsMixin.navigateForward()
await this.navigateForward( await this.navigateForward(

View file

@ -67,9 +67,9 @@ export default {
answers.splice(homeAddressIndex, 1); 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; const isVinRequired = useMainStore().order.vehicle.vinRequired;
if (isVinRequired && ymmsBailoutEnabled) { if (isVinRequired && ymmsPageEnabled) {
const vinIndex = answers.findIndex(answer => answer.Name === vinLookupMethodSelections.NOVIN); const vinIndex = answers.findIndex(answer => answer.Name === vinLookupMethodSelections.NOVIN);
if (vinIndex >= 0) { if (vinIndex >= 0) {
answers.splice(vinIndex, 1); answers.splice(vinIndex, 1);

View file

@ -137,8 +137,9 @@ export default {
return vinYmmFound.toLowerCase() === vinYmmExpected.toLowerCase(); return vinYmmFound.toLowerCase() === vinYmmExpected.toLowerCase();
}, },
vinMask() { vinMask() {
const vinRequired = this.mainStore.order.vehicle.vinRequired === true;
// TODO: Side effects in computed. // TODO: Side effects in computed.
if (this.vinPopulatedOnPageLoad) { if (this.vinPopulatedOnPageLoad && !vinRequired) {
// TODO: Modify to remove side effects in computed // TODO: Modify to remove side effects in computed
this.activeVehicleLookupAlertType = vehicleLookupAlertTypes.PERFECT_MATCH; this.activeVehicleLookupAlertType = vehicleLookupAlertTypes.PERFECT_MATCH;
this.needToLookupVehicle = false; this.needToLookupVehicle = false;

View file

@ -6,9 +6,13 @@ import bailoutMessage from '@/constants/bailoutMessage';
export default { export default {
methods: { methods: {
async navigateForwardWithSingleCarMatch() { 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; const { partsOrQuestions } = result.data;
vehicleQuestionsMixin.methods.navigateForward(partsOrQuestions, this); vehicleQuestionsMixin.methods.navigateForward(partsOrQuestions, this);
}, },
async handleVinRequiredVehicle(vin) { async handleVinRequiredVehicle(vin) {