Skip to content

Commit ea90746

Browse files
committed
Improve custom reports
1 parent f528cc9 commit ea90746

File tree

7 files changed

+235
-249
lines changed

7 files changed

+235
-249
lines changed

frontend/src/modules/report/components/report-form.vue

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@
2323
</template>
2424

2525
<script setup>
26-
import { defineProps, reactive, watch } from 'vue';
27-
import debounce from 'lodash/debounce';
28-
import { mapActions } from '@/shared/vuex/vuex.helpers';
26+
import { defineProps, reactive } from 'vue';
2927
import { FormSchema } from '@/shared/form/form-schema';
3028
import { ReportModel } from '@/modules/report/report-model';
3129
import ReportGridLayout from './report-grid-layout.vue';
@@ -49,19 +47,6 @@ const rules = formSchema.rules();
4947
const model = reactive(
5048
JSON.parse(JSON.stringify(props.record)),
5149
);
52-
53-
const { doUpdate } = mapActions('report');
54-
55-
const debouncedChange = debounce(async () => {
56-
await doUpdate({
57-
id: props.record && props.record.id,
58-
values: formSchema.cast(model),
59-
});
60-
}, 1000);
61-
62-
watch(model, () => {
63-
debouncedChange();
64-
});
6550
</script>
6651

6752
<script>

0 commit comments

Comments
 (0)