logic for navigation when vin is masked
This commit is contained in:
parent
934454141a
commit
a0d1d282e5
1 changed files with 6 additions and 2 deletions
|
|
@ -129,6 +129,7 @@ export default {
|
|||
vinMask() {
|
||||
if (this.vinPopulatedOnPageLoad) {
|
||||
this.activeVehicleLookupAlertType = vehicleLookupAlertTypes.PERFECT_MATCH;
|
||||
this.needToLookupVehicle = false;
|
||||
const lastSixChars = this.vin.substring(11, this.vin.length);
|
||||
return `!X!X!X!X!X!X!X!X!X!X!X${lastSixChars}`;
|
||||
} else {
|
||||
|
|
@ -182,7 +183,6 @@ export default {
|
|||
this.activeVehicleLookupAlertType = vehicleLookupAlertTypes.NOT_MATCHED;
|
||||
}
|
||||
|
||||
|
||||
const vehicleYearMakeModelStyle = `${this.vehicleFromLookup.year} ${this.vehicleFromLookup.make} ${this.vehicleFromLookup.model} ${this.forwardButtonCarStyle}`;
|
||||
this.$refs.siteFooter.updateButtonText(`Continue with ${vehicleYearMakeModelStyle}`);
|
||||
this.$refs.siteFooter.removeLoader();
|
||||
|
|
@ -212,7 +212,11 @@ export default {
|
|||
return;
|
||||
}
|
||||
|
||||
this.mainStore.updateVehicle(this.vehicleFromLookup);
|
||||
// save vehicle to store if it hasn't already been saved
|
||||
if (!this.vinPopulatedOnPageLoad) {
|
||||
this.mainStore.updateVehicle(this.vehicleFromLookup);
|
||||
}
|
||||
|
||||
const partsOrQuestionsResponse = await this.getPartsOrQuestions();
|
||||
if (partsOrQuestionsResponse.error) {
|
||||
// To Do: Need requirement on what to do here
|
||||
|
|
|
|||
Loading…
Reference in a new issue