From 3e210b006a541c404133e30131214be04bc0a6f1 Mon Sep 17 00:00:00 2001 From: Scott Kiener Date: Tue, 27 Aug 2024 15:21:22 -0400 Subject: [PATCH] Fix vehicle page, remove base input v-validate --- .../base-input-button/base-input-button.vue | 10 +++++++++- .../damage-location-question.vue | 9 +++++++-- .../side-door-options/side-door-options.vue | 9 +++++++-- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/src/digital-components/base-input-button/base-input-button.vue b/src/digital-components/base-input-button/base-input-button.vue index 7d676c866..ed83c9be6 100644 --- a/src/digital-components/base-input-button/base-input-button.vue +++ b/src/digital-components/base-input-button/base-input-button.vue @@ -17,7 +17,6 @@ :aria-required="isRequired" :value="value" :checked="isChecked" - v-validate="''" @keypress.space="handleEventAction(eventTypes.SPACE, $event)" @keypress.enter="handleEventAction(eventTypes.ENTER, $event)" @change="handleEventAction(eventTypes.CHANGE, $event)" /> @@ -49,13 +48,20 @@ export default { }; }, mounted() { + console.log('mounted'); // Need this here and in the watch for vehicle-parts, unless there'a better way if (this.isChecked) { + console.log('I was checked'); this.handleChange(this.modelValue); } }, methods: { + test() { + console.log('A'); + }, handleEventAction(eventType, e) { + console.log('handleEventAction'); + console.log(eventType); if (this.isMultiSelect) { switch (eventType) { case this.eventTypes.CHANGE: @@ -80,6 +86,7 @@ export default { } }, handleSelectionChange(e) { + console.log("handleSelectionChange"); if ( this.isMultiSelect && (this.modelValue instanceof Array || this.modelValue == null) @@ -99,6 +106,7 @@ export default { this.handleChange(this.valueToEmit); }, handleClick(e) { + console.log('handleClick'); this.handleSelectionChange(e); this.$emit("update:modelValue", this.valueToEmit); }, diff --git a/src/layouts/vehicle-damage/damage-location-question/damage-location-question.vue b/src/layouts/vehicle-damage/damage-location-question/damage-location-question.vue index 67881b382..1f20a8006 100644 --- a/src/layouts/vehicle-damage/damage-location-question/damage-location-question.vue +++ b/src/layouts/vehicle-damage/damage-location-question/damage-location-question.vue @@ -75,8 +75,13 @@ export default { : []; return filteredAnswers.map((ans) => { const newName = ans.Name.includes("-") ? ans.Name.split("-")[1] : ans.Name; - ans.Name = newName; - return ans; + return { + Name: newName, + AnswerImageUrl: ans.AnswerImageUrl, + ImageId: ans.ImageId, + SubText: ans.SubText, + Text: ans.Text, + }; }); }, }, diff --git a/src/layouts/vehicle-damage/side-door-options/side-door-options.vue b/src/layouts/vehicle-damage/side-door-options/side-door-options.vue index d1f6e1ab9..04904e13f 100644 --- a/src/layouts/vehicle-damage/side-door-options/side-door-options.vue +++ b/src/layouts/vehicle-damage/side-door-options/side-door-options.vue @@ -142,8 +142,13 @@ export default { return filteredAnswers.map((ans) => { const newName = ans.Name.includes("-") ? ans.Name.split("-")[1] : ans.Name; - ans.Name = newName; - return ans; + return { + Name: newName, + AnswerImageUrl: ans.AnswerImageUrl, + ImageId: ans.ImageId, + SubText: ans.SubText, + Text: ans.Text, + }; }); }, isDriverSideReplaceOptionsQuestionAvailable() {