feat(uns): equipment is a tree leaf linking to the detail page; drop EquipmentModal
This commit is contained in:
@@ -13,13 +13,10 @@
|
||||
/// <summary>The top-level UNS nodes to render (typically the enterprise roots).</summary>
|
||||
[Parameter, EditorRequired] public IReadOnlyList<UnsNode> Roots { get; set; } = default!;
|
||||
|
||||
/// <summary>Raised for the primary "add child" action of a node (e.g. "+ Area" on a cluster, "+ Tag" on equipment).</summary>
|
||||
/// <summary>Raised for the primary "add child" action of a structural node (e.g. "+ Area" on a cluster, "+ Equipment" on a line).</summary>
|
||||
[Parameter] public EventCallback<UnsNode> OnAddChild { get; set; }
|
||||
|
||||
/// <summary>Raised for the equipment-only "+ Virtual tag" action, kept distinct from OnAddChild ("+ Tag").</summary>
|
||||
[Parameter] public EventCallback<UnsNode> OnAddVirtualTag { get; set; }
|
||||
|
||||
/// <summary>Raised when the user edits a node (Area/Line/Equipment/Tag/VirtualTag).</summary>
|
||||
/// <summary>Raised when the user edits a node (Area/Line).</summary>
|
||||
[Parameter] public EventCallback<UnsNode> OnEdit { get; set; }
|
||||
|
||||
/// <summary>Raised when the user deletes a node (Area/Line/Equipment/Tag/VirtualTag).</summary>
|
||||
@@ -117,20 +114,7 @@
|
||||
break;
|
||||
|
||||
case UnsNodeKind.Equipment:
|
||||
<button type="button" class="btn btn-sm btn-link p-0 ms-2"
|
||||
@onclick="@(() => OnAddChild.InvokeAsync(node))">+ Tag</button>
|
||||
<button type="button" class="btn btn-sm btn-link p-0 ms-2"
|
||||
@onclick="@(() => OnAddVirtualTag.InvokeAsync(node))">+ Virtual tag</button>
|
||||
<button type="button" class="btn btn-sm btn-link p-0 ms-2"
|
||||
@onclick="@(() => OnEdit.InvokeAsync(node))">Edit</button>
|
||||
<button type="button" class="btn btn-sm btn-link p-0 ms-2 text-danger"
|
||||
@onclick="@(() => OnDelete.InvokeAsync(node))">Delete</button>
|
||||
break;
|
||||
|
||||
case UnsNodeKind.Tag:
|
||||
case UnsNodeKind.VirtualTag:
|
||||
<button type="button" class="btn btn-sm btn-link p-0 ms-2"
|
||||
@onclick="@(() => OnEdit.InvokeAsync(node))">Edit</button>
|
||||
<a class="btn btn-sm btn-link p-0 ms-2" href="@($"/uns/equipment/{node.EntityId}")">Open</a>
|
||||
<button type="button" class="btn btn-sm btn-link p-0 ms-2 text-danger"
|
||||
@onclick="@(() => OnDelete.InvokeAsync(node))">Delete</button>
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user