FEAT-1: Tiere list page — Gridify filters (Status/Geschlecht/Farbschlag), sort, paging + German strings

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-05 23:54:44 +02:00
parent f162ef4fed
commit 9b586dd7fa
4 changed files with 504 additions and 4 deletions

View File

@@ -0,0 +1,19 @@
/** German label helpers for enum values and lookups. */
import { de } from '../strings/de'
import type { Gender, GerbilStatus } from '../api/types'
export function genderLabel(gender: Gender): string {
return de.pages.gerbils.genderLabels[gender]
}
export function statusLabel(status: GerbilStatus): string {
return de.pages.gerbils.statusLabels[status]
}
/** Format an ISO date ("YYYY-MM-DD") as German "TT.MM.JJJJ"; null -> dash. */
export function formatDate(iso: string | null | undefined): string {
if (!iso) return '—'
const [y, m, d] = iso.split('-')
if (!y || !m || !d) return iso
return `${d}.${m}.${y}`
}