vin masking
This commit is contained in:
parent
8e4de86f0d
commit
29d96e9140
1 changed files with 17 additions and 2 deletions
|
|
@ -24,6 +24,8 @@
|
||||||
|
|
||||||
<vinQuestion
|
<vinQuestion
|
||||||
v-model="vin"
|
v-model="vin"
|
||||||
|
:mask="vinMask"
|
||||||
|
:isDisabled="vinPopulatedOnPageLoad"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<vinLocationInformation />
|
<vinLocationInformation />
|
||||||
|
|
@ -85,8 +87,9 @@ export default {
|
||||||
activeVehicleLookupAlertType: null,
|
activeVehicleLookupAlertType: null,
|
||||||
needToLookupVehicle: true,
|
needToLookupVehicle: true,
|
||||||
vehicleFromLookup: null,
|
vehicleFromLookup: null,
|
||||||
vin: null,
|
vin: this.getVinFromStore(),
|
||||||
forwardButtonCarStyle:"",
|
forwardButtonCarStyle:"",
|
||||||
|
vinPopulatedOnPageLoad: this.getVinFromStore()?.length > 0,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
provide() {
|
provide() {
|
||||||
|
|
@ -122,12 +125,24 @@ export default {
|
||||||
const vinYmmFound = `${this.vehicleFromLookup.year} ${this.vehicleFromLookup.make} ${this.vehicleFromLookup.model}`;
|
const vinYmmFound = `${this.vehicleFromLookup.year} ${this.vehicleFromLookup.make} ${this.vehicleFromLookup.model}`;
|
||||||
const vinYmmExpected = `${this.mainStore.order.vehicle.year} ${this.mainStore.order.vehicle.make} ${this.mainStore.order.vehicle.model}`;
|
const vinYmmExpected = `${this.mainStore.order.vehicle.year} ${this.mainStore.order.vehicle.make} ${this.mainStore.order.vehicle.model}`;
|
||||||
return(vinYmmFound.toLowerCase()==vinYmmExpected.toLowerCase());
|
return(vinYmmFound.toLowerCase()==vinYmmExpected.toLowerCase());
|
||||||
}
|
},
|
||||||
|
vinMask() {
|
||||||
|
if (this.vinPopulatedOnPageLoad) {
|
||||||
|
this.activeVehicleLookupAlertType = vehicleLookupAlertTypes.PERFECT_MATCH;
|
||||||
|
const lastSixChars = this.vin.substring(11, this.vin.length);
|
||||||
|
return `!X!X!X!X!X!X!X!X!X!X!X${lastSixChars}`;
|
||||||
|
} else {
|
||||||
|
return "XXXXXXXXXXXXXXXXX";
|
||||||
|
}
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
arePagePrerequisiteValid() {
|
arePagePrerequisiteValid() {
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
getVinFromStore() {
|
||||||
|
return this.mainStore.vehicle.vin;
|
||||||
|
},
|
||||||
backButtonAction() {
|
backButtonAction() {
|
||||||
/**
|
/**
|
||||||
* this.navigationScenarios comes from base-mixin
|
* this.navigationScenarios comes from base-mixin
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue