FEAT: Implement deceased/givenaway enclosure visibility rules, preserve external clan name, and hide receiver fields for deceased gerbils

This commit is contained in:
2026-06-13 01:40:19 +02:00
parent 5732398e60
commit 396d8f05d8
53 changed files with 7431 additions and 274 deletions

View File

@@ -10,6 +10,8 @@ export interface CreateContact {
phone?: string | null
address?: string | null
notes?: string | null
isBreeder?: boolean
isReceiver?: boolean
}
/** Payload for PUT /contacts/{id}. */

View File

@@ -22,13 +22,15 @@ export async function listEnclosures(): Promise<Enclosure[]> {
}
export async function listContacts(): Promise<Contact[]> {
const paged = await api.get<Paged<Contact>>(`${resources.contacts}${ALL}`)
const paged = await api.get<Paged<Contact>>(
`${resources.contacts}${toQueryString({ page: 1, pageSize: 10000, orderBy: 'name' })}`
)
return paged.items
}
export async function listLitters(): Promise<Litter[]> {
const paged = await api.get<Paged<Litter>>(
`${resources.litters}${toQueryString({ page: 1, pageSize: 1000, orderBy: 'date desc' })}`,
`${resources.litters}${toQueryString({ page: 1, pageSize: 10000, orderBy: 'date desc' })}`,
)
return paged.items
}

View File

@@ -60,6 +60,8 @@ export interface Gerbil {
isDeaf?: boolean | null
/** STAMMBAUM-AVATAR: URL des Profilfotos (erstes Foto nach sortOrder); null = kein Foto. API-relativ oder absolut. */
profilePhotoUrl?: string | null
spottingType?: string | null
isCastrated?: boolean
}
/** Payload for POST /gerbils. */
@@ -83,6 +85,8 @@ export interface CreateGerbil {
characterNote?: string | null
isResident?: boolean
isDeaf?: boolean | null
spottingType?: string | null
isCastrated?: boolean
}
/** Payload for PUT /gerbils/{id} (all optional / partial update). */
@@ -108,6 +112,8 @@ export interface Contact {
phone: string | null
address: string | null
notes: string | null
isBreeder: boolean
isReceiver: boolean
}
export interface Litter {