feat: Spende-Feld bei Sonderführungen — Version 1.12.0

Neue Spalten Spende (bar/ueberw/kasse/keine) und SpendeBetrag in der
Tabelle logbuch. Im Formular erscheint die Auswahl nur bei Art 'SF',
rechts neben Name/Gruppe; bei 'bar' zusätzlich ein Pflichtfeld für den
Betrag. Anzeige in der Liste als Unterzeile unter der Art.

Migration migrate_spende.sql muss vor dem Deploy manuell eingespielt
werden; die zugehörige SQL-Änderung liegt in DB4js_all.php im
sternwarte-Repo.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-08-08 09:38:53 +02:00
parent 48aaf82899
commit cfa1852d5e
11 changed files with 113 additions and 19 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ Next.js 16 App Router application. All pages are server components; interactive
## Data model
`ArtFuehrung` is stored as abbreviations in the DB (`RF`, `SF`, `PrF`, `BEOS`, `SonF`, `TD`, `Beob`, `ToT`, `Sonst`). Display names are in `ARTEN_MAP` in `types/logbuch.ts`. `BEOS` and `TD` hide the Besucher and Objekte fields. `SonF` pre-selects "Sonne" as the only object.
`ArtFuehrung` is stored as abbreviations in the DB (`RF`, `SF`, `PrF`, `BEOS`, `SonF`, `TD`, `Beob`, `ToT`, `Sonst`). Display names are in `ARTEN_MAP` in `types/logbuch.ts`. `BEOS` and `TD` hide the Besucher and Objekte fields. `SonF` pre-selects "Sonne" as the only object. `SF` (Sonderführung) additionally shows `SonderName` plus the mandatory `Spende` select (`bar`, `ueberw`, `kasse`, `keine` — labels in `SPENDE_MAP`); `SpendeBetrag` is only filled for `bar`. Both columns stay `NULL` for every other Art, enforced client-side in `LogbuchForm` and server-side in `spendeValues()` in `DB4js_all.php`.
## Deployment