Commit Graph

398 Commits

Author SHA1 Message Date
Matthias Hochmeister
c431c1af83 userId bug 2026-03-03 15:00:53 +01:00
Matthias Hochmeister
b3a2fd9ff9 feat: responsive widgets, atemschutz permission UX, event hard-delete
- fix dashboard grid: use auto-fill instead of auto-fit for equal-width widgets
- atemschutz: skip stats/members API calls for non-privileged users, hide
  empty Aktionen column, add personal status subtitle
- kalender: add permanent delete option for events with confirmation dialog

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 14:59:08 +01:00
Matthias Hochmeister
5dfaf7db54 bug fixes 2026-03-03 14:45:46 +01:00
Matthias Hochmeister
004b141cab bug fixes 2026-03-03 13:27:27 +01:00
Matthias Hochmeister
02cf5138cf fix: dashboard layout, widget caching, and backend stability
Layout:
- Remove Container maxWidth cap so widgets scale fluidly on wide screens
- Fix ActivityFeed Card missing height:100% and overflow:hidden that caused
  the timeline connector pseudo-element to bleed outside the card boundary

Performance (frontend):
- Migrate VehicleDashboardCard, EquipmentDashboardCard, AtemschutzDashboardCard,
  UpcomingEventsWidget, and PersonalWarningsBanner from useEffect+useState to
  TanStack Query — cached for 5 min, so navigating back to the dashboard no
  longer re-fires all 9 API requests
- Add gcTime:10min and refetchOnWindowFocus:false to QueryClient defaults to
  prevent spurious refetches on tab-switch

Backend stability:
- Raise default RATE_LIMIT_MAX from 100 to 300 req/15min — the previous limit
  was easily exceeded by a single active user during normal dashboard navigation
- Increase DB connectionTimeoutMillis from 2s to 5s to handle burst-load
  scenarios where multiple requests compete for pool slots simultaneously

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 12:55:16 +01:00
Matthias Hochmeister
d91f757f34 bug fixes 2026-03-03 11:45:08 +01:00
Matthias Hochmeister
3101f1a9c5 fix: five dashboard improvements across booking, vehicles, profile, and UI
- fix(auth): guard extractNames() against Authentik sending full name in
  given_name field (e.g. "Matthias Hochmeister" + family_name "Hochmeister");
  detect by checking given_name ends with family_name suffix, fall through
  to name-splitting so Vorname/Nachname display correctly in Profile

- fix(db): add migration 018 to repair broken BEFORE UPDATE triggers on
  veranstaltungen and veranstaltung_kategorien; old triggers called
  update_updated_at_column() which references NEW.updated_at, but both
  tables use aktualisiert_am, causing every category/event edit to fail

- feat(booking): open vehicle booking creation to all authenticated users;
  only dashboard_admin / dashboard_moderator can change the Buchungsart
  (type select disabled for regular members); edit and cancel still
  restricted to WRITE_GROUPS

- feat(vehicles): VehicleDashboardCard now fetches equipment warnings via
  equipmentApi.getVehicleWarnings() in parallel and shows an alert when
  any vehicle equipment is not einsatzbereit

- fix(ui): add MuiTextField defaultProps (InputLabelProps.shrink=true) and
  MuiOutlinedInput notch legend font-size override to theme to eliminate
  floating-label / border conflict on click

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 11:04:57 +01:00
Matthias Hochmeister
2306741c4d feat: dashboard widgets, auth fix, profile names, dynamic groups
- Add VehicleDashboardCard: self-contained widget modelled after
  AtemschutzDashboardCard, shows einsatzbereit ratio and inspection
  warnings inline; replaces StatsCard + InspectionAlerts in Dashboard

- Add EquipmentDashboardCard: consolidated equipment status widget
  showing only aggregated counts (no per-item listing); replaces
  EquipmentAlerts component in Dashboard

- Fix auth race condition: add authInitialized flag to api.ts so 401
  responses during initial token validation no longer trigger a
  spurious redirect to /login; save intended destination before login
  redirect and restore it after successful auth callback

