diff --git a/public/js/components/Dashboard/Admin/Presets.js b/public/js/components/Dashboard/Admin/Presets.js
index a28a8afc6..a66159466 100644
--- a/public/js/components/Dashboard/Admin/Presets.js
+++ b/public/js/components/Dashboard/Admin/Presets.js
@@ -23,7 +23,7 @@ export default {
}
},
methods: {
- widgetAdd(section_name, widget) {
+ widgetAdd(widget, section_name) {
this.$refs.widgetpicker.getWidget().then(widget_id => {
widget.widget = widget_id;
widget.id = 'loading_' + String((new Date()).valueOf());
@@ -64,8 +64,7 @@ export default {
})
.catch(() => {});
},
- widgetUpdate(section_name, payload) {
- payload = payload[section_name];
+ widgetUpdate(payload, section_name) {
for (var k in payload) {
const section = this.sections.find(section => section.name == section_name);
for (var wid in section.widgets) {
@@ -105,7 +104,7 @@ export default {
})
.catch(this.$fhcAlert.handleSystemError);
},
- widgetRemove(section_name, id) {
+ widgetRemove(id, section_name) {
const params = {
db: this.dashboard,
funktion_kurzbz: section_name,
diff --git a/public/js/components/Dashboard/Dashboard.js b/public/js/components/Dashboard/Dashboard.js
index 94b3621d6..f9fff9925 100644
--- a/public/js/components/Dashboard/Dashboard.js
+++ b/public/js/components/Dashboard/Dashboard.js
@@ -40,8 +40,7 @@ export default {
}
},
methods: {
- widgetAdd(section_name, widget) {
- // TODO(chris): remove section_name? (change order of params => get rid of it)
+ widgetAdd(widget) {
this.$refs.widgetpicker
.getWidget()
.then(widget_id => {
@@ -63,8 +62,7 @@ export default {
})
.catch(() => {});
},
- widgetUpdate(section_name, payload) {
- payload = payload[section_name];
+ widgetUpdate(payload) {
for (var k in payload) {
for (var wid in this.widgets) {
if (this.widgets[wid].id == k) {
@@ -112,7 +110,7 @@ export default {
})
.catch(this.$fhcAlert.handleSystemError);
},
- widgetRemove(section_name, id) {
+ widgetRemove(id) {
this.$api
.call(ApiDashboardUser.removeWidget(this.dashboard, id))
.then(() => {
@@ -148,7 +146,7 @@ export default {
}
}
- remove.forEach(wid => this.widgetRemove('general', wid));
+ remove.forEach(wid => this.widgetRemove(wid));
this.widgets = widgets;
})
@@ -160,7 +158,7 @@ export default {
{{ $p.t('global/personalGreeting', [ viewData?.name ]) }}
-