FEAT: Implement deceased/givenaway enclosure visibility rules, preserve external clan name, and hide receiver fields for deceased gerbils
This commit is contained in:
@@ -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}. */
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user