From b3c869f29323c9a7ebaff356bce2e4db04fa42d8 Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 4 Mar 2022 14:22:25 -0500 Subject: [PATCH] radio updates --- .../glass-part-question.vue | 356 ++++++++++-------- src/layouts/vehicle-parts/vehicle-parts.vue | 2 +- src/ux-components/list-card/list-card.vue | 9 + 3 files changed, 203 insertions(+), 164 deletions(-) diff --git a/src/layouts/vehicle-parts/glass-part-question/glass-part-question.vue b/src/layouts/vehicle-parts/glass-part-question/glass-part-question.vue index e7f4757ce..e923af0c6 100644 --- a/src/layouts/vehicle-parts/glass-part-question/glass-part-question.vue +++ b/src/layouts/vehicle-parts/glass-part-question/glass-part-question.vue @@ -1,33 +1,62 @@ diff --git a/src/layouts/vehicle-parts/vehicle-parts.vue b/src/layouts/vehicle-parts/vehicle-parts.vue index 7c0efeda7..39c8bbbf3 100644 --- a/src/layouts/vehicle-parts/vehicle-parts.vue +++ b/src/layouts/vehicle-parts/vehicle-parts.vue @@ -136,7 +136,7 @@ export default { } }); }); - + console.log(this.glassParts) return { glassName: g.glassName, glassLocation: g.glassLocation, diff --git a/src/ux-components/list-card/list-card.vue b/src/ux-components/list-card/list-card.vue index c1fc6d089..832f33c6b 100644 --- a/src/ux-components/list-card/list-card.vue +++ b/src/ux-components/list-card/list-card.vue @@ -70,6 +70,7 @@ export default { colLength: String, validationRules: String, selectedValues: [Array, String], + modelValue: Object, hasError: Boolean, }, data(){ @@ -81,6 +82,14 @@ export default { if(Array.isArray(this.selectedValues)){ this.checkValue = this.isMultiSelect ? this.selectedValues.includes(this.value) : this.selectedValues[0]; } + this.$nextTick(() => { + if(Object.keys(this.modelValue).length > 0) { + this.checkValue = this.modelValue.value; + const emitEvent = { checkValue: this.checkValue, value: this.value.toString(), buttonId: this.buttonID.toString() }; + this.$emit('isCheckedChanged', emitEvent); + this.$emit('update:modelValue', emitEvent); + } + }) }, computed: { getLabelClasses() {