fix: Bug fixed für alle Seiten und das Profil und label
This commit is contained in:
1 parent
133edcd5ba
commit
0a52b29c57
52 files changed
+1290
-129
No files matched your search
@@ -7,6 +7,7 @@ import {
|
||||
HoneyBatchStatus,
|
||||
RelocateHoneyBatchInput,
|
||||
Traceability,
|
||||
UpdateHoneyBatchInput,
|
||||
} from "./types";
|
||||
|
||||
export interface HoneyBatchFilter {
|
||||
@@ -35,6 +36,16 @@ export function createHoneyBatch(input: CreateHoneyBatchInput): Promise<HoneyBat
|
||||
});
|
||||
}
|
||||
|
||||
export function updateHoneyBatch(
|
||||
id: string,
|
||||
input: UpdateHoneyBatchInput,
|
||||
): Promise<HoneyBatch> {
|
||||
return apiFetch<HoneyBatch>(`/honey-batches/${id}`, {
|
||||
method: "PATCH",
|
||||
body: JSON.stringify(input),
|
||||
});
|
||||
}
|
||||
|
||||
export function addHoneyMeasurement(
|
||||
id: string,
|
||||
input: CreateHoneyMeasurementInput,
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
import { HoneyBatchStatus } from "./types";
|
||||
|
||||
export const HONEY_BATCH_STATUS_LABELS: Record<HoneyBatchStatus, string> = {
|
||||
RAW: "Roh",
|
||||
EXTRACTED: "Geschleudert",
|
||||
CLARIFIED: "Geklärt",
|
||||
CREAMED: "Cremehonig",
|
||||
STORED: "Gelagert",
|
||||
BOTTLED: "Abgefüllt",
|
||||
SOLD: "Verkauft",
|
||||
CONSUMED: "Verbraucht",
|
||||
};
|
||||
@@ -81,6 +81,12 @@ export interface CreateHoneyBatchInput {
|
||||
waterContent?: number;
|
||||
}
|
||||
|
||||
export interface UpdateHoneyBatchInput {
|
||||
honeyType?: string;
|
||||
amount?: number;
|
||||
waterContent?: number;
|
||||
}
|
||||
|
||||
export interface CreateHoneyMeasurementInput {
|
||||
waterContent: number;
|
||||
measuredAt: string;
|
||||
|
||||
Reference in new issue
Block a user