feat(adminui): UNS-tree delete for Cluster + Enterprise (refuse-if-children, no rowversion)
This commit is contained in:
@@ -303,8 +303,19 @@
|
||||
result = await Svc.DeleteEquipmentAsync(node.EntityId!, equipment.RowVersion);
|
||||
break;
|
||||
|
||||
case UnsNodeKind.Cluster:
|
||||
// Cluster carries no RowVersion (Option B); EntityId mirrors the ClusterId.
|
||||
result = await Svc.DeleteClusterAsync(node.EntityId!);
|
||||
break;
|
||||
|
||||
case UnsNodeKind.Enterprise:
|
||||
// Enterprise is a tree label, not an entity — its name is the DisplayName.
|
||||
// Deletes every cluster carrying that label (refuse-if-children, all-or-nothing).
|
||||
result = await Svc.DeleteEnterpriseAsync(node.DisplayName);
|
||||
break;
|
||||
|
||||
default:
|
||||
// Enterprise/Cluster have no delete button, so this branch is unreachable in practice.
|
||||
// Tag/VirtualTag are not deletable from the global tree.
|
||||
result = new UnsMutationResult(false, "Delete for this node kind is not yet available.");
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user