feat(frontend): Fütterungen-Modul (Modul 9)
Mobile-optimiertes Erfassungsformular unter /feedings/new sowie "Fütterung"-Ansicht mit Mengensumme auf der Volk-Detailseite.
This commit is contained in:
1 parent
cc0aaf0a31
commit
d71785d531
6 files changed
+307
-1
No files matched your search
@@ -0,0 +1,17 @@
|
||||
import { apiFetch } from "@/lib/auth/api-client";
|
||||
import { CreateFeedingInput, Feeding, FeedingSummaryEntry } from "./types";
|
||||
|
||||
export function fetchColonyFeedings(colonyId: string): Promise<Feeding[]> {
|
||||
return apiFetch<Feeding[]>(`/colonies/${colonyId}/feedings`);
|
||||
}
|
||||
|
||||
export function fetchColonyFeedingsSummary(colonyId: string): Promise<FeedingSummaryEntry[]> {
|
||||
return apiFetch<FeedingSummaryEntry[]>(`/colonies/${colonyId}/feedings/summary`);
|
||||
}
|
||||
|
||||
export function createFeeding(input: CreateFeedingInput): Promise<Feeding> {
|
||||
return apiFetch<Feeding>("/feedings", {
|
||||
method: "POST",
|
||||
body: JSON.stringify(input),
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user