FEAT-13: Abgabe wizard (/vertraege/neu, 4 steps, ?tiere= prefill), Vertraege list w/ download+delete, /einstellungen Zuchtprofil form, contracts/settings API clients, nav entries, detail-page entry point + replace orphaned contactInfo with email/phone/address across Kontakt pages

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-06 07:31:04 +02:00
parent 0c05a5acf1
commit 9c3bcfc9f9
16 changed files with 1063 additions and 16 deletions

View File

@@ -0,0 +1,36 @@
/** FEAT-13: Zuchtprofil (/settings/breeder-profile) — Verkäufer-Block der Verträge. */
import { api } from './client'
export interface BreederProfile {
zuchtName: string
name: string
address: string
phone: string
email: string
homepage: string
/** Ort der Unterschriftszeile („{Ort}, den {Datum}“). */
city: string
}
export const EMPTY_BREEDER_PROFILE: BreederProfile = {
zuchtName: '',
name: '',
address: '',
phone: '',
email: '',
homepage: '',
city: '',
}
/** Pflichtangaben für einen brauchbaren Vertrag (Hinweis-Logik der UI). */
export function isBreederProfileComplete(p: BreederProfile): boolean {
return [p.name, p.address, p.city].every((v) => v.trim().length > 0)
}
export function getBreederProfile(): Promise<BreederProfile> {
return api.get<BreederProfile>('/settings/breeder-profile')
}
export function putBreederProfile(profile: BreederProfile): Promise<void> {
return api.put<void>('/settings/breeder-profile', profile)
}