Commit Graph

78 Commits

Author SHA1 Message Date
admGitAICDS 5076dcb68f Einkommen/Ausgaben: Basiswert direkt editierbar statt Uebersteuern-Feld
Deploy App / deploy (push) Successful in 57s
Das separate "Uebersteuern"-Feld (amountOverride) konnte 0 nicht von "nicht gesetzt"
unterscheiden und nahm faelschlich 0. Entfernt. Stattdessen ist der Basiswert (amount)
selbst editierbar: ab Phase 2 mit dem fortgeschriebenen Endwert der Vorphase vorbelegt,
aber bewusst aenderbar (Teilzeit/Beförderung/Jobwechsel). Solange nicht geaendert, wird
der Wert 1:1 aus der Vorphase fortgeschrieben (pd.amount ungesetzt -> carry.flowBasis).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-15 13:00:42 +02:00
admGitAICDS 249debe2f4 Cash-Anfangswert (erste Lebensphase) editierbar
Deploy App / deploy (push) Successful in 1m44s
Neues Feld Plan.initialCash (additiv, Default 0). computePlan startet die erste Phase
mit diesem Cash-Bestand statt 0. In der Matrix ist die Cash-Zelle der ersten Phase
klickbar und oeffnet ein Popup zum Setzen des Anfangswerts (PATCH /api/plans/{id}).
Szenario-Kopie uebernimmt den Wert. Golden-Test ergaenzt.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-15 12:48:02 +02:00
admGitAICDS 7222faa98c Lebensphasen-Zellen oeffnen jetzt ein Popup (statt unterem Detail-Panel)
Deploy App / deploy (push) Successful in 1m5s
Klick auf eine Element-Zelle in einer Lebensphase oeffnet neu ein kleines Popup
(PhaseCellDialog mit ElementDetail) - analog zu den Uebergangszellen. Das untere
Detail-Panel dient nur noch der Phasen-Kopf-Bearbeitung. Popup ist per key stabil
(kein Uebertrag des Formularzustands zwischen Elementen).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-15 12:32:45 +02:00
admGitAICDS 5e17ce4afb V4-Rechenmodell: Flow-Indexierung, Cash-Ausgleichstopf, Ruin-Erkennung
Deploy App / deploy (push) Successful in 3m6s
Behebt die Nominal/Real-Inkonsistenz (Bug #1): Einkommen/Ausgaben werden neu Jahr fuer
Jahr indexiert (eigenes Feld teuerungsausgleich je Element, Default = Phaseninflation;
Renten nominal fix = 0%). Vermoegen verzinst weiterhin nominal.

Cash: neues systemseitiges, immer sichtbares Element (0% Verzinsung, kein DB-Row -
synthetisch in computePlan). Ist der Ausgleichstopf = "verfuegbares Kapital fuer
Investments": cash_delta(t) = quote(t) - geplante flache Jahresraten (3a/Vermoegen/Amort./
Tilgung); Cash laeuft ueber Phasen fort, darf negativ werden (rot). Der Verteilzwang und
die harten Sparraten-Caps entfallen.

Ruin: Gesamtvermoegen (inkl. Cash) je Jahr; erstes Unterschreiten von 0 -> Ruin-Alter
(Person A), Anzeige als Banner + Zeitachsen-Marker.

Phasenkopf neu: Einkommen/Ausgaben Start->Ende, Quote Beginn/Ende, Cash Start->Ende,
Vermoegen inkl. Cash, Realwert. Inflation-Deflator neu pro Jahr (Math.pow ^Dauer).

Golden Tests (vitest) 1-4 + Renten-0% + Fortschreibung gruen (Test1 761'654/565'928,
Test2 Ruin Alter 94).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-15 09:24:13 +02:00
admGitAICDS 9506f43b67 Fix: Uebergangs-Defaults (Steuer/Umwandlung) wurden in der Berechnung als 0 gerechnet
Deploy App / deploy (push) Successful in 54s
Kapitalbezugssteuer, Grundstueckgewinnsteuer und PK-Umwandlungssatz wurden im UI nur
optisch vorbelegt (num(td.x, 8/20/6)), die Berechnung las aber num(td.x) mit Fallback 0.
Ein nicht angetupftes Feld fuehrte so zu 0% Steuer bzw. 0 Rente. Defaults sind jetzt
zentrale Konstanten (constants.ts) und werden in Berechnung UND UI als Fallback genutzt.
Betrifft: PK-Kapital/-Kombi/-Rente, 3a-Bezug, Immobilienverkauf.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-14 15:18:03 +02:00
admGitAICDS b45af8f264 Phasen-Kopf: Verteil-Prozent bei der Quote, Start->End-Alter je Person, Vermoegen Start->Ende
Deploy App / deploy (push) Successful in 1m0s
- Sparquote/Verzehr zeigt in Klammern den bereits verteilten/gedeckten Prozentsatz,
  z. B. "Sparquote 10'000 (100% verteilt)".
- Statt einer Alterszeile je Phase nun pro Person "Name Startalter -> Endalter".
- Neue Zeile "Vermoegen Startvermoegen -> Endvermoegen" (nominal).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-14 14:56:45 +02:00
admGitAICDS bbe5acee85 Dashboard-Grafiken neu: Asset-Aufteilung Beginn/Ende je Phase; Vermoegensverlauf nach Alter
Deploy App / deploy (push) Successful in 56s
- Balkendiagramm: je Phase zwei x-Kategorien (Beginn/Ende), gestapelt nach Asset-Element
  (Schluessel = elementId, damit gleiche Namen nicht kollidieren). Zeigt die Umschichtung;
  Ende Phase N liegt neben Beginn Phase N+1.
- Liniendiagramm: x-Achse ist neu das Alter (Referenz Person A) von Startalter bis Ende der
  letzten Phase, mit Start- und Phasen-Endwerten (nominal + real), statt Phasenindex.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-14 08:59:28 +02:00
admGitAICDS f8d77ef864 Fix: Detail-Panel uebernahm Formularwerte vom vorher geoeffneten Element
Deploy App / deploy (push) Successful in 1m0s
Das untere Detail-Panel (ElementDetail/PhaseDetail) initialisiert seinen lokalen
Formular-Zustand nur beim Mounten. Ohne key wurde beim Wechsel der Zelle/Phase
dieselbe Instanz wiederverwendet -> Werte (z. B. Zusatzinvestition) blieben vom
zuvor geoeffneten Element haengen. Fix: key pro Auswahl (Zelle/Phase) erzwingt
Neuaufbau. Analog key am Uebergangs-Popup.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-14 08:36:48 +02:00
admGitAICDS 4483980169 Personen koennen einen Namen bekommen (Plan-Einstellungen)
Deploy App / deploy (push) Successful in 1m52s
Person A/B erhalten ein optionales Namensfeld (Migration: Person.name nullable).
Fallback im UI bleibt "Person A"/"Person B". Angezeigt in Grundprofil-Box, Zeitachse,
Matrix-Elementzuordnung und Element-Erstelldialog; Szenario-Kopie uebernimmt den Namen.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-14 08:32:19 +02:00
admGitAICDS 56f8140af5 Uebergang: PK/3a nach der Pensionierung inaktiv ("–")
Deploy App / deploy (push) Successful in 49s
Ist der Besitzer eines PK-/3a-Elements zu Beginn der Von-Phase bereits pensioniert,
wurde die Position bei der Pensionierung bereits bezogen oder verrentet -- in allen
weiteren Uebergaengen gibt es nichts mehr zu tun. Zentrale Hilfsfunktion
transitionInactive() (verkauft/getilgt ODER PK/3a post-Pension) steuert Zelle,
"?"-Status und Offen-Zaehler einheitlich.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-14 08:24:43 +02:00
admGitAICDS 6654192d83 Mobile: Scrollposition nach Popup-Schliessen erhalten (stiller Refresh)
Deploy App / deploy (push) Successful in 55s
refreshCurrent laedt den Plan-Detail neu OHNE Loading-Umschaltung, damit die PlanView
montiert bleibt und die Scrollposition nicht auf 0/0 zurueckspringt. Der Spinner
erscheint weiterhin nur beim initialen Plan-Wechsel.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-14 08:15:12 +02:00
admGitAICDS a8a780d1ef Uebergang: verkaufte/getilgte Elemente in Folgephasen nicht mehr klickbar
Deploy App / deploy (push) Successful in 57s
Ist ein Element am jeweiligen Uebergang bereits verkauft/getilgt (status != ACTIVE),
zeigt die Zelle nur noch "–" (nicht interaktiv, kein "?"), analog zu AHV.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-14 08:03:21 +02:00
admGitAICDS cf9d245344 Uebergangs-Spaltenkopf: "geprueft" mit gruenem Haken sobald keine Entscheide offen sind
Deploy App / deploy (push) Successful in 57s
Wenn openCount == 0, zeigt der Kopf statt "n offen" nun gruen hinterlegt einen
Haken (CheckCircle2) + "geprueft".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-14 07:55:52 +02:00
admGitAICDS 737bc2051f Fix Uebergang: Entscheide werden zuverlaessig gespeichert; Klick auf Zelle oeffnet Popup
Deploy App / deploy (push) Successful in 1m0s
- Ursache des "?"-Bugs: sichtbarer Default (Halten/Rente) wurde ohne aktive Auswahl
  nicht in den Datensatz geschrieben -> beim Speichern blieb der Entscheid leer.
  Fix: withTransitionDefaults belegt den Entscheid explizit vor (Popup + Review-Panel),
  sodass ein blosses Speichern den Default persistiert.
- Uebergangszellen oeffnen neu ein kleines Popup (TransitionCellDialog) statt des
  unteren Detail-Panels; offene Zellen sind kraeftig eingefaerbt.
- PK und 3a bekommen im normalen Uebergang einen echten Bezugs-Entscheid
  (Kein Bezug / Bezug + Betrag) inkl. offenem "?"-Status bis entschieden.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-14 07:45:05 +02:00
admGitAICDS f49163af60 Fix: sonstiges Vermoegen zieht Rate in Verzehrphasen ab statt sie zu addieren
Deploy App / deploy (push) Successful in 1m3s
Vorlauf berechnet das Quoten-Vorzeichen (Einkommen inkl. Renten minus Ausgaben)
vor der Element-Schleife; in Verzehrphasen (Quote < 0) wird die Jahresrate beim
sonstigen Vermoegen als Bezug (negativ) statt als Sparbeitrag verrechnet.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-14 07:33:00 +02:00
admGitAICDS 32adfb4476 V3: 3 Farbschemata, Grundprofil auf Plan-Ebene, Erstellungs-Popups, integer-Zahlenfelder mit Beschleunigungs-Spinner, Carry-Forward des Zielwerts, gefuehrter Uebergang
Deploy App / deploy (push) Successful in 1m51s
- Theming: semantische CSS-Tokens + 3 waehlbare Schemata (Hell/Dunkel/Warm/Sunset), Umschalter im Profil-Menue, FOUC-frei via Inline-Script, localStorage; Klassen-Sweep aller Komponenten, Recharts aus Tokens
- Datenmodell: Household entfaellt; Plan traegt Haushaltsform/Personen/Inflation selbst (Person -> planId, Plan -> userId); destruktive Migration (TRUNCATE); Onboarding/HouseholdSettings entfernt; Plan-Erstellung & -Einstellungen mit Profilfeldern
- Popups: Element-Erstellung mit Inline-Feldern (geteilte ElementPhaseFields/ElementTransitionFields), Phase- und Plan-Popups mit Direkteingabe
- Zahlenfelder: 1'000er-Runden entfernt (floorToThousand/roundToHundred weg), integer MoneyInput mit beschleunigendem Press-and-Hold-Spinner, 0-Bug-Fix, harte Live-Caps
- Quote: Amortisation + Tilgung neu quotenwirksam; Restquote sichtbar (sinkt beim Verteilen); Invest-Deckel = verfuegbares Kapital + fortgeschriebener Zielwert
- Carry-Forward: Startwert der Folgephase = Zielwert der Vorphase minus Uebergangs-Bezug (live abgeleitet); optionale Zusatzinvestition aus verfuegbarem Kapital
- Matrix: Zelle zeigt Start -> Ziel; Uebergangs-Spaltenkopf mit "n offen"-Badge + gefuehrtem Pruef-Panel

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-13 14:49:42 +02:00
admGitAICDS b775ab77cb Rework core model: financial elements as plan-wide entities across phases; derived phase types (Erwerb/Pension/Misch) with retirement-capped durations and per-plan retirement age; AHV (gap years + couple ceiling), PK payout/annuity, 3a, real estate, other assets/debts; horizontal timeline with retirement markers; phase x element matrix with detail panel; savings/consumption quota + available-capital key figures with red status
Deploy App / deploy (push) Successful in 1m57s
2026-07-13 07:55:58 +02:00
admGitAICDS b3a3b565ac Fix Traefik routing: pin traefik.docker.network=agent-net (container has two networks, Traefik picked the internal one at random)
Deploy App / deploy (push) Successful in 58s
2026-07-11 17:43:37 +02:00
admGitAICDS 685ff46c27 Major rework: multi-user accounts (register/login, per-user data isolation), new layout with sidebar/dashboard/profile menu, matrix phase view with collapsible category columns, life timeline with ages per phase, live budget capping, collapsible transitions, mobile support
Deploy App / deploy (push) Successful in 1m47s
2026-07-11 17:31:18 +02:00
admGitAICDS 2e65bb3a2d Visual redesign: indigo accent palette, lucide icons per section, lighter/softer cards and dark mode
Deploy App / deploy (push) Successful in 2m59s
2026-07-10 22:19:10 +02:00
admGitAICDS e9dacc2026 Rework real estate model: purchase price + mortgage + amortization only, no appreciation; amortization counts against savings quota; sale price/tax entered at transition time with correct mortgage payoff; carry over income/expenses to new phases
Deploy App / deploy (push) Successful in 1m31s
2026-07-08 21:35:10 +02:00
admGitAICDS 9609de67ae Press-and-hold spinner buttons repeat by 1000; floor compound interest growth (securities and real estate) and pension lump sum to nearest 1000 throughout
Deploy App / deploy (push) Successful in 43s
2026-07-08 20:49:34 +02:00
admGitAICDS fb57ec5549 Add +-1000 spinner buttons to amount fields, floor (not round) to nearest 1000 in all allocation calculations
Deploy App / deploy (push) Successful in 45s
2026-07-08 20:40:54 +02:00
admGitAICDS 3b68ff8319 Format all monetary amounts as 1'000-separated integers and round amount inputs to nearest 1'000
Deploy App / deploy (push) Successful in 43s
2026-07-08 20:31:34 +02:00
admGitAICDS a1e689167c 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
2026-07-08 20:20:20 +02:00
admGitAICDS 837da980f2 Fix Dockerfile: copy prisma.config.ts into runtime image (needed for migrate deploy)
Deploy App / deploy (push) Successful in 56s
2026-07-08 19:43:57 +02:00
admGitAICDS fcb38f4a86 Fix deploy workflow: inject secrets via Gitea Actions (job workspace is not bind-mounted to host)
Deploy App / deploy (push) Successful in 9s
2026-07-08 19:40:03 +02:00
admGitAICDS 4f990c9686 Initial commit: FPT Financial Planning Tool
Deploy App / deploy (push) Successful in 3m3s
2026-07-08 19:19:39 +02:00