feat(person): add a curator "Ereignis für diese Person" link to PersonCard

A curator on a person's page can now seed a timeline event from that
person: a gated link to #781's /zeitstrahl/events/new?personId={id},
which prefills the person and returns to /persons/{id} on save. Hidden
for a Reader. New i18n key person_add_event in de/en/es.

Refs #842
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-06-15 08:16:10 +02:00
parent 9118a10e4b
commit 446611e3cc
5 changed files with 46 additions and 1 deletions

View File

@@ -128,7 +128,8 @@ const deathText = $derived(formatLifeDate(person.deathDate, person.deathDatePrec
</div>
{/if}
<!-- Edit button — full width, outlined -->
<!-- Curator actions — full width, outlined. Both links are gated to
WRITE_ALL; the gate is UX only (the #781 route guard is the boundary). -->
{#if canWrite}
<a
href="/persons/{person.id}/edit"
@@ -142,6 +143,15 @@ const deathText = $derived(formatLifeDate(person.deathDate, person.deathDatePrec
/>
{m.btn_edit()}
</a>
<!-- Opens #781's create form pre-seeded with this person; on save it
returns to /persons/{id} (originPersonId). #842 REQ-003/010. -->
<a
data-testid="person-add-event"
href="/zeitstrahl/events/new?personId={person.id}"
class="mt-2 flex min-h-[44px] w-full items-center justify-center gap-1.5 rounded border border-line px-3 py-2 font-sans text-xs font-bold tracking-widest text-ink-2 uppercase transition-colors hover:border-primary hover:text-ink"
>
{m.person_add_event()}
</a>
{/if}
</div>
</div>