1
0
Fork 0
Commit Graph

301 Commits

Author SHA1 Message Date
Jonny 02c9274c13 fix: paginate auth.admin.listUsers() in Nutzerliste query 2026-07-15 10:42:24 +02:00
Jonny 3013a7d52c feat: add Nutzerliste query (merges profiles with auth.admin.listUsers) 2026-07-14 22:08:04 +02:00
Jonny 371312fc89 test: add exact 8-character password boundary case 2026-07-14 22:04:32 +02:00
Jonny 147f601e34 feat: add validation for Nutzer-Erstellen, Rolle and Selbstschutz 2026-07-14 22:00:27 +02:00
Jonny 8db31c72a8 feat: add Supabase admin client and service-role-key wiring 2026-07-14 21:56:15 +02:00
Jonny 5ad147088c docs: add Nutzerverwaltung implementation plan
Admin-Client mit Service-Role-Key, Validierung, Nutzerliste-Merge aus
profiles + auth.admin.listUsers, vier Server Actions und die Seite in
6 Tasks.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-14 18:48:55 +02:00
Jonny cffd576451 docs: add Nutzerverwaltung design spec
Admin kann Nutzer anlegen, Rollen aendern und ueber die Supabase Admin
API sperren/entsperren -- RLS ist hier bewusst nicht die Grenze, die
Server-Action-Rollenpruefung ist es.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-14 18:35:24 +02:00
Jonny 90ed4d764f fix: unify Zeiterfassung timezone display and add DB guard against double clock-in
Page and CSV export now both render shift timestamps in Europe/Berlin
consistently (previously CSV used UTC, page used server-local time,
causing the same shift to show different clock times in each place).
Also adds a partial unique index so two near-simultaneous Kommen
requests for the same fahrer can no longer create two open shifts --
the existing app-layer check was check-then-act with no DB backstop.
2026-07-14 10:27:50 +02:00
Jonny d87e881d0e feat: add Zeiterfassung link to navigation 2026-07-14 09:11:39 +02:00
Jonny 02dfc2b23e feat: add Zeiterfassung page with Kommen/Gehen, Korrektur and CSV export 2026-07-14 09:03:57 +02:00
Jonny c3cdfc9ac7 feat: add Zeiterfassung server actions (kommen, gehen, korrigieren, csv export) 2026-07-14 08:51:53 +02:00
Jonny d8ccdc85ca feat: add Zeiterfassung query helpers (Schichten, offene Schichten, verknuepfte Auftraege) 2026-07-14 08:45:27 +02:00
Jonny b1da32ae7a test: add bare-CR quoting case for CSV export 2026-07-13 17:11:44 +02:00
Jonny 45612501df fix: harden CSV export against formula injection and CR row corruption
Fields starting with =, +, -, @, tab, or CR are now neutralized with a
leading single quote before quoting, closing a CSV/spreadsheet formula
injection gap (CWE-1236) flagged by automated security review. Also
closes a bare-CR gap in the RFC 4180 escape trigger set.
2026-07-13 17:02:07 +02:00
Jonny 9f2b2d292e feat: add CSV export helper for Zeiterfassung 2026-07-13 16:57:21 +02:00
Jonny b8a7509363 feat: add Tages-/Wochensummen aggregation for Zeiterfassung 2026-07-13 16:51:40 +02:00
Jonny 070b1287c1 test: add invalid-date case for validateSchichtKorrektur 2026-07-13 16:48:51 +02:00
Jonny d91765bd69 feat: add validation for Schicht-Korrektur (geht_um after kommt_um) 2026-07-13 16:44:30 +02:00
Jonny 3fe33c5e0f feat: add pure pause/netto time calculation per §4 ArbZG 2026-07-13 16:31:35 +02:00
Jonny b49314e67f fix: close arbeitszeiten INSERT audit-trail gap and policy name length
INSERT policy now requires a fahrer's own shift to start open and
uncorrected (geht_um/korrigiert_von/korrigiert_am all null) — closes a
gap where a fahrer could forge a pre-corrected row. Also shortens a
policy name that exceeded Postgres' 63-byte identifier limit and was
being silently truncated.
2026-07-13 16:24:53 +02:00
Jonny 8d76230f02 feat: add arbeitszeiten table with RLS and fahrer column-lockdown trigger 2026-07-13 16:11:38 +02:00
Jonny cd6fa14551 docs: add Zeiterfassung implementation plan
Kommen/Gehen-Tabelle mit Column-Lockdown-Trigger, Pausenpauschale nach
§4 ArbZG, Aggregation, CSV-Export und Korrektur-Workflow in 9 Tasks.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-13 15:53:20 +02:00
Jonny 50b511fe9c docs: add Zeiterfassung design spec
Kommen/Gehen-Modul mit Pausenpauschale nach §4 ArbZG, Auswertung und
Korrekturmoeglichkeit durch Disponent/Admin.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-13 15:39:01 +02:00
Jonny 7e58c55eaa docs: add merge/worktree gotchas to CLAUDE.md (/init)
Documents three frictions repeatedly hit this session: npm install
needed in the main repo after merging branches with new deps, manual
migration sync for the docker-compose master stack, and Edit/Write
worktree-isolation scope.
2026-07-08 18:13:41 +02:00
Jonny e038facd92 Merge branch 'feature/kanban-dashboard'
# Conflicts:
#	CLAUDE.md
2026-07-08 15:51:30 +02:00
Jonny 87e6f0c0fb docs: add Design section to CLAUDE.md
Widmann-inspired design reference and mobile-first requirement.
2026-07-08 15:50:02 +02:00
Jonny 23ab39bbe9 fix: add keyboard drag support and hide drag handles for readonly role
- KeyboardSensor zu useSensors ergänzt, damit Kanban-Karten auch per
  Tastatur verschoben werden koennen (Design-Spec fordert Maus/Touch/
  Tastatur-Bedienung).
