Move circuits between groups
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user