Bestandsaufnahme: Anlegen schliesst den Dialog nicht mehr
Deploy App / deploy (push) Successful in 1m12s

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-08-16 20:17:34 +02:00
parent f22b0a3f27
commit 5ff9bc0709
3 changed files with 9 additions and 3 deletions
+5 -1
View File
@@ -493,10 +493,14 @@ export async function saveInventoryDraft(plan: PlanInput, draft: InventoryDraft)
export function InventoryDialog({
plan,
onClose,
onChanged,
onSaved,
}: {
plan: PlanInput;
onClose: () => void;
// Der Plan hat sich geaendert (Element angelegt oder geloescht) -- neu laden, aber den
// Dialog OFFEN lassen. Getrennt von onSaved, denn das schliesst ihn.
onChanged: () => void;
onSaved: () => void;
}) {
const [draft, setDraft] = useState<InventoryDraft>(emptyInventoryDraft);
@@ -550,7 +554,7 @@ export function InventoryDialog({
plan={plan}
draft={draft}
setDraft={(fn) => setDraft((d) => fn(d))}
onChanged={onSaved}
onChanged={onChanged}
/>
{error && <p className="text-sm text-danger">{error}</p>}