Merge feature/search-2b: Herkunft filter -> originBreeder + /gerbils/breeders; name search -> nameSearch (separator-insensitive) [god-QA: 47/build/e2e 62]

This commit is contained in:
2026-06-06 09:27:40 +02:00
6 changed files with 63 additions and 20 deletions

View File

@@ -11,6 +11,11 @@ export function getGerbil(id: string): Promise<Gerbil> {
return api.get<Gerbil>(`${resources.gerbils}/${id}`)
}
/** SEARCH-2b: distinct non-empty originBreeder (Herkunft) values, sorted. */
export function listOriginBreeders(): Promise<string[]> {
return api.get<string[]>(`${resources.gerbils}/breeders`)
}
export function createGerbil(body: CreateGerbil): Promise<Gerbil> {
return api.post<Gerbil>(resources.gerbils, body)
}

View File

@@ -31,6 +31,13 @@ export interface Gerbil {
colorVarietyId: string | null
originContactId: string | null
receiverContactId: string | null
/** SEARCH-1/2b: free-text Herkunft (Züchter) from the import; Gridify-filterable. */
originBreeder?: string | null
/**
* SEARCH-1/2b: normalized name (lowercase, [\s._-] stripped) — filter-only,
* not part of the returned payload; present here so it can be a Gridify field.
*/
nameSearch?: string | null
/** Compact GEN-1 genotype string, e.g. "Aa CC Dd EE GG Pp Spsp rere" (or "?"-wildcards). */
genotype: string | null
notes: string | null
@@ -56,6 +63,7 @@ export interface CreateGerbil {
colorVarietyId?: string | null
originContactId?: string | null
receiverContactId?: string | null
originBreeder?: string | null
genotype?: string | null
notes?: string | null
characterTraits?: string[] | null