diff --git a/web/src/components/Einzelstuecke.jsx b/web/src/components/Einzelstuecke.jsx index 3cb5825..27997cb 100644 --- a/web/src/components/Einzelstuecke.jsx +++ b/web/src/components/Einzelstuecke.jsx @@ -37,7 +37,7 @@ export default function Einzelstuecke({ product, locations, shops, isAdmin, onCh const [items, setItems] = useState([]); const [addForm, setAddForm] = useState(EMPTY_ADD); const [remove, setRemove] = useState(null); // { item, reason, note } | null - const [expanded, setExpanded] = useState(null); // Item-ID mit offenem Detail (Preis/Belege) + const [showAdd, setShowAdd] = useState(false); // Anlege-Maske ein-/ausklappen const [suggestion, setSuggestion] = useState(null); // { itemId, date } aus PDF-Analyse const origin = window.location.origin; @@ -226,29 +226,22 @@ export default function Einzelstuecke({ product, locations, shops, isAdmin, onCh ) : {it.note || "–"}} -
- - {isAdmin && ( - <> - - - - )} -
+ {isAdmin && ( +
+ + +
+ )} - {expanded === it.id && ( - - + +
- )} ))} {items.length === 0 && Noch keine Einzelstücke.} @@ -327,9 +319,21 @@ export default function Einzelstuecke({ product, locations, shops, isAdmin, onCh - {isAdmin && ( + {isAdmin && !showAdd && ( + + )} + + {isAdmin && showAdd && (
-

Einzelstücke anlegen

+

Einzelstücke anlegen

+ +