- Fix profile firstname/lastname: add extractNames() helper to
  auth.controller.ts that falls back to splitting userinfo.name when
  Authentik does not provide separate given_name/family_name fields;
  applied on both create and update paths

- Dynamic groups endpoint: replace hardcoded KNOWN_GROUPS array in
  events.controller.ts with a DB query (SELECT DISTINCT unnest
  (authentik_groups) FROM users); known slugs get German labels via
  lookup map, unknown slugs are humanized automatically

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-03 10:28:31 +01:00
Matthias Hochmeister
831927ae90 featuer change for calendar 2026-03-03 09:56:35 +01:00
Matthias Hochmeister
232d8aa872 featuer change for calendar 2026-03-03 09:55:18 +01:00
Matthias Hochmeister
64b23bae5c featuer change for calendar 2026-03-03 09:53:23 +01:00
Matthias Hochmeister
d9af34b744 featuer change for calendar 2026-03-03 09:52:10 +01:00
Matthias Hochmeister
146f79cf00 featuer change for calendar 2026-03-03 08:57:32 +01:00
Matthias Hochmeister
ad069fde10 calendar: add category-group links, fix iCal share URL, remove legend
- Link categories to user groups via new zielgruppen column on
  veranstaltung_kategorien (migration 017), editable in the category
  management UI with group checkboxes and chip display
- Fix broken iCal share link by adding ICAL_BASE_URL to docker-compose
  and falling back to CORS_ORIGIN when ICAL_BASE_URL is unset
- Remove the colored-dot legend footer from the month calendar view

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-03 08:10:33 +01:00
Matthias Hochmeister
9a6b9511c8 featuer change for calendar 2026-03-02 17:26:01 +01:00
Matthias Hochmeister
314b6c3bed featuer change for calendar 2026-03-02 16:59:24 +01:00
Matthias Hochmeister
355163820f bug fix for atemschutz 2026-03-01 19:21:34 +01:00
Matthias Hochmeister
6495ca94d1 bug fix for atemschutz 2026-03-01 19:19:12 +01:00
Matthias Hochmeister
2630224edd bug fix for atemschutz 2026-03-01 19:17:36 +01:00
Matthias Hochmeister
d9e6c0658f bug fix for atemschutz 2026-03-01 18:21:00 +01:00
Matthias Hochmeister
46d0895ebd bug fix for atemschutz 2026-03-01 18:15:14 +01:00
Matthias Hochmeister
5f0ed3c87e bug fix for atemschutz 2026-03-01 18:11:00 +01:00
Matthias Hochmeister
d074caa695 bug fix for atemschutz 2026-03-01 18:07:17 +01:00
Matthias Hochmeister
4328343f3e bug fix for atemschutz 2026-03-01 17:59:40 +01:00
Matthias Hochmeister
e0b687988b bug fix for atemschutz 2026-03-01 17:27:39 +01:00
Matthias Hochmeister
9b1f290a87 bug fix for atemschutz 2026-03-01 17:19:33 +01:00
Matthias Hochmeister
faa18b5688 bug fix for atemschutz 2026-03-01 15:03:27 +01:00
Matthias Hochmeister
4f7823ab16 bug fix for atemschutz 2026-03-01 15:01:30 +01:00
Matthias Hochmeister
a36e236175 bug fix for atemschutz 2026-03-01 14:53:46 +01:00
Matthias Hochmeister
064972e88a bug fix for atemschutz 2026-03-01 14:48:25 +01:00
Matthias Hochmeister
5b8f40ab9a add now features 2026-03-01 14:41:45 +01:00
Matthias Hochmeister
e76946ed8a add now features 2026-03-01 14:12:28 +01:00
Matthias Hochmeister
b7adf238ed chore: temporarily remove fdisk-sync from docker-compose and Makefile
Build is blocked by Apple npm proxy stripping devDependencies inside
Docker. Removing the service keeps the rest of the stack functional.
The sync/ directory and migration remain in place for when the build
issue is resolved.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 14:07:28 +01:00
Matthias Hochmeister
b54e400c48 fix: add .npmrc to sync service to use public npm registry
The server has an Apple npm proxy that silently drops devDependencies.
Copying the same .npmrc fix used by the frontend (registry=registry.npmjs.org)
resolves the issue.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 14:04:02 +01:00
Matthias Hochmeister
67ea0ba1f6 fix: move ENV PATH before npm ci to bust stale Docker cache layer
The cached npm ci layer predates the ENV PATH instruction, so tsc was
never on PATH when the build ran. Moving ENV PATH earlier changes the
cache key and forces a fresh install.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 13:59:19 +01:00
Matthias Hochmeister
a880e56bb1 fix: use node:20-alpine in sync builder, matching backend Dockerfile
node:20-slim picks up the Apple npm proxy which blocks installs.
node:20-alpine does not. Also add PATH for node_modules/.bin so tsc
is found, and remove committed dist/ since the build now works properly.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 13:56:37 +01:00
Matthias Hochmeister
02797554aa fix: commit pre-compiled dist and simplify sync Dockerfile
Server npm proxy silently drops devDependencies, making TypeScript
unavailable in Docker. Solution: compile locally and commit dist/.
Dockerfile now only needs prod deps + Playwright, both of which
install cleanly via the public registry.

Also fix TS2688/TS2304 errors: add DOM to tsconfig lib and cast
querySelectorAll results to Element inside $$eval callbacks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 13:51:48 +01:00
Matthias Hochmeister
acd1506df8 fix: remove --ignore-scripts from npm install in sync builder
--ignore-scripts prevented @types/* packages from being installed,
causing tsc to fail on missing type definitions.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 13:48:32 +01:00
Matthias Hochmeister
fad71d32fe fix: install typescript globally and use --ignore-scripts to avoid proxy failures
Install tsc globally so it's available on PATH regardless of
devDependency resolution issues. Use --ignore-scripts and explicit
registry to work around Apple npm proxy interference.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 13:46:14 +01:00
Matthias Hochmeister
2eeb206663 fix: copy node_modules from build context instead of running npm install
The server's npm proxy intercepts and silently fails devDependency
installs inside Docker. Bundle node_modules directly from the local
checkout where they are known-good.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 13:45:02 +01:00
Matthias Hochmeister
f559313eae fix: use public npm registry in sync builder to avoid Apple registry failures
npm.apple.com causes silent install failures for devDependencies inside
the Docker build context. Explicitly use registry.npmjs.org for the
builder stage.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 13:42:37 +01:00
Matthias Hochmeister
c4d9be9027 debug: verify tsc presence after npm install in sync builder
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 13:39:34 +01:00
Matthias Hochmeister
9f5ef15590 fix: set NODE_ENV=development in sync builder to install devDependencies
node:20-slim defaults NODE_ENV=production which causes npm to skip dev
deps (typescript, ts-node), preventing tsc from being found.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 13:36:32 +01:00
Matthias Hochmeister
dee27200ce fix: use npm install and explicit package-lock.json COPY in sync Dockerfile
Avoids stale Docker layer cache issue where tsc was not found because
an old npm ci layer (without dev deps) was cached on the build host.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-01 13:33:42 +01:00
Matthias Hochmeister
e6c2a01b8a add now features 2026-03-01 12:36:53 +01:00
Matthias Hochmeister
3b7e1d0ed9 add now features 2026-03-01 12:14:38 +01:00
Matthias Hochmeister
2e08eef04e add now features 2026-03-01 12:11:39 +01:00
Matthias Hochmeister
e5986b5a8b add now features 2026-03-01 12:08:41 +01:00
Matthias Hochmeister
c5da8b07ae add now features 2026-03-01 12:03:11 +01:00
Matthias Hochmeister
681acd8203 add now features 2026-03-01 11:50:27 +01:00