Automate transition: carried-over securities auto-appear in next phase, sale proceeds tracked as incoming capital with allocation status indicators
Deploy App / deploy (push) Successful in 1m27s

This commit is contained in:
2026-07-08 20:20:20 +02:00
parent 837da980f2
commit a1e689167c
11 changed files with 172 additions and 31 deletions
+5 -2
View File
@@ -21,10 +21,12 @@ export function TransitionPanel({
phase,
computed,
nextPhaseName,
onChanged,
}: {
phase: PhaseInput;
computed: PhaseComputed;
nextPhaseName: string;
onChanged: () => void;
}) {
const [items, setItems] = useState<ItemDraft[]>([]);
const [loaded, setLoaded] = useState(false);
@@ -131,6 +133,7 @@ export function TransitionPanel({
})),
});
setSaved(true);
onChanged();
} catch (e) {
setError(e instanceof Error ? e.message : "Speichern fehlgeschlagen.");
} finally {
@@ -198,8 +201,8 @@ export function TransitionPanel({
<div className="rounded-md bg-white px-3 py-2 text-sm dark:bg-zinc-900">
Verfuegbares Startkapital fuer neue Phase (aus Verkaeufen): <strong>{totalAvailableCapital.toLocaleString("de-CH")} CHF</strong>
<p className="mt-1 text-xs text-zinc-500">
Dieser Betrag kann anschliessend frei auf neue oder bestehende Wertschriften der Folgephase verteilt werden
(Startwert der jeweiligen Wertschrift in &quot;{nextPhaseName}&quot; manuell anpassen).
Wird beim Speichern automatisch in &quot;{nextPhaseName}&quot; als verfuegbares Startkapital hinterlegt.
Uebernommene Wertschriften erscheinen dort automatisch mit ihrem Endwert als neuer Startwert.
</p>
</div>
{error && <p className="text-sm text-red-600 dark:text-red-400">{error}</p>}