Export and import single distribution boards as JSON

A board with its complete circuit list can be downloaded as a
leistungsbilanz.distribution-board file and imported into any project as
a new board. The import reuses distribution-board.insert-subtree, so it
is one revision with restart-safe Undo/Redo. All ids are new;
project-bound references (project devices with override metadata, room
ids, floor, logical feed, a disabled supply type and the Revit quantity
share) are dropped, circuit voltages follow the target project, and the
response lists these adjustments. The project page offers export per
board and import in the board card header.

Refs #26

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Julian Appel 2026-10-30 07:38:28 +01:00
parent 17a3945813
commit d0bd4fe7e0
11 changed files with 955 additions and 10 deletions

View file

@ -124,6 +124,12 @@ const config = {
{ method: "POST", path: "/api/projects", body: "{kaputt" },
{ method: "PUT", path: "/api/projects/{id}", body: {} },
{ method: "PUT", path: "/api/projects/{id}", body: "{kaputt" },
{ method: "POST", path: "/api/projects/{id}/distribution-boards/import", body: {} },
{
method: "POST",
path: "/api/projects/{id}/distribution-boards/import",
body: { expectedRevision: 0, transfer: { format: "fremd" } },
},
] as Case[],
// Keine Cross-Origin-Freigabe: Browser erreichen die API nur same-origin über den