Explorar o código

Context menu doesn't show anymore if the Employee doesn't exist on Planned Maintenance

Kenric Nugteren hai 7 meses
pai
achega
6b25ca4293

+ 2 - 0
prs.desktop/Dashboards/Equipment/EquipmentSchedulesDashboard.xaml.cs

@@ -438,6 +438,8 @@ public partial class EquipmentSchedulesDashboard : UserControl, IDashboardWidget
     {
         if (sender is not FrameworkElement element || element.Tag is not Guid employeeID) return;
 
+        if (employeeID == Guid.Empty) return;
+
         var menu = new ContextMenu();
         menu.AddItem("View Employee", null, employeeID, ViewEmployee_Click);
         menu.IsOpen = true;