fix(pitch-deck): version-aware financial model + layout fix + COMPLAI spelling
All checks were successful
Build pitch-deck / build-push-deploy (push) Successful in 1m2s
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 26s
CI / test-python-voice (push) Successful in 25s
CI / test-bqas (push) Successful in 26s
All checks were successful
Build pitch-deck / build-push-deploy (push) Successful in 1m2s
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 26s
CI / test-python-voice (push) Successful in 25s
CI / test-bqas (push) Successful in 26s
Critical fix: All financial slides now use the version's preferred scenario instead of always defaulting to Base Case (1M). This ensures the Wandeldarlehen version shows its own lean financial plan. - useFinancialModel: add preferredScenarioId parameter - PitchDeck: extract default scenario from previewData.fm_scenarios - Pass preferredScenarioId to all 5 financial slides - FinancialsSlide layout: remove empty right column, full-width charts - Remove ScenarioSwitcher + unused slider from FinancialsSlide - Fix COMPLEI → COMPLAI in presenter script (only TTS pronunciation differs) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
import { useState, useEffect, useCallback, useRef } from 'react'
|
||||
import { FMScenario, FMResult, FMComputeResponse, InvestorSnapshot } from '../types'
|
||||
|
||||
export function useFinancialModel(investorId?: string | null) {
|
||||
export function useFinancialModel(investorId?: string | null, preferredScenarioId?: string | null) {
|
||||
const [scenarios, setScenarios] = useState<FMScenario[]>([])
|
||||
const [activeScenarioId, setActiveScenarioId] = useState<string | null>(null)
|
||||
const [compareMode, setCompareMode] = useState(false)
|
||||
@@ -51,7 +51,9 @@ export function useFinancialModel(investorId?: string | null) {
|
||||
}
|
||||
|
||||
setScenarios(data)
|
||||
const defaultScenario = data.find(s => s.is_default) || data[0]
|
||||
// Use preferred scenario if available, otherwise default
|
||||
const preferred = preferredScenarioId ? data.find(s => s.id === preferredScenarioId) : null
|
||||
const defaultScenario = preferred || data.find(s => s.is_default) || data[0]
|
||||
if (defaultScenario) {
|
||||
setActiveScenarioId(defaultScenario.id)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user