feat(client-ui): AlarmsViewModel Shelve/Confirm methods + CanShelve/CanConfirm
This commit is contained in:
@@ -96,4 +96,10 @@ public class AlarmEventViewModel : ObservableObject
|
||||
|
||||
/// <summary>Whether this alarm can be acknowledged (active, not yet acked, has EventId).</summary>
|
||||
public bool CanAcknowledge => ActiveState && !AckedState && EventId != null && ConditionNodeId != null;
|
||||
|
||||
/// <summary>Whether this alarm can be shelved/unshelved (has a ConditionNodeId).</summary>
|
||||
public bool CanShelve => ConditionNodeId != null;
|
||||
|
||||
/// <summary>Whether this alarm can be confirmed (already acked, has EventId + ConditionNodeId).</summary>
|
||||
public bool CanConfirm => AckedState && EventId != null && ConditionNodeId != null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user