Both admin note fields lacked maxLength enforcement on the client despite
server Zod schemas using PATIENT_NOTE_MAX_LENGTH. Now consistent.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Network error handling:
- DocumentAddForm, ProgrammeAssignmentForm, InlineMessageCompose,
AdminNotesForm all lacked try/catch — buttons stuck on network failure
SSOT fix:
- Added DOCUMENT_MAX_FILE_SIZE_MB = 20 to lib/config/portal.ts
- Upload route now derives MAX_BYTES from the constant instead of
hardcoding 20 * 1024 * 1024
- DocumentAddForm label now reads the constant instead of 'max 20 MB'
— changing the limit in one place updates validation + UI label
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
/en/dashboard, /de/profile, etc. now redirect to /dashboard, /profile
instead of 404ing. The intlMiddleware only handles marketing pages;
portal routes must be stripped of their locale prefix first.
Also refactors DocumentAddForm, InlineMessageCompose, AdminNotesForm
to replace all inline styles with admin.module.css classes.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>