As a user I want the second person field to only show correspondents of the first person so I never see an empty conversation #29
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?
Background
When a user enters Person A in the sender field, the receiver typeahead currently shows all persons. Most combinations have no documents at all, leading to the empty state "Keine Dokumente gefunden". This is confusing and forces trial and error.
Desired behaviour
Implementation notes
Backend:
GET /api/persons/{id}/correspondentsqquery parameter for name filtering (used when the user types)documentsanddocument_receivers, count matches per counterpart, order by count DESC, limit 10Frontend:
PersonTypeaheadchangesrestrictToCorrespondentsOf?: stringprop (the other person's ID)/api/persons/{id}/correspondents(noqparam)/api/persons/{id}/correspondents?q=...instead of/api/persons?q=.../api/persons?q=...)Coding rules to keep in mind
PersonController, logic inPersonService, query inPersonRepositoryPersonTypeaheadcomponent change minimal — one extra optional prop, no flag argumentsPersonServiceTestunit test for the new service method