Merge pull request #555 from Safelite/feature/CSR-659

Fixed bug that was clearing out Vin when re-focusing field after blur…
This commit is contained in:
Leah Schumann 2022-06-14 10:19:15 -04:00 committed by GitHub
commit e649557486
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -187,6 +187,7 @@ export default {
invalidZip: '',
vinPopulatedOnPageLoad: this.getVinFromStore()?.length > 0,
initialVin: this.getVinFromStore(),
vinTouched: false,
};
},
mounted() {
@ -250,8 +251,12 @@ export default {
},
methods: {
setVinTouched() {
this.vinMask = "XXXXXXXXXXXXXXXXX";
this.vin = this.initialVin;
if (!this.vinTouched) {
this.vinMask = "XXXXXXXXXXXXXXXXX";
this.vin = this.initialVin;
}
this.vinTouched = true;
},
setupVinMask() {
const lastSixChars = this.initialVin.substring(11, this.initialVin.length);