From 894ae01a34c8b5c4ba69f23f4bc2fc65a1ec22b1 Mon Sep 17 00:00:00 2001 From: chfhtw Date: Mon, 14 Sep 2026 16:08:41 +0200 Subject: [PATCH] Fix: use emits --- .../components/Dashboard/WidgetAdmin/Edit.js | 24 +++++++++++++++--- .../DashboardWidget/Generators/Report/Kpi.js | 25 ++++++++++++++----- 2 files changed, 40 insertions(+), 9 deletions(-) diff --git a/public/js/components/Dashboard/WidgetAdmin/Edit.js b/public/js/components/Dashboard/WidgetAdmin/Edit.js index 7ecdad619..f04bdb405 100644 --- a/public/js/components/Dashboard/WidgetAdmin/Edit.js +++ b/public/js/components/Dashboard/WidgetAdmin/Edit.js @@ -27,6 +27,24 @@ export default { saving: false, }; }, + computed: { + value: { + get() { + return this.modelValue; + }, + set(modelValue) { + this.$emit('update:modelValue', modelValue); + }, + }, + setup: { + get() { + return this.modelValue.setup; + }, + set(setup) { + this.$emit('update:modelValue', { ...this.modelValue, setup }); + }, + }, + }, watch: { 'originalData.setup.generator': { async handler(gen) { @@ -81,11 +99,11 @@ export default { class="widgets-admin-edit mx-2" @submit.prevent="save" > - + - +