WURF-LINK-Addendum: Herkunft-Zeile zeigt originBreeder + Kontaktlink

- originContactId gesetzt → Link /kontakte/{id} mit Kontaktname (Priorität)
- Sonst originBreeder (Freitext) gesetzt → plain text
- Sonst '—' (bisheriges Fallback)
Behebt: 74 Tiere mit originBreeder sahen '—' obwohl Daten vorhanden

e2e: 2 neue Tests (originBreeder-Text + Kontaktlink)

Gate: vitest 82/82, e2e 126/126, build+tsc clean
This commit is contained in:
2026-06-06 17:00:32 +02:00
parent 3160b66697
commit f6bfc0ebab
2 changed files with 27 additions and 1 deletions

View File

@@ -181,7 +181,14 @@ export default function GerbilDetailPage() {
: lookup(litterName, g.litterId)
}
/>
<Row label={t.fields.origin} value={lookup(contactName, g.originContactId)} />
<Row
label={t.fields.origin}
value={
g.originContactId && contactName.has(g.originContactId)
? <Link to={`/kontakte/${g.originContactId}`}>{contactName.get(g.originContactId)}</Link>
: (g.originBreeder || null)
}
/>
<Row label={t.fields.receiver} value={lookup(contactName, g.receiverContactId)} />
<Row label={t.fields.notes} value={g.notes} />
</dl>