- KanbanKarte erhaelt rolle-Prop; fuer rolle "readonly" werden
  useDraggable-listeners/attributes nicht angewendet (disabled: true),
  sodass keine Drag-Handles/Grab-Cursor angezeigt werden. Navigation zur
  Detailseite bleibt unveraendert klickbar.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-08 13:42:00 +02:00
Jonny a82e31d75e feat: wire Kanban board into the dashboard page 2026-07-08 08:21:13 +02:00
Jonny affa6961ab docs: add Claude working-conventions section to CLAUDE.md (/init)
Also reconciles the worktree's stale CLAUDE.md snapshot with the
Design/Mobile-First section the user had added independently (uncommitted
in the main checkout) — this worktree branched before that edit landed.
Unrelated to the Kanban feature itself.
2026-07-08 08:14:43 +02:00
Jonny d873d6d97b feat: add Fahrer-Auswaehler dialog for Disponent/Admin assignment 2026-07-08 08:11:17 +02:00
Jonny 3f77f10520 feat: add KanbanBoard with drag-and-drop for offen->zugewiesen (fahrer) and ->storniert 2026-07-08 07:36:38 +02:00
Jonny 8dc7eda1b6 chore: add repo tooling skills and eslint-on-edit hook (/init)
Three skills documenting non-obvious project conventions discovered
repeatedly during development (supabase-local-dev, curl-server-action,
rebuild-master-stack, the last one user-triggered only), plus a
PostToolUse hook that runs eslint --fix on edited web/*.ts(x) files
for fast feedback. Unrelated to the Kanban feature itself; bundled
into this branch because the harness's worktree isolation required
writing here rather than on master directly.
2026-07-07 21:47:09 +02:00
Jonny f62ef64863 feat: add Kanban board server actions (result-based, no redirect) 2026-07-07 21:45:24 +02:00
Jonny d0017a45b1 feat: add Kanban query helpers (grouped by status, fahrer list) 2026-07-07 21:35:59 +02:00
Jonny 4c0b9772f2 feat: add pure permission helper for Kanban drag targets 2026-07-07 19:39:37 +02:00
Jonny bb9ac2afe6 feat: allow disponent to see fahrer profiles for Kanban assignment 2026-07-07 15:35:40 +02:00
Jonny 70d68d6b6b docs: add Kanban-Dashboard implementation plan
7 tasks: RLS policy for disponent-sees-fahrer-profiles (needed for the
assignment picker), pure drag-permission helper, Kanban query layer,
result-based server actions for the board context (deliberately not
reusing the redirect-based form actions), the KanbanBoard component
with @dnd-kit/core, the Fahrer-Auswaehler dialog, and wiring into the
dashboard page.
2026-07-07 15:26:33 +02:00
Jonny 1d148e0db0 docs: add Kanban-Dashboard design spec
Replaces the Dashboard placeholder with an interactive Kanban board
(drag-and-drop via @dnd-kit/core, touch-capable per the mobile-first
requirement). Reuses existing RLS-driven visibility and the
uebernehmen()/stornieren() actions; adds one new server action
(zuweisenAnFahrer) for Disponent/Admin assigning orders to a specific
Fahrer, a gap that existed since the original Auftragsverwaltung scope.
2026-07-07 15:18:50 +02:00
Jonny 1c5b2a107f chore: merge duplicate mutations import in stammdaten actions
Found by the final whole-branch review — two separate import
statements from the same module (accumulated across Tasks 4 and 5).
Cosmetic only, no behavior change.
2026-07-07 14:45:12 +02:00
Jonny 116e78fdc6 feat: add inline Fahrzeug quick-add to Auftrag-anlegen page
Adds createFahrzeugUndAuswaehlen (unbound server action) so a new
Fahrzeug can be created inline from /auftraege/neu without leaving
the page, mirroring the existing Ort quick-add flow from Task 6.
Includes an app-layer admin/disponent role check as defense-in-depth
alongside RLS, consistent with the pattern already applied to
createOrtUndAuswaehlen and the page-level gate.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-07 09:39:38 +02:00
Jonny e55ab12c2b fix: add defense-in-depth role check to createOrtUndAuswaehlen 2026-07-07 09:13:29 +02:00
Jonny 69c22f9afe feat: add inline Ort quick-add to Auftrag-anlegen page 2026-07-07 08:47:42 +02:00
Jonny 08184d2166 fix: add defense-in-depth role check to Stammdaten server actions 2026-07-07 08:21:50 +02:00
Jonny 1e7415c81c feat: add Fahrzeuge section to Stammdaten page 2026-07-06 20:20:47 +02:00
Jonny 36c941cad9 feat: add Stammdaten page with Orte list, create and edit 2026-07-06 20:01:40 +02:00
Jonny be232a9391 test: add pgTAP coverage for orte/fahrzeuge RLS policies 2026-07-06 19:43:39 +02:00
Jonny d8990ba57b feat: add query and mutation helpers for orte and fahrzeuge 2026-07-06 19:35:25 +02:00
Jonny 4795ea1f32 feat: add validation helpers for orte and fahrzeuge 2026-07-06 19:31:33 +02:00
Jonny ebbb5d67a4 docs: add Stammdaten (Orte/Fahrzeuge) implementation plan
7 tasks: validation helpers, query/mutation data layer, pgTAP RLS
coverage (a gap that predates this plan), Stammdaten page for Orte
and Fahrzeuge (list+create+edit), and inline quick-add for both on
the Auftrag-anlegen form. No schema/RLS changes - reuses existing
insert/update policies from the Auftragsverwaltung foundation.
2026-07-06 19:27:57 +02:00
Jonny 1c9be22df2 docs: add Stammdaten (Orte/Fahrzeuge) design spec
Closes a gap found during the first live design-system test: no UI
existed to create new Abholorte/Zielorte/Fahrzeuge (only dropdowns of
existing entries). No schema change needed - RLS already supports
admin/disponent insert/update on orte/fahrzeuge. Covers a new
/stammdaten management page (list+create+edit) plus an inline
quick-add on the Auftrag-anlegen form.
2026-07-06 19:07:14 +02:00