Move circuits between groups

This commit is contained in:
2026-07-31 07:58:42 +02:00
parent be9c6f0d52
commit 93ec294759
6 changed files with 336 additions and 21 deletions
+20
View File
@@ -65,6 +65,9 @@ import type {
import type {
CircuitGroupRenumberPlan,
} from "../../domain/services/circuit-group-renumbering";
import type {
CircuitGroupMovePlan,
} from "../../domain/services/circuit-group-move-planning";
async function request<T>(url: string, init?: RequestInit): Promise<T> {
const response = await fetch(url, {
@@ -473,6 +476,23 @@ export function renumberCircuitGroupsCommand(
);
}
export function moveCircuitToGroupCommand(
projectId: string,
expectedRevision: number,
plan: CircuitGroupMovePlan
) {
return executeProjectCommand(
projectId,
expectedRevision,
{
schemaVersion: 1,
type: "circuit.move-group",
payload: plan,
},
"Stromkreis in andere Gruppe verschieben"
);
}
export function updateCircuitProtectionCommand(
projectId: string,
expectedRevision: number,