Committing to compare via Draft
This commit is contained in:
parent
457c112243
commit
76f9ec39aa
7 changed files with 24 additions and 23 deletions
|
|
@ -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(
|
||||||
|
|
|
||||||
|
|
@ -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();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -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() {
|
||||||
|
|
|
||||||
|
|
@ -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(
|
||||||
|
|
|
||||||
|
|
@ -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);
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -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) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue