From dc0335c38a2b2155c969aca8e494caf21700fe1e Mon Sep 17 00:00:00 2001 From: Leah Schumann Date: Wed, 29 Jun 2022 10:40:56 -0400 Subject: [PATCH] Touchups per direction from Mark --- src/layouts/vin-lookup/vin-lookup.vue | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/src/layouts/vin-lookup/vin-lookup.vue b/src/layouts/vin-lookup/vin-lookup.vue index b3ca243f0..214899d31 100644 --- a/src/layouts/vin-lookup/vin-lookup.vue +++ b/src/layouts/vin-lookup/vin-lookup.vue @@ -183,15 +183,10 @@ export default { previouslyEnteredCarId: '', invalidZip: '', vinPopulatedOnPageLoad: this.getVinFromStore()?.length > 0, - isInsuranceVerified: false, }; }, mounted() { this.attachCustomEvents(); - if (this.vinPopulatedOnPageLoad) { - this.setupVinMask(); - this.isInsuranceVerified = store.getters.payment.insuranceCoverage.isVerified || getFunnelCookie().HasDelayedClaimRegistration; - } }, watch: { vin() { @@ -239,12 +234,20 @@ export default { return this.getCmsContent("PerfectMatchInsuranceVerifiedAlert", "BodyText").replaceAll("{custom:damage}", getIsWindshieldOnly()) }, + isInsuranceVerified() { + return store.getters.payment.insuranceCoverage.isVerified || getFunnelCookie().HasDelayedClaimRegistration; + }, + vinMask() { + if (this.vinPopulatedOnPageLoad) { + 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: { - setupVinMask() { - const lastSixChars = this.vin.substring(11, this.vin.length); - this.vinMask = `!X!X!X!X!X!X!X!X!X!X!X${lastSixChars}`; - }, arePagePrerequisitesValid() { return store.getters.vehicle.carId !== null; },