Kapitalbezug: Personenzuordnung, Herkunft und Filter fuer bezogene Guthaben
Deploy App / deploy (push) Successful in 1m9s
Deploy App / deploy (push) Successful in 1m9s
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -60,6 +60,7 @@ import {
|
||||
PERSON_ONLY_CATEGORIES,
|
||||
inheritedPhaseValues,
|
||||
num,
|
||||
ownerLabel,
|
||||
type CashTransitionData,
|
||||
type ElementCategory,
|
||||
type PhaseData,
|
||||
@@ -284,6 +285,7 @@ export function PlanView({
|
||||
ownerAgeStart: ownerAgeAtPhaseStart(phase, element),
|
||||
investTargets: [],
|
||||
capitalFromTransfer: ce?.capitalFromTransfer ?? 0,
|
||||
capitalFromTransferSources: ce?.capitalFromTransferSources ?? [],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -309,8 +311,9 @@ export function PlanView({
|
||||
inheritedValues: {},
|
||||
ownerAgeStart: ownerAgeAtPhaseStart(fromPhase, element),
|
||||
// Ziele fuer die Anlage-Quote beim Kapitalbezug (Punkt C).
|
||||
investTargets: investTargetsOf(toPhase),
|
||||
investTargets: investTargetsOf(plan, toPhase),
|
||||
capitalFromTransfer: 0,
|
||||
capitalFromTransferSources: [],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -1657,6 +1660,7 @@ function AddElementDialog({
|
||||
ownerAgeStart: firstPhase.persons.find((p) => p.role === (owner ?? "PERSON_A"))?.startAge ?? 0,
|
||||
investTargets: [],
|
||||
capitalFromTransfer: 0,
|
||||
capitalFromTransferSources: [],
|
||||
};
|
||||
|
||||
async function create() {
|
||||
@@ -1806,10 +1810,15 @@ function AddPhaseDialog({
|
||||
|
||||
// Ziele für die Anlage-Quote der Kapitalverwendung (Roadmap Nr. 44, Punkt C): alle
|
||||
// Vermögens-Elemente, die in der Folgephase noch aktiv sind.
|
||||
function investTargetsOf(toPhase: PhaseComputed | undefined): { id: string; name: string }[] {
|
||||
// Der Name allein genuegt hier nicht: Zwei Personen nennen ihr Wertschriftendepot beide "ETF",
|
||||
// und im Dropdown waehlt man dann blind das falsche -- was erst Phasen spaeter auffaellt.
|
||||
function investTargetsOf(plan: PlanInput, toPhase: PhaseComputed | undefined): { id: string; name: string }[] {
|
||||
return (toPhase?.elements ?? [])
|
||||
.filter((e) => e.category === "OTHER_ASSET" && e.status === "ACTIVE")
|
||||
.map((e) => ({ id: e.elementId, name: e.name }));
|
||||
.map((e) => {
|
||||
const owner = plan.elements.find((x) => x.id === e.elementId)?.ownerRole ?? null;
|
||||
return { id: e.elementId, name: `${e.name} · ${ownerLabel(plan.persons, owner)}` };
|
||||
});
|
||||
}
|
||||
|
||||
// --- Panel: Szenario-Profil (Grundprofil bearbeiten) ---
|
||||
|
||||
Reference in New Issue
Block a user