From ce46cf4ea682d60d3fc587f88414f4a0b3fa328a Mon Sep 17 00:00:00 2001 From: Katie Date: Tue, 20 Sep 2022 08:42:02 -0400 Subject: [PATCH] CSR-762 Preselects windshield damage --- .../input-button-wrapper/input-button-wrapper.vue | 5 +++-- .../damage-location-question.vue | 1 + .../replace-options-question.vue | 2 ++ src/layouts/vehicle-damage/vehicle-damage.vue | 10 ++++++---- .../windshield-options/windshield-options.vue | 9 ++++++--- src/mixins/button-question-wrapper-mixin.js | 4 ++++ 6 files changed, 22 insertions(+), 9 deletions(-) diff --git a/src/common-components/input-button-wrapper/input-button-wrapper.vue b/src/common-components/input-button-wrapper/input-button-wrapper.vue index 374b4b5e0..e9368df30 100644 --- a/src/common-components/input-button-wrapper/input-button-wrapper.vue +++ b/src/common-components/input-button-wrapper/input-button-wrapper.vue @@ -82,7 +82,8 @@ export default { mounted() { console.log({ isChecked: this.isChecked, - modelValue: this.modelValue + modelValue: this.modelValue, + value: this.value }) this.handleChange(this.modelValue) @@ -237,7 +238,7 @@ export default { computed: { isChecked() { if (this.isMultiSelect && this.modelValue instanceof Array) { - this.modelValue.includes(this.value); + return this.modelValue.includes(this.value); } return this.modelValue === this.value; }, 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 8c679d4f6..e658305c3 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 @@ -1,5 +1,6 @@