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:
Marcel
2026-03-29 19:52:37 +02:00
parent 3abdf9bb68
commit f4c99cabd5
5 changed files with 119 additions and 25 deletions

View 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>