From 22334c2129b6c04f92d803bb5c0042a932f3860a Mon Sep 17 00:00:00 2001 From: Carlos Escalante Date: Wed, 1 Apr 2026 10:18:36 -0600 Subject: [PATCH] Remove MPAT and MEMP fund references from pension module Co-Authored-By: Claude Opus 4.6 (1M context) --- backend/app/models/models.py | 2 -- backend/app/seed.py | 18 ------------------ frontend/src/pages/Pensions.tsx | 32 ++------------------------------ 3 files changed, 2 insertions(+), 50 deletions(-) diff --git a/backend/app/models/models.py b/backend/app/models/models.py index 32a17c1..ce4503a 100644 --- a/backend/app/models/models.py +++ b/backend/app/models/models.py @@ -46,8 +46,6 @@ class Bank(str, enum.Enum): FCL = "FCL" ROP = "ROP" VOL = "VOL" - MEMP = "MEMP" - MPAT = "MPAT" MORTGAGE = "MORTGAGE" diff --git a/backend/app/seed.py b/backend/app/seed.py index 6bd0e4a..0dfc57d 100644 --- a/backend/app/seed.py +++ b/backend/app/seed.py @@ -44,9 +44,6 @@ DEFAULT_ACCOUNTS = [ (Bank.FCL, Currency.CRC, "FCL", AccountType.PENSION), (Bank.ROP, Currency.CRC, "ROP", AccountType.PENSION), (Bank.VOL, Currency.CRC, "VOL", AccountType.PENSION), - # Savings (CRC) - (Bank.MEMP, Currency.CRC, "MEMP", AccountType.SAVINGS), - (Bank.MPAT, Currency.CRC, "MPAT", AccountType.SAVINGS), # Liabilities (Bank.MORTGAGE, Currency.USD, "Mortgage", AccountType.LIABILITY), # Crypto @@ -174,21 +171,6 @@ DEFAULT_RECURRING_ITEMS = [ "month_of_year": 1, "notes": "Car insurance every 6 months (Jan, Jul)", }, - # Savings - { - "name": "Ahorro MEMP", - "amount": 200000, - "item_type": RecurringItemType.SAVINGS, - "frequency": RecurringFrequency.MONTHLY, - "notes": "Monthly savings to MEMP account", - }, - { - "name": "Ahorro MPAT", - "amount": 200000, - "item_type": RecurringItemType.SAVINGS, - "frequency": RecurringFrequency.MONTHLY, - "notes": "Monthly savings to MPAT account", - }, ] diff --git a/frontend/src/pages/Pensions.tsx b/frontend/src/pages/Pensions.tsx index 29d3043..443191c 100644 --- a/frontend/src/pages/Pensions.tsx +++ b/frontend/src/pages/Pensions.tsx @@ -40,7 +40,7 @@ import { ClipboardPaste } from 'lucide-react'; // ─── Types ──────────────────────────────────────────────────────────────────── -type FundKey = 'FCL' | 'ROP' | 'MPAT' | 'MEMP' | 'VOL'; +type FundKey = 'FCL' | 'ROP' | 'VOL'; interface FundDef { key: FundKey; @@ -75,7 +75,7 @@ interface TooltipEntry { const CURRENT_AGE = 30; -const FUND_KEYS: FundKey[] = ['FCL', 'ROP', 'MPAT', 'MEMP', 'VOL']; +const FUND_KEYS: FundKey[] = ['FCL', 'ROP', 'VOL']; const FUNDS_DEFAULT: Record = { FCL: { @@ -102,30 +102,6 @@ const FUNDS_DEFAULT: Record = { withdrawalRule: 'Retirable a los 65 años', defaultTargetAge: 65, }, - MPAT: { - key: 'MPAT', - name: 'MPAT', - fullName: 'Ministerio Patronal', - color: '#f59e0b', - startBalance: 300_000, - monthlyContribution: 200_000, - annualRate: 3.0, - isDividend: true, - withdrawalRule: 'Dividendos anuales en marzo', - defaultTargetAge: 65, - }, - MEMP: { - key: 'MEMP', - name: 'MEMP', - fullName: 'Fondo del Empleado', - color: '#8b5cf6', - startBalance: 300_000, - monthlyContribution: 200_000, - annualRate: 3.0, - isDividend: true, - withdrawalRule: '₡100K deducción dos veces al mes · Dividendos en marzo', - defaultTargetAge: 65, - }, VOL: { key: 'VOL', name: 'VOL', @@ -182,8 +158,6 @@ function buildChartFromSnapshots(snapshots: PensionSnapshot[]): ChartDataPoint[] month: label, FCL: values.FCL ?? 0, ROP: values.ROP ?? 0, - MPAT: values.MPAT ?? 0, - MEMP: values.MEMP ?? 0, VOL: values.VOL ?? 0, } as ChartDataPoint; }); @@ -271,8 +245,6 @@ export default function Pensions() { const [projections, setProjections] = useState>({ FCL: { contribution: 150_000, rate: 7.5, targetAge: 35 }, ROP: { contribution: 120_000, rate: 6.0, targetAge: 65 }, - MPAT: { contribution: 200_000, rate: 3.0, targetAge: 65 }, - MEMP: { contribution: 200_000, rate: 3.0, targetAge: 65 }, VOL: { contribution: 400_000, rate: 8.0, targetAge: 57 }, }); const [uploadedFiles, setUploadedFiles] = useState([]);