瀏覽代碼

Fixed dashboards not being added.

Kenric Nugteren 7 月之前
父節點
當前提交
75c14e057f
共有 2 個文件被更改,包括 3 次插入1 次删除
  1. 2 0
      prs.desktop/Dashboards/CustomDashboardGrid.cs
  2. 1 1
      prs.desktop/Dashboards/UtilityDashboard.xaml.cs

+ 2 - 0
prs.desktop/Dashboards/CustomDashboardGrid.cs

@@ -63,6 +63,8 @@ public class CustomDashboardGrid : DynamicItemsListGrid<CustomDashboard>
             customDashboard.Name = editor.DashboardName;
             customDashboard.Group = editor.DashboardGroup;
 
+            SaveItem(customDashboard);
+
             return true;
         }
         else

+ 1 - 1
prs.desktop/Dashboards/UtilityDashboard.xaml.cs

@@ -688,7 +688,7 @@ namespace PRSDesktop
 
         private void Grid_CustomiseElementContextMenu(ContextMenu menu, DFLayoutElement element)
         {
-            if(element is CustomDashboardElement dashboardElement)
+            if(element is CustomDashboardElement dashboardElement && Security.IsAllowed<CanManageCustomDashboards>())
             {
                 menu.AddItem("Edit Dashboard", null, dashboardElement, EditDashboard_Click);
             }