Commit 33a42dab by Ooh-Ao

delete

parent db9b5141
......@@ -724,10 +724,14 @@ export class DashboardManagementComponent implements OnInit {
if (!this.dashboardData) return;
if (confirm('Are you sure you want to remove this widget?')) {
const updatedDashboard = { ...this.dashboardData, widgets: this.dashboardData.widgets.filter(w => w.id !== panelId) };
this.dashboardDataService.saveDashboard(updatedDashboard).subscribe(updated => {
this.dashboardData = updated;
this.panels = this.mapWidgetsToPanels(this.dashboardData.widgets);
});
this.dashboardData = updatedDashboard;
this.panels = this.mapWidgetsToPanels(updatedDashboard.widgets);
// const updatedDashboard = { ...this.dashboardData, widgets: this.dashboardData.widgets.filter(w => w.id !== panelId) };
// this.dashboardDataService.saveDashboard(updatedDashboard).subscribe(updated => {
// this.dashboardData = updated;
// this.panels = this.mapWidgetsToPanels(this.dashboardData.widgets);
// });
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment