Create circuits with rows atomically

This commit is contained in:
2026-07-23 17:36:38 +02:00
parent b0fc2b4fbf
commit 0800f984bb
11 changed files with 450 additions and 93 deletions
+2
View File
@@ -44,6 +44,8 @@ Response sketch:
- `POST /projects/:projectId/circuit-lists/:circuitListId/circuits`
- create circuit in list/section
- `POST /projects/:projectId/circuit-lists/:circuitListId/circuits-with-device-rows`
- atomically create one circuit and one or more initial device rows
- `PATCH /circuits/:circuitId`
- update circuit-level fields (BMK, protection, cable, reserve flag, etc.)
- `DELETE /circuits/:circuitId`
+2
View File
@@ -56,6 +56,7 @@ Each section has a trailing placeholder row showing `-frei-` in BMK column:
- serves as drop target for creating new circuits from project devices or moved rows
- editable placeholder cells can create a new circuit + first row through the same edit command flow
- a new circuit and its initial row(s) are created in one SQLite transaction
## Add Circuit Behavior
@@ -68,6 +69,7 @@ Intent is separated by drag source type:
- project device drag:
- drop to section/placeholder -> create new circuit with linked row
- the new circuit and linked row are committed atomically
- drop to existing circuit row -> append row to that circuit
- lighting devices are accepted only by the lighting section
- other devices are accepted only by the section matching their phase type