feat: show received documents on person detail page #1
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The person detail page (
/persons/[id]) currently only lists documents where the person is the sender. It should also show documents where the person is a receiver.Proposed Change
Split the documents section into two lists:
Backend
Check whether
GET /api/persons/{id}/documentsalready returns received documents, or whether a separate endpoint / query parameter is needed (e.g.?role=receiver).Frontend
Update
persons/[id]/+page.server.tsto load both sets (potentially in parallel viaPromise.all), and updatepersons/[id]/+page.svelteto render both sections.Extension: Paginate document lists (frontend-only)
Both the Gesendete Dokumente and Empfangene Dokumente sections can grow very large. To keep the page manageable, only the first 5 documents should be shown initially, with a "Mehr anzeigen" button to reveal the rest.
Approach
Pure frontend state — no backend changes needed. All documents are loaded at once (existing behaviour); only the render is capped.
Render only
data.sentDocuments.slice(0, sentLimit), then conditionally show a load-more button:Same pattern for received documents.
Acceptance Criteria
marcel referenced this issue2026-04-25 17:00:44 +02:00