diff --git a/src/layouts/address-vehicles/address-vehicles.vue b/src/layouts/address-vehicles/address-vehicles.vue index 397b0f69..b7fb8522 100644 --- a/src/layouts/address-vehicles/address-vehicles.vue +++ b/src/layouts/address-vehicles/address-vehicles.vue @@ -57,11 +57,9 @@ )}`, }, name: 'root', - }" - >{{ + }">{{ getRouterLinkDisplayTextFromCopy(copy) - }} + }} vin === this.selectedVehicleVin - ); + return this.VehiclesForQuestions.find(({ vin }) => vin === this.selectedVehicleVin); }, VehicleSelected() { return this.mainStore.order.vehicle; - }, + } }, watch: { selectedVehicleVin: { @@ -217,12 +213,12 @@ export default { this.resetWarningsAndErrors(); // does this vehicle match the previously selected carId? this.isCarIdDifferent = - this.selectedVehicle?.vehicle.carId !== - useMainStore().vehicle.carId; + this.selectedVehicle?.vehicle.carId + !== useMainStore().vehicle.carId; if ( - this.isCarIdDifferent && - this.selectedVehicle?.vehicle.carId !== - this.previouslyEnteredCarId + this.isCarIdDifferent + && this.selectedVehicle?.vehicle.carId + !== this.previouslyEnteredCarId ) { this.previouslyEnteredCarId = this.selectedVehicle?.vehicle.carId; @@ -233,21 +229,17 @@ export default { } else { this.displayMatchedDifferentVehicleAlert = true; } - this.$refs.siteFooter.updateButtonText( - `Continue with ${this.selectedVehicle.vehicle.year} ` + - `${this.selectedVehicle.vehicle.make} ${this.selectedVehicle.vehicle.model} ${this.forwardButtonCarStyle}` - ); + this.$refs.siteFooter.updateButtonText(`Continue with ${this.selectedVehicle.vehicle.year} ` + + `${this.selectedVehicle.vehicle.make} ${this.selectedVehicle.vehicle.model} ${this.forwardButtonCarStyle}`); } else { - this.$refs.siteFooter.updateButtonText( - this.getCmsContent( - 'SiteFooterWidget', - 'ForwardButtonText' - ) - ); + this.$refs.siteFooter.updateButtonText(this.getCmsContent( + 'SiteFooterWidget', + 'ForwardButtonText' + )); } }, - deep: true, - }, + deep: true + } }, methods: { doesCopyContainRouterLink, @@ -274,10 +266,10 @@ export default { await useMainStore().saveVin( { vehicleInfo: Object.assign(this.selectedVehicle.vehicle, { - vin: this.selectedVehicle.vin, + vin: this.selectedVehicle.vin }), isSelectedGlassAvailableForVehicle: - this.isSelectedGlassAvailableForVehicle, + this.isSelectedGlassAvailableForVehicle }, false ); @@ -288,8 +280,8 @@ export default { // If the vehicle selected on this page is different from the one originally entered and the selected glass is not available // for that vehicle, then navigate back to "vehicle-damage" and display vehicle changed alert on that page. if ( - this.isCarIdDifferent && - !this.isSelectedGlassAvailableForVehicle + this.isCarIdDifferent + && !this.isSelectedGlassAvailableForVehicle ) { this.$router.navigate( this.navigationScenarios.SELECTED_VIN_WITH_MISMATCHED_GLASS, @@ -305,8 +297,8 @@ export default { this.displayMatchedDifferentVehicleAlert = false; this.displayMatchedTwoIdenticalYMMVehicleAlert = false; this.forwardButtonCarStyle = ''; - }, - }, + } + } };