diff --git a/public/js/components/Dashboard/WidgetAdmin/Edit/Report/Aggregators.js b/public/js/components/Dashboard/WidgetAdmin/Edit/Report/Aggregators.js index b1b591d0b..a972a7055 100644 --- a/public/js/components/Dashboard/WidgetAdmin/Edit/Report/Aggregators.js +++ b/public/js/components/Dashboard/WidgetAdmin/Edit/Report/Aggregators.js @@ -45,6 +45,9 @@ export default { addAggregator() { this.modelValue.push({}); }, + removeAggregator(index) { + this.$emit('update:modelValue', this.modelValue.toSpliced(index, 1)); + }, preventOnCheckboxClick(evt) { if (evt.explicitOriginalTarget.classList.contains('form-check-label')) { evt.preventDefault(); @@ -94,7 +97,7 @@ export default {
- +
diff --git a/public/js/components/Dashboard/WidgetAdmin/Edit/Report/Aggregators/Aggregator.js b/public/js/components/Dashboard/WidgetAdmin/Edit/Report/Aggregators/Aggregator.js index f35c9aa3d..8cb5a9006 100644 --- a/public/js/components/Dashboard/WidgetAdmin/Edit/Report/Aggregators/Aggregator.js +++ b/public/js/components/Dashboard/WidgetAdmin/Edit/Report/Aggregators/Aggregator.js @@ -20,7 +20,18 @@ export default { }, emits: [ "update:modelValue", + "remove", ], + methods: { + remove() { + this.$fhcAlert.confirmDelete() + .then(result => { + if (result) + this.$emit('remove', this.index); + }) + .catch(this.$fhcAlert.handleSystemError); + }, + }, template: /*html*/ `
- +
+ + +
`, };