feat(frontend): Ernten- und Schleuderungs-Ansichten (Modul 10)
/harvests/new (Bienenstand + Mehrfachauswahl Völker), /harvests/[id] und /extractions/new (Mehrfachauswahl Ernten). Bienenstand- und Ernte-Detailseiten verlinken direkt in die Kette.
This commit is contained in:
1 parent
340397b34d
commit
5c2c0608d1
9 files changed
+526
-2
No files matched your search
@@ -0,0 +1,17 @@
|
||||
import { apiFetch } from "@/lib/auth/api-client";
|
||||
import { CreateHarvestInput, Harvest } from "./types";
|
||||
|
||||
export function fetchHarvests(): Promise<Harvest[]> {
|
||||
return apiFetch<Harvest[]>("/harvests");
|
||||
}
|
||||
|
||||
export function fetchHarvest(id: string): Promise<Harvest> {
|
||||
return apiFetch<Harvest>(`/harvests/${id}`);
|
||||
}
|
||||
|
||||
export function createHarvest(input: CreateHarvestInput): Promise<Harvest> {
|
||||
return apiFetch<Harvest>("/harvests", {
|
||||
method: "POST",
|
||||
body: JSON.stringify(input),
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user