Buildings above floors and a building structure page #16

Closed
Grovy311 wants to merge 0 commits from feature/building-structure into main
Collaborator

Umsetzung von #6:

  • Neue Tabelle buildings, floors.building_id nullable (Migration 0009).
  • Befehle project-building.*; Etagenbefehle haben Version 2 mit buildingId. v1-Befehle aus der Historie werden hochgestuft.
  • Snapshot-Schema 7.
  • Eigene Seite /projects/:id/struktur (Gebäude → Etagen → Räume, gegenseitig filternd).
  • Die Seitenleiste bleibt auf allen Seiten außer der Seitenansicht sichtbar.
  • Doku: docs/building-structure.md. Deine Fragen im Issue sind noch offen; solange nicht gemergt, lässt sich das Modell noch anpassen.

Basis: feature/print-view (Migrationen 0007/0008, Snapshot-Schema 6), bitte danach mergen.

Geprüft auf dem Branch allein: alle drei tsc-Konfigurationen, npm test 448/448, Produktions-Build (build:api + build:web). Zusammen mit allen anderen Branches: 509/509 Tests, konfliktfrei in jeder Merge-Reihenfolge.

Merge-Reihenfolge aller Branches:

  1. fix/client-id-insecure-context (#9)
  2. feature/editor-ui (#10)
  3. feature/cable-sizing (#11)
  4. feature/overview-filters (#12)
  5. feature/circuit-list-usability (#13)
  6. feature/card-look (#14)
  7. feature/print-view (#15)
  8. feature/building-structure (#16)
  9. feature/estimate-balance (#17)

🤖 Generated with Claude Code

Umsetzung von #6: - Neue Tabelle `buildings`, `floors.building_id` nullable (Migration `0009`). - Befehle `project-building.*`; Etagenbefehle haben Version 2 mit `buildingId`. v1-Befehle aus der Historie werden hochgestuft. - Snapshot-Schema 7. - Eigene Seite `/projects/:id/struktur` (Gebäude → Etagen → Räume, gegenseitig filternd). - Die Seitenleiste bleibt auf allen Seiten außer der Seitenansicht sichtbar. - Doku: `docs/building-structure.md`. Deine Fragen im Issue sind noch offen; solange nicht gemergt, lässt sich das Modell noch anpassen. **Basis:** `feature/print-view` (Migrationen 0007/0008, Snapshot-Schema 6), bitte danach mergen. Geprüft auf dem Branch allein: alle drei `tsc`-Konfigurationen, `npm test` 448/448, Produktions-Build (`build:api` + `build:web`). Zusammen mit allen anderen Branches: 509/509 Tests, konfliktfrei in jeder Merge-Reihenfolge. Merge-Reihenfolge aller Branches: 1. `fix/client-id-insecure-context` (#9) 2. `feature/editor-ui` (#10) 3. `feature/cable-sizing` (#11) 4. `feature/overview-filters` (#12) 5. `feature/circuit-list-usability` (#13) 6. `feature/card-look` (#14) 7. `feature/print-view` (#15) 8. `feature/building-structure` (#16) 9. `feature/estimate-balance` (#17) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Grovy311 added 4 commits 2026-09-26 20:14:47 +02:00
- Seitenansicht (/projects/:projectId/print): tabular cover page, board
  overview with supply structure and power sums, one plan per board with a
  repeating title block; PDF via the browser print dialog with named @page
  rules (A4 portrait cover, A4/A3 landscape plans, page x of y).
- Distribution-board info card (board number, location, fed-from, remark)
  in the board edit dialog, persisted through the additively extended
  distribution-board.update command (migration 0008, snapshot schema 6,
  legacy subtree commands normalized).
- Global document logo upload (PNG/JPEG/SVG, max 2 MB) outside project
  revisions and snapshots.
- fed-from stays free text; the overview hierarchy and cumulated sums are
  preliminary until the feed link is modeled.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Project settings gain siteAddress, workStage, projectLead and
  projectEditor (project.update-settings schema version 3, migration 0009);
  versions 2 and 1 stay executable and keep the current cover values.
  Snapshot schema 6 carries the fields; older versions upgrade with null.
- Global office profile (office name/address) next to the document logo:
  table document_branding_settings, PUT /api/document-branding/office,
  editable from the print view toolbar.
- Cover page reads all fields; empty values show the "[ergänzen]" marker.
  The Planstände editor column shows the project editor.
- Shared logo constants moved to a dependency-free module so the Next.js
  bundler can import them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Projects with several buildings could not be structured: floors and rooms
hung directly off the project. Floors can now belong to a building
(migration 0009: table buildings, nullable floors.building_id). Rooms and
distribution boards keep their floor; their building follows from it.
Existing floors stay without a building.

Buildings use the location-structure command store with
project-building.insert/.update/.delete, inverses and persistent Undo/Redo;
deleting a building with assigned floors is rejected. Floor commands carry
buildingId since command version 2. Version 1 floor commands from existing
history predate buildings and are upgraded with buildingId = null before
they are executed and persisted, so forward and inverse keep one version.

Project snapshot schema 7 stores buildings and floor.buildingId; versions
1-6 are upgraded without buildings. Restore and portable transfer include
buildings, and the transfer remaps building ids.

Buildings, floors and rooms move from the project overview to their own
page /projects/:id/struktur with three columns (Gebäude -> Etagen -> Räume)
that filter each other, and a sidebar entry. Floor selects in the board and
room dialogs are grouped by building. Unchanged dialogs close without a
command. Details in docs/building-structure.md; see issue #6.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AppShell showed the sidebar only on the project list and overview, so it
disappeared on the building structure page and in the circuit list
editor. It is collapsible, so it now stays on every page. Only the print
view, a stand-alone document opened in its own tab and printed as PDF,
keeps the full width.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner

Integriert in main mit Merge-Commit 868f48e7ac.

Anpassungen beim Merge:

  • Code: keine, unverändert übernommen.
  • Tests: Der Migrationstest aus #15 läuft jetzt durch das aktuelle Schema inklusive 0009: Eine bestehende Etage bleibt unverändert, erhält building_id = null, und es wird kein Gebäude automatisch angelegt.
  • Doku: docs/building-structure.md weist auf die Datenbanksicherung vor dem Anwenden der Migration hin.

Die offenen Fragen aus #6 bleiben dort weiter offen.

Integriert in `main` mit Merge-Commit 868f48e7aca9c5a19566d1ba63a1ec9f8915519d. Anpassungen beim Merge: - **Code:** keine, unverändert übernommen. - **Tests:** Der Migrationstest aus #15 läuft jetzt durch das aktuelle Schema inklusive `0009`: Eine bestehende Etage bleibt unverändert, erhält `building_id = null`, und es wird kein Gebäude automatisch angelegt. - **Doku:** `docs/building-structure.md` weist auf die Datenbanksicherung vor dem Anwenden der Migration hin. Die offenen Fragen aus #6 bleiben dort weiter offen.
jappel closed this pull request 2026-09-27 10:59:33 +02:00

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: jappel/leistungsbilanz-ts#16
No description provided.