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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user