fix: tab row counts use investor's scenario, not always Base Case
Build pitch-deck / build-push-deploy (push) Successful in 1m34s
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-consent (push) Successful in 36s
CI / test-python-voice (push) Successful in 35s
CI / test-bqas (push) Successful in 32s

/api/finanzplan now accepts ?scenarioId and uses it for the per-sheet
row counts (the numbers in brackets on the tab bar). FinanzplanSlide
passes fpBaseScenarioId when fetching the sheet list, so Wandeldarlehen
investors see e.g. Personalkosten (9) instead of (35).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Sharang Parnerkar
2026-05-04 15:21:40 +02:00
parent 06014d57b3
commit f2184be02f
2 changed files with 15 additions and 6 deletions
@@ -100,7 +100,8 @@ export default function FinanzplanSlide({ lang, investorId, preferredScenarioId,
// Load sheet list; populate scenario selector from version data or API fallback
useEffect(() => {
fetch('/api/finanzplan', { cache: 'no-store' })
const listParam = fpBaseScenarioId ? `?scenarioId=${fpBaseScenarioId}` : ''
fetch(`/api/finanzplan${listParam}`, { cache: 'no-store' })
.then(r => r.json())
.then(data => {
setSheets(data.sheets || [])