From 6111494460a598699e37897914b1f91a38e70f7d Mon Sep 17 00:00:00 2001 From: Benjamin Admin Date: Mon, 20 Apr 2026 10:51:43 +0200 Subject: [PATCH] fix(pitch-deck): remove Berechnen button + cell editing from Finanzplan Finanzplan is now read-only for investors: - Removed "Berechnen" / "Compute" button - Removed cell double-click editing - Removed blue edit indicator dots - All sums computed live in frontend (no manual recompute needed) Co-Authored-By: Claude Opus 4.6 (1M context) --- .../components/slides/FinanzplanSlide.tsx | 37 +------------------ 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/pitch-deck/components/slides/FinanzplanSlide.tsx b/pitch-deck/components/slides/FinanzplanSlide.tsx index 62fbe8b..b04d1b0 100644 --- a/pitch-deck/components/slides/FinanzplanSlide.tsx +++ b/pitch-deck/components/slides/FinanzplanSlide.tsx @@ -99,7 +99,6 @@ export default function FinanzplanSlide({ lang, investorId, preferredScenarioId, const [activeSheet, setActiveSheet] = useState('guv') const [rows, setRows] = useState([]) const [loading, setLoading] = useState(false) - const [computing, setComputing] = useState(false) const [yearOffset, setYearOffset] = useState(0) // 0=2026, 1=2027, ... const de = lang === 'de' @@ -197,31 +196,6 @@ export default function FinanzplanSlide({ lang, investorId, preferredScenarioId, useEffect(() => { loadSheet(activeSheet) }, [activeSheet, loadSheet]) - // Compute - const handleCompute = async () => { - setComputing(true) - try { - await fetch('/api/finanzplan/compute', { method: 'POST', headers: { 'Content-Type': 'application/json' }, body: JSON.stringify({ scenarioId: selectedScenarioId || undefined }) }) - await loadSheet(activeSheet) - } catch { /* ignore */ } - setComputing(false) - } - - // Cell edit - const handleCellEdit = async (rowId: number, monthKey: string, newValue: string) => { - const numVal = parseFloat(newValue.replace(/[^\d.-]/g, '')) - if (isNaN(numVal)) return - - try { - await fetch(`/api/finanzplan/${activeSheet}`, { - method: 'PUT', - headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify({ rowId, updates: { [monthKey]: numVal } }), - }) - await loadSheet(activeSheet) - } catch { /* ignore */ } - } - const currentYear = 2026 + yearOffset const monthStart = yearOffset * 12 + 1 const monthEnd = monthStart + 11 @@ -270,15 +244,6 @@ export default function FinanzplanSlide({ lang, investorId, preferredScenarioId, {tab.label} ))} -
-
{/* === KPIs Tab === */} @@ -656,7 +621,7 @@ export default function FinanzplanSlide({ lang, investorId, preferredScenarioId, const label = getLabel(row) const isSumRow = row.is_sum_row || label.includes('GESAMT') || label.includes('Summe') || label.includes('ÜBERSCHUSS') || label.includes('LIQUIDITÄT') || label.includes('UEBERSCHUSS') || label.includes('LIQUIDITAET') const isTotalRow = label.includes('GESAMT') || label.includes('Bestandskunden gesamt') || label.includes('GESAMTUMSATZ') || label.includes('SUMME') - const isEditable = row.is_editable + const isEditable = false // read-only for investors // Balance rows show Dec value, flow rows show annual sum const isBalanceRow = label.includes('Kontostand') || label === 'LIQUIDITÄT' || label === 'LIQUIDITAET' const isUnitPrice = (row as Record).section === 'unit_cost' || (row as Record).section === 'einkauf' || label.includes('Einkaufspreis')