Support the read-only calendar role, show "Vorstand", fix link buttons
- Read-only role: /admin/me's permissions decide via canEditCalendar (lib/permissions.ts, mirrors the API's canWrite: only `access` writes). Read-only accounts see everything but get no "Neuer Termin", no "+", no "Veröffentlichen"; an event opens as "Termin ansehen" with locked fields. A "Nur lesen" badge in the header explains why. The API refuses their writes regardless. - The management calendar is labelled "Vorstand"; the slug stays `management` for the API, URLs and iCal links. - The subscription dialog's Apple/Google links are plain anchors styled with buttonVariants instead of Base UI Buttons rendering an <a>, which warned in dev and would have given them role="button". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
16 files changed
+155
-32
No files matched your search
@@ -237,7 +237,7 @@ Decisions made while implementing (not asked explicitly - revisit if wrong):
|
||||
- Recurring events appear under "Kommend" and "Alle", never under "Vergangen".
|
||||
- A yearly event on 29 Feb falls on 28 Feb in common years.
|
||||
- An unknown `status` from the API is treated (and saved back) as `PRIVATE`, never as `PUBLIC`.
|
||||
- Calendar labels: Öffentlich, Mitglieder, Chor, Management, Geburtstage.
|
||||
- Calendar labels: Öffentlich, Mitglieder, Chor, Management, Geburtstage. (2026-11-08: "Management" renamed to "Vorstand" at the user's request; the slug stays `management`.)
|
||||
- New events default to `DRAFT`, like the Angular app.
|
||||
Facts found along the way (move to `docs/gotchas.md` in phase 8):
|
||||
- The API returns raw DB rows: `wholeDay` is most likely `0`/`1` (inferred from the MariaDB
|
||||
|
||||
Reference in new issue
Block a user