Bestandsaufnahme: Anlegen schliesst den Dialog nicht mehr
Deploy App / deploy (push) Successful in 1m12s
Deploy App / deploy (push) Successful in 1m12s
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -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>}
|
||||
|
||||
@@ -969,6 +969,7 @@ Erste Lebensphase anlegen
|
||||
<InventoryDialog
|
||||
plan={plan}
|
||||
onClose={() => setShowInventory(false)}
|
||||
onChanged={onChanged}
|
||||
onSaved={() => {
|
||||
setShowInventory(false);
|
||||
onChanged();
|
||||
|
||||
Reference in New Issue
Block a user