Admin: Berichten-scherm met formulierschakelaar, lijst, detail en opnieuw mailen (CMS-U6)
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
+11
@@ -0,0 +1,11 @@
|
||||
# CMS-U6 — Admin UI "Berichten" (summary)
|
||||
|
||||
Frontend only. New feature folder `frontend/src/features/contact` (services, components, page, msw mocks, tests).
|
||||
|
||||
- Route `/messages` (Owner/Administrator, `ModuleGuard Contact`, plus `ContactAvailabilityGuard`: a 404 on `GET /contact-settings` means the host switch is off and the usual not-found page is shown). Sidebar entry "Berichten" only when capabilities list `Contact` and the settings call did not answer 404.
|
||||
- Form switch card (`role=switch`, state from the server response, first-time hint, translated errors).
|
||||
- List: chips Inbox/Nieuw/Gelezen/Gearchiveerd/Spam (Nieuw shows `unreadCount`), 25 per page, pager, empty states, spam only under its chip, mail status icons with text alternatives.
|
||||
- Detail dialog: line breaks kept, mailto link, status select, "Geen spam", delete with confirmation, resend (sent / not sent / 409 / 429 with Retry-After seconds / disabled with hint when mail is off), translated mail error code and next attempt time. Opening an unread message marks it read (decision approved).
|
||||
- Texts nl/en under `contact.*` and `nav.messages`; no API titles are shown.
|
||||
- Shared files touched (additive): `lib/api-client.ts` (new `patch` method), `Sidebar.tsx` (one entry), `router.tsx` (one route), `mocks/index.ts`, both translation files.
|
||||
- Verification: `pnpm lint` clean, `npx tsc -b` clean, vitest 58 files / 458 tests (26 new). Not touched: backend, auth/refresh, users, theme assets.
|
||||
Reference in New Issue
Block a user