feat(persons): enrich /persons list with stats bar, life dates, doc count chip
Load /api/stats in parallel; PersonsStatsBar shows totals; person cards show alias, life date range, and document count badge. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
26
frontend/src/routes/persons/PersonsStatsBar.svelte
Normal file
26
frontend/src/routes/persons/PersonsStatsBar.svelte
Normal file
@@ -0,0 +1,26 @@
|
||||
<script lang="ts">
|
||||
import { m } from '$lib/paraglide/messages.js';
|
||||
|
||||
let {
|
||||
totalPersons,
|
||||
totalDocuments
|
||||
}: {
|
||||
totalPersons: number;
|
||||
totalDocuments: number;
|
||||
} = $props();
|
||||
|
||||
const personsLabel = $derived(
|
||||
totalPersons === 1
|
||||
? m.persons_stats_persons_one()
|
||||
: m.persons_stats_persons_many({ count: totalPersons })
|
||||
);
|
||||
const documentsLabel = $derived(
|
||||
totalDocuments === 1
|
||||
? m.persons_stats_documents_one()
|
||||
: m.persons_stats_documents_many({ count: totalDocuments })
|
||||
);
|
||||
</script>
|
||||
|
||||
<p class="font-sans text-sm text-ink-2">
|
||||
{personsLabel} · {documentsLabel}
|
||||
</p>
|
||||
Reference in New Issue
Block a user