-
Lagerartikel
+
+
+
+
Lagerartikel
+
+ Gläser, Deckel, Futter und anderes Material mit Bestand.
+
+
- {itemsLoading ? Lädt…
: null}
- {stockItems && stockItems.length === 0 ? (
-
- ) : null}
-
- {stockItems && stockItems.length > 0 ? (
-
- {stockItems.map((item) => (
- Niedrig
- ) : undefined
- }
- fields={[{ label: "Bestand", value: `${item.quantity} ${item.unit}` }]}
- actions={
- <>
-
-
- >
- }
- />
- ))}
-
- ) : null}
+ }
+ />
+ }
+ >
+ {(stockItems) => }
+
);
}
+
+function ContainersEmpty({ tab }: { tab: EntityLifecycleTab }) {
+ if (tab === "history") {
+ return (
+
+ );
+ }
+ return (
+
}
+ />
+ );
+}
+
+function ContainerGrid({ containers }: { containers: StorageContainer[] }) {
+ return (
+
+ {containers.map((container) => (
+ {container.code}}
+ subtitle={container.containerType ?? "—"}
+ badge={
+
+ {STORAGE_CONTAINER_STATUS_LABELS[container.status]}
+
+ }
+ fields={[{ label: "Standort", value: container.location ?? "—" }]}
+ actions={
+ <>
+
+
+ >
+ }
+ />
+ ))}
+
+ );
+}
+
+function isLowStock(item: StockItem): boolean {
+ return item.minThreshold !== null && item.quantity < item.minThreshold;
+}
+
+function StockItemGrid({ stockItems }: { stockItems: StockItem[] }) {
+ return (
+
+ {stockItems.map((item) => (
+
+
+ Bestand niedrig
+
+ ) : undefined
+ }
+ fields={[
+ { label: "Bestand", value: `${item.quantity} ${item.unit}` },
+ {
+ label: "Mindestbestand",
+ value: item.minThreshold !== null ? `${item.minThreshold} ${item.unit}` : "—",
+ },
+ ]}
+ actions={
+ <>
+
+
+ >
+ }
+ />
+ ))}
+
+ );
+}
diff --git a/ApiCore-Frontend/src/app/(app)/storage/record-movement-dialog.tsx b/ApiCore-Frontend/src/app/(app)/storage/record-movement-dialog.tsx
index f98739b..1005af3 100644
--- a/ApiCore-Frontend/src/app/(app)/storage/record-movement-dialog.tsx
+++ b/ApiCore-Frontend/src/app/(app)/storage/record-movement-dialog.tsx
@@ -60,7 +60,7 @@ export function RecordMovementDialog({ stockItemId }: { stockItemId: string }) {
return (