Integrate name suggestions into encounter registration UI

Add clickable suggestion chips below the nickname input in the encounter
modal. Chips are fetched from GET /runs/{id}/name-suggestions via React
Query, shown only when a naming scheme is set. Clicking a chip fills in
the nickname; a regenerate button fetches a fresh random batch. Completes
the Name Generation epic.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-11 21:48:29 +01:00
parent 2ac6c23577
commit 39d18c241e
6 changed files with 69 additions and 13 deletions

View File

@@ -32,3 +32,7 @@ export function deleteRun(id: number): Promise<void> {
export function getNamingCategories(): Promise<string[]> {
return api.get('/runs/naming-categories')
}
export function getNameSuggestions(runId: number, count = 10): Promise<string[]> {
return api.get(`/runs/${runId}/name-suggestions?count=${count}`)
}