Commit Graph

115 Commits

Author SHA1 Message Date
Matthias Hochmeister
5aa309b97a resolve issues with new features 2026-03-12 16:05:01 +01:00
Matthias Hochmeister
a5cd78f01f feat: bug fixes, layout improvements, and new features
Bug fixes:
- Remove non-existent `role` column from admin users SQL query (A1)
- Fix Nextcloud Talk chat API path v4 → v1 for messages/send/read (A2)
- Fix ServiceModeTab sync: useState → useEffect to reflect DB state (A3)
- Guard BookStack book_slug with book_id fallback to avoid broken URLs (A4)

Layout & UI:
- Chat panel: sticky full-height positioning, main content scrolls independently (B1)
- Vehicle booking datetime inputs: explicit text color for dark mode (B2)
- AnnouncementBanner moved into grid with full-width span (B3)

Features:
- Per-user widget visibility preferences stored in users.preferences JSONB (C1)
- Link collections: grouped external links in admin UI and dashboard widget (C2)
- Admin ping history: migration 026, checked_at timestamps, expandable history rows (C4)
- Service mode end date picker with scheduled deactivation display (C5)
- Vikunja startup config logging and configured:false warnings (C7)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-12 14:57:54 +01:00
Matthias Hochmeister
21b7be22db feat: service mode (maintenance mode)
Admins can toggle maintenance mode from the admin dashboard (new
"Wartung" tab). When active, all non-admin users see a full-page
maintenance screen instead of the app.

- Backend: GET /api/config/service-mode endpoint (authenticated)
- Backend: stores state in app_settings key 'service_mode'
- Frontend: ServiceModeGuard wraps all ProtectedRoutes
- Frontend: ServiceModePage full-screen maintenance UI
- Frontend: ServiceModeTab in admin dashboard with toggle + message
- Admins (dashboard_admin group) always bypass the guard

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-12 13:21:49 +01:00
Matthias Hochmeister
6c1cbb0ef3 fix: remove volatile NOW() from banner index predicate
PostgreSQL forbids volatile functions in partial index predicates.
Replace with two plain indexes on starts_at and ends_at instead —
the active-banner filtering is handled in the query WHERE clause.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-12 13:08:26 +01:00
Matthias Hochmeister
36c222d32a fix: remove Apple npm registry from lock files and .npmrc
Replace all artifacts.apple.com and npm.apple.com resolved URLs in
package-lock.json with registry.npmjs.org so `npm install` works on
any server without Apple VPN/proxy access.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-12 12:21:40 +01:00
Matthias Hochmeister
cf490cc9ad fix: install missing packages and fix TS errors
- Install @mui/x-data-grid in frontend (fixes AuditLog)
- Install jose in backend (fixes authentik service)
- Update .npmrc to use npm.apple.com proxy
- Fix AuditLog localeText to use MUI DataGrid v7 API keys
- Fix banner controller: cast req.params.id to string
- Remove unused logger import in banner.service.ts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-12 12:04:54 +01:00
Matthias Hochmeister
cd68bd3795 annoucement banners, calendar pdf export, vehicle booking quck-add, even quick-add 2026-03-12 11:47:08 +01:00
Matthias Hochmeister
71a04aee89 resolve issues with new features 2026-03-12 11:37:25 +01:00
Matthias Hochmeister
d5be68ca63 resolve issues with new features 2026-03-12 10:21:26 +01:00
Matthias Hochmeister
31f1414e06 adding chat features, admin features and bug fixes 2026-03-12 08:16:34 +01:00
Matthias Hochmeister
7b14e3d5ba fix bookstack search 2026-03-11 14:02:25 +01:00
root
34f577bf06 fix backend npm 2026-03-11 13:53:44 +01:00
Matthias Hochmeister
3c9b7d3446 apply security audit 2026-03-11 13:51:01 +01:00
Matthias Hochmeister
93a87a7ae9 apply security audit 2026-03-11 13:18:10 +01:00
Matthias Hochmeister
e9463c1c66 add vikunja integration 2026-03-05 18:07:18 +01:00
Matthias Hochmeister
d27d2931a5 calendar download, date input validate, nc talk notification 2026-03-04 14:39:39 +01:00
Matthias Hochmeister
d3561c1109 new features, bookstack 2026-03-03 21:30:38 +01:00
Matthias Hochmeister
817329db70 add features 2026-03-03 17:03:27 +01:00
Matthias Hochmeister
5a6fc85a75 add features 2026-03-03 17:01:53 +01:00
Matthias Hochmeister
c431c1af83 userId bug 2026-03-03 15:00:53 +01:00
Matthias Hochmeister
5dfaf7db54 bug fixes 2026-03-03 14:45:46 +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
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
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
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
681acd8203 add now features 2026-03-01 11:50:27 +01:00
Matthias Hochmeister
4476ca82de fix login error 2026-02-28 17:35:57 +01:00
Matthias Hochmeister
e2be29c712 refine vehicle freatures 2026-02-28 17:19:18 +01:00
Matthias Hochmeister
b7b883649c rework vehicle handling 2026-02-28 14:13:56 +01:00
Matthias Hochmeister
06f94a6a48 rework vehicle handling 2026-02-28 14:02:31 +01:00
Matthias Hochmeister
1e478479be rework vehicle handling 2026-02-28 13:57:41 +01:00
Matthias Hochmeister
41fc41bee4 rework vehicle handling 2026-02-28 13:34:16 +01:00
Matthias Hochmeister
84cf505511 featur add fahrmeister 2026-02-27 21:55:13 +01:00
Matthias Hochmeister
dbe4f52871 featur add fahrmeister 2026-02-27 21:46:50 +01:00
Matthias Hochmeister
da4a56ba6b fix backend 2026-02-27 21:08:52 +01:00
Matthias Hochmeister
d7a0d18899 fix backend 2026-02-27 20:46:21 +01:00