From 4ec5217daeb8c56370c5af8f2f7962690de3c1a8 Mon Sep 17 00:00:00 2001 From: Scott Kiener Date: Fri, 13 May 2022 10:44:43 -0400 Subject: [PATCH] CSR-408 | Refactor and Fix Unrelated Bugs Bugs fixed: -Compile time error regarding logic done in "computed" -Forward button now updates correctly on license-plate-lookup when VIN is changed. Refactored alert.vue to make it more readable --- src/layouts/vin-lookup/vin-lookup.vue | 16 +++++++++++--- src/ux-components/alert/alert.vue | 30 ++++++++++++++++++++------- 2 files changed, 35 insertions(+), 11 deletions(-) diff --git a/src/layouts/vin-lookup/vin-lookup.vue b/src/layouts/vin-lookup/vin-lookup.vue index f6c3b5ecb..27be92781 100644 --- a/src/layouts/vin-lookup/vin-lookup.vue +++ b/src/layouts/vin-lookup/vin-lookup.vue @@ -192,12 +192,17 @@ export default { vinPopulatedOnPageLoad: this.getVinFromStore()?.length > 0, }; }, + watch: { + vin() { + this.$refs.funnelFooter.updateButtonText( + this.getCmsContent("FunnelFooterWidget", "ForwardButtonText") + ); + } + }, computed: { perfectMatchNewVinAlert() { const isVinPerfectMatch = this.vinPopulatedOnPageLoad && this.vin === this.getVinFromStore(); - if (isVinPerfectMatch) { - this.isCarIdDifferent = false; - } + this.updateIsCarIdDifferent(isVinPerfectMatch); return isVinPerfectMatch; }, MatchedDifferentVehicleAlertHeader(){ @@ -269,6 +274,11 @@ export default { ); }); }, + updateIsCarIdDifferent(isVinPerfectMatch){ + if (isVinPerfectMatch) { + this.isCarIdDifferent = false; + } + }, backButtonAction() { if (store.getters.vehicle.vin) { this.$router.navigate(this.navigationScenarios.CLICKED_BACK_WITH_VIN, this.$route); diff --git a/src/ux-components/alert/alert.vue b/src/ux-components/alert/alert.vue index 8d04d2972..faff0861c 100644 --- a/src/ux-components/alert/alert.vue +++ b/src/ux-components/alert/alert.vue @@ -6,12 +6,12 @@ >

{{ alertHeadline }}