Commit graph

77 commits

Author SHA1 Message Date
1de2f7274d refactor: migrate DisclosuresPage to TanStack Query
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 18:23:46 +00:00
4b4af6b42d refactor: migrate DashboardPage to TanStack Query
Replace manual useState/useEffect data fetching with useDashboard hook
that uses TanStack Query for automatic caching, refetching, and loading
state management.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 18:21:33 +00:00
28ad5c09ad feat: add TanStack Query with QueryClientProvider
Install @tanstack/react-query v5 and wrap the app with
QueryClientProvider as foundation for server-state management.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 18:18:37 +00:00
99767fe6fe fix: replace favicon with updated version
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 17:56:23 +00:00
773d5c6e7a feat: add custom favicon for DAK Zweitmeinungs-Portal
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 17:52:19 +00:00
1612d449c0 fix: make nachname nullable in CaseResponse to support data masking
CaseResponse.nachname was required (str) but the masking function sets
it to None for dak_mitarbeiter. This caused Pydantic validation errors
(500) making the case list empty for non-admin users.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 16:24:56 +00:00
31a2d5a355 feat: add disclosure admin route and sidebar entry
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 16:14:14 +00:00
810a13b2d8 feat: add admin disclosures page for reviewing data access requests
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 16:13:13 +00:00
62a56f3fc9 feat: add disclosure request UI and field visibility for dak_mitarbeiter
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 16:11:47 +00:00
f2219b487b feat: hide personal data columns for dak_mitarbeiter in case list
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 16:09:43 +00:00
3e9448ab33 feat: add disclosure types and service functions
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 16:08:38 +00:00
480f851836 fix: dashboard weekly chart shows correct stacked breakdown
Change stacked bar chart from erstberatungen+unterlagen+gutachten
(overlapping, incorrect) to ablehnungen+keine_rm+gutachten (disjoint
categories that sum to total cases per KW, matching Excel Sheet 1).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 11:12:30 +00:00
5f7b4c6e1d feat: add /account route, sidebar entry and header link
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 09:48:43 +00:00
45cadd07ce feat: add AccountPage with Profile, Security, and MFA tabs
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 09:46:52 +00:00
832f5c0a63 feat: add profile/avatar/MFA types and service functions
Extend User and UserResponse interfaces with first_name, last_name,
display_name, avatar_url fields. Add ProfileUpdatePayload,
ChangePasswordPayload, MFASetupResponse, MFAVerifyPayload types.
Add authService functions for profile update, avatar upload/delete,
password change, and MFA setup/verify/disable. Add refreshUser to
AuthContext so components can re-fetch user data after changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 09:42:46 +00:00
7e9373a6d0 fix: use sentinel value for empty Radix Select option to prevent crash
Radix UI Select.Item does not allow empty string values. The Anrede
dropdown used value="" for the empty option, causing the entire React
app to crash when entering edit mode. Use '__none__' sentinel value
instead and convert to null on selection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 12:59:32 +00:00
19db4c5def feat: make all case detail fields editable with edit-mode toggle
Replace individual field editors (KVNR, ICD) with a unified edit-mode
approach using data-driven field configuration. A single "Bearbeiten"
button toggles all fields into edit mode with dirty-tracking and
split-save (KVNR via dedicated endpoint for all users, remaining fields
via admin-only general update endpoint).

- Extend Case TypeScript interface with 17 missing backend fields
- Add declarative field config (7 sections, 30 fields) in fieldConfig.ts
- Add useInlineEdit hook with dirty-tracking and split-save logic
- Add EditableField dual-mode component (text/date/boolean/select/textarea)
- Refactor CaseDetail to render sections from config
- ICD section retains its own endpoint with separate save button

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 11:23:03 +00:00
97731552c5 feat: add editable KVNR field in case detail view with dedicated API endpoint
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 11:07:49 +00:00
ab0ed453fa fix: rename Faelle to Fälle in sidebar, add KVNR column to cases table
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 10:50:42 +00:00
7ef1fc9335 feat: add checkbox selection and bulk delete for reports
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 10:40:19 +00:00
1edf5835be feat: add dark mode toggle in header and login page
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 10:02:41 +00:00
f12f664ce5 fix: prevent pie chart labels from being clipped
Move Fallgruppen names into a Legend below the chart instead of
inline labels that overflow the container. Reduce pie radius to
leave breathing room.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 09:13:00 +00:00
006ffd5254 feat: coding queue, reports, notifications, and admin pages
- CodingPage: card-based queue with Fallgruppe filter, coding form per case
- ReportsPage: report generation (admin), download, report history table
- Notifications: real-time bell dropdown in Header with polling, mark-read
- AdminUsersPage: user list, create/edit dialogs with role & active toggle
- AdminInvitationsPage: create invitations, copy token, status badges
- AdminAuditPage: filterable log with expandable old/new values

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 08:39:56 +00:00
5cbef969fb feat: dashboard, cases, import, and ICD pages with full functionality
Implement the four core frontend pages for the DAK Zweitmeinungs-Portal:
- DashboardPage: KPI cards, weekly stacked bar chart, fallgruppen donut chart, year selector
- CasesPage: filterable/searchable paginated table with detail slide-out and inline ICD editing
- ImportPage: CSV upload with preview/confirm, ICD Excel upload, import history log
- IcdPage: reuses CasesPage with pending-icd-only filter

Also adds shadcn/ui components (table, select, tabs, skeleton, scroll-area) and
new TypeScript types for import log and ICD import responses.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 08:32:18 +00:00
0767e1ed18 feat: auth context, login/register pages, app layout with routing
- Task 19: TypeScript types for all API entities, axios client with JWT
  refresh interceptor, auth service, AuthContext provider, ProtectedRoute
- Task 20: Login page with MFA support, Register page with invitation
  token support, German labels, zod validation
- Task 21: Responsive sidebar with role-aware navigation, header with
  user dropdown, AppLayout with Sheet for mobile, full React Router setup
  with placeholder pages for all routes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 08:21:00 +00:00
aea967acf8 feat: frontend setup — React, Vite, TypeScript, Tailwind CSS v4, shadcn/ui
Scaffold the DAK Zweitmeinungs-Portal frontend with:
- Vite 7.3 + React 19 + TypeScript 5.9
- Tailwind CSS v4 with @tailwindcss/vite plugin
- shadcn/ui (new-york style, neutral base color) with button, input, label, card components
- Path alias @/* -> src/* configured in tsconfig and vite
- API proxy: /api/* -> http://localhost:8000
- Core deps: react-router-dom, axios, recharts

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 08:14:36 +00:00
5d57b1f349 feat: project scaffolding with FastAPI, config, database connection
- Initialize project structure with backend/app/ package layout
- Add FastAPI app with CORS middleware and health check endpoint
- Add Pydantic Settings config with DB, JWT, SMTP, and app settings
- Add SQLAlchemy database engine and session management
- Add requirements.txt with all dependencies (FastAPI, SQLAlchemy, Alembic, etc.)
- Add .env.example template and .gitignore
- Add empty frontend/ and backend test scaffolding
- Include project specification and design/implementation plans

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-24 07:24:00 +00:00