diff --git a/pitch-deck/components/PitchDeck.tsx b/pitch-deck/components/PitchDeck.tsx index bf7c007..fca03ee 100644 --- a/pitch-deck/components/PitchDeck.tsx +++ b/pitch-deck/components/PitchDeck.tsx @@ -69,6 +69,15 @@ export default function PitchDeck({ lang, onToggleLanguage, investor, onLogout, const [fabOpen, setFabOpen] = useState(false) const isWandeldarlehen = (data?.funding?.instrument || '').toLowerCase().includes('wandeldarlehen') + // For version previews: use the version's default FM scenario instead of base table default + // eslint-disable-next-line @typescript-eslint/no-explicit-any + const fmScenarios = (previewData as any)?.fm_scenarios as Array<{ id: string; is_default?: boolean }> | undefined + const preferredScenarioId = fmScenarios?.[0]?.is_default + ? fmScenarios[0].id + : fmScenarios?.length === 1 + ? fmScenarios[0].id + : null + // Skip cap-table slide for Wandeldarlehen versions useEffect(() => { if (nav.currentSlide === 'cap-table' && isWandeldarlehen) { @@ -151,7 +160,7 @@ export default function PitchDeck({ lang, onToggleLanguage, investor, onLogout, /> ) case 'executive-summary': - return + return case 'cover': return case 'problem': @@ -169,7 +178,7 @@ export default function PitchDeck({ lang, onToggleLanguage, investor, onLogout, case 'market': return case 'business-model': - return + return case 'traction': return case 'competition': @@ -177,7 +186,7 @@ export default function PitchDeck({ lang, onToggleLanguage, investor, onLogout, case 'team': return case 'financials': - return + return case 'the-ask': return case 'cap-table': @@ -188,7 +197,7 @@ export default function PitchDeck({ lang, onToggleLanguage, investor, onLogout, case 'ai-qa': return case 'annex-assumptions': - return + return case 'annex-architecture': return case 'annex-gtm': @@ -204,7 +213,7 @@ export default function PitchDeck({ lang, onToggleLanguage, investor, onLogout, case 'annex-strategy': return case 'annex-finanzplan': - return + return case 'annex-glossary': return case 'legal-disclaimer': diff --git a/pitch-deck/components/slides/AssumptionsSlide.tsx b/pitch-deck/components/slides/AssumptionsSlide.tsx index f3f2372..69841f5 100644 --- a/pitch-deck/components/slides/AssumptionsSlide.tsx +++ b/pitch-deck/components/slides/AssumptionsSlide.tsx @@ -11,6 +11,7 @@ import { useFinancialModel } from '@/lib/hooks/useFinancialModel' interface AssumptionsSlideProps { lang: Language investorId?: string | null + preferredScenarioId?: string | null } function fmtArr(v: number, de: boolean): string { @@ -35,12 +36,12 @@ function breakEvenYear(month: number | null): string { return String(year) } -export default function AssumptionsSlide({ lang, investorId }: AssumptionsSlideProps) { +export default function AssumptionsSlide({ lang, investorId, preferredScenarioId }: AssumptionsSlideProps) { const i = t(lang) const de = lang === 'de' // Load computed financial data for Base Case - const fm = useFinancialModel(investorId || null) + const fm = useFinancialModel(investorId || null, preferredScenarioId) const summary = fm.activeResults?.summary const results = fm.activeResults?.results || [] const lastResult = results.length > 0 ? results[results.length - 1] : null diff --git a/pitch-deck/components/slides/BusinessModelSlide.tsx b/pitch-deck/components/slides/BusinessModelSlide.tsx index f52c8b3..deb4fb5 100644 --- a/pitch-deck/components/slides/BusinessModelSlide.tsx +++ b/pitch-deck/components/slides/BusinessModelSlide.tsx @@ -12,12 +12,13 @@ interface BusinessModelSlideProps { lang: Language products?: unknown[] investorId?: string | null + preferredScenarioId?: string | null } -export default function BusinessModelSlide({ lang, investorId }: BusinessModelSlideProps) { +export default function BusinessModelSlide({ lang, investorId, preferredScenarioId }: BusinessModelSlideProps) { const i = t(lang) const de = lang === 'de' - const fm = useFinancialModel(investorId || null) + const fm = useFinancialModel(investorId || null, preferredScenarioId) const summary = fm.activeResults?.summary const results = fm.activeResults?.results || [] const lastResult = results[results.length - 1] diff --git a/pitch-deck/components/slides/ExecutiveSummarySlide.tsx b/pitch-deck/components/slides/ExecutiveSummarySlide.tsx index 92f10d6..27d2cb5 100644 --- a/pitch-deck/components/slides/ExecutiveSummarySlide.tsx +++ b/pitch-deck/components/slides/ExecutiveSummarySlide.tsx @@ -14,15 +14,16 @@ interface ExecutiveSummarySlideProps { lang: Language data: PitchData investorId?: string | null + preferredScenarioId?: string | null } -export default function ExecutiveSummarySlide({ lang, data, investorId }: ExecutiveSummarySlideProps) { +export default function ExecutiveSummarySlide({ lang, data, investorId, preferredScenarioId }: ExecutiveSummarySlideProps) { const i = t(lang) const es = i.executiveSummary const de = lang === 'de' // Financial model for Unternehmensentwicklung - const fm = useFinancialModel(investorId || null) + const fm = useFinancialModel(investorId || null, preferredScenarioId) const annualKPIs = useMemo( () => computeAnnualKPIs(fm.activeResults?.results || []), [fm.activeResults], diff --git a/pitch-deck/components/slides/FinancialsSlide.tsx b/pitch-deck/components/slides/FinancialsSlide.tsx index 29fca58..727adff 100644 --- a/pitch-deck/components/slides/FinancialsSlide.tsx +++ b/pitch-deck/components/slides/FinancialsSlide.tsx @@ -22,11 +22,12 @@ type FinTab = 'overview' | 'guv' | 'cashflow' interface FinancialsSlideProps { lang: Language investorId: string | null + preferredScenarioId?: string | null } -export default function FinancialsSlide({ lang, investorId }: FinancialsSlideProps) { +export default function FinancialsSlide({ lang, investorId, preferredScenarioId }: FinancialsSlideProps) { const i = t(lang) - const fm = useFinancialModel(investorId) + const fm = useFinancialModel(investorId, preferredScenarioId) const [activeTab, setActiveTab] = useState('overview') const de = lang === 'de' @@ -125,10 +126,8 @@ export default function FinancialsSlide({ lang, investorId }: FinancialsSlidePro ))} - {/* Main content: 3-column layout */} -
- {/* Left: Charts (8 columns) */} -
+ {/* Main content: full width */} +
{/* TAB: Overview — monatlicher Chart + Waterfall + Unit Economics */} {activeTab === 'overview' && ( @@ -222,38 +221,6 @@ export default function FinancialsSlide({ lang, investorId }: FinancialsSlidePro
)} -
- - {/* Right: Controls (4 columns) */} -
- {/* Scenario Switcher */} - -
- { - fm.setActiveScenarioId(id) - }} - onToggleCompare={() => { - if (!fm.compareMode) { - fm.computeAll() - } - fm.setCompareMode(!fm.compareMode) - }} - lang={lang} - /> -
-
- - {fm.computing && ( -
-
- {de ? 'Berechne...' : 'Computing...'} -
- )} -
diff --git a/pitch-deck/components/slides/FinanzplanSlide.tsx b/pitch-deck/components/slides/FinanzplanSlide.tsx index 286b984..dd6db5f 100644 --- a/pitch-deck/components/slides/FinanzplanSlide.tsx +++ b/pitch-deck/components/slides/FinanzplanSlide.tsx @@ -14,6 +14,7 @@ import { RefreshCw, Download, ChevronLeft, ChevronRight, BarChart3, Target } fro interface FinanzplanSlideProps { lang: Language investorId?: string | null + preferredScenarioId?: string | null } interface SheetMeta { @@ -60,7 +61,7 @@ function formatCell(v: number | undefined): string { return Math.round(v).toLocaleString('de-DE', { maximumFractionDigits: 0 }) } -export default function FinanzplanSlide({ lang, investorId }: FinanzplanSlideProps) { +export default function FinanzplanSlide({ lang, investorId, preferredScenarioId }: FinanzplanSlideProps) { const [sheets, setSheets] = useState([]) const [activeSheet, setActiveSheet] = useState('personalkosten') const [rows, setRows] = useState([]) @@ -70,7 +71,7 @@ export default function FinanzplanSlide({ lang, investorId }: FinanzplanSlidePro const de = lang === 'de' // Financial model — same source as FinancialsSlide (Slide 15) - const fm = useFinancialModel(investorId || null) + const fm = useFinancialModel(investorId || null, preferredScenarioId) const annualKPIs = useMemo( () => computeAnnualKPIs(fm.activeResults?.results || []), [fm.activeResults], diff --git a/pitch-deck/lib/hooks/useFinancialModel.ts b/pitch-deck/lib/hooks/useFinancialModel.ts index d7d6773..0c708f8 100644 --- a/pitch-deck/lib/hooks/useFinancialModel.ts +++ b/pitch-deck/lib/hooks/useFinancialModel.ts @@ -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([]) const [activeScenarioId, setActiveScenarioId] = useState(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) } diff --git a/pitch-deck/lib/presenter/presenter-script.ts b/pitch-deck/lib/presenter/presenter-script.ts index 58a3caa..df9560a 100644 --- a/pitch-deck/lib/presenter/presenter-script.ts +++ b/pitch-deck/lib/presenter/presenter-script.ts @@ -7,8 +7,8 @@ export const PRESENTER_SCRIPT: SlideScript[] = [ duration: 45, paragraphs: [ { - text_de: 'Willkommen bei BreakPilot COMPLEI — der Compliance-Plattform, die produzierende Unternehmen endlich von der Regulierungslast befreit. Von der DSGVO ueber den AI Act bis zur CE-Kennzeichnung — alles aus einer Hand.', - text_en: 'Welcome to BreakPilot COMPLEI — the compliance platform that finally frees manufacturing companies from the regulatory burden. From GDPR to the AI Act to CE certification — all from a single source.', + text_de: 'Willkommen bei BreakPilot COMPLAI — der Compliance-Plattform, die produzierende Unternehmen endlich von der Regulierungslast befreit. Von der DSGVO ueber den AI Act bis zur CE-Kennzeichnung — alles aus einer Hand.', + text_en: 'Welcome to BreakPilot COMPLAI — the compliance platform that finally frees manufacturing companies from the regulatory burden. From GDPR to the AI Act to CE certification — all from a single source.', pause_after: 1500, }, { @@ -32,8 +32,8 @@ export const PRESENTER_SCRIPT: SlideScript[] = [ duration: 30, paragraphs: [ { - text_de: 'Bevor wir ins Detail gehen, hier das Wichtigste auf einen Blick: BreakPilot COMPLEI ist die einzige Plattform, die organisatorische Compliance, Produkt-Compliance und Code-Security vereint — speziell fuer den produzierenden Mittelstand.', - text_en: 'Before we dive into details, here is the key summary: BreakPilot COMPLEI is the only platform that combines organizational compliance, product compliance and code security — specifically for the manufacturing mid-market.', + text_de: 'Bevor wir ins Detail gehen, hier das Wichtigste auf einen Blick: BreakPilot COMPLAI ist die einzige Plattform, die organisatorische Compliance, Produkt-Compliance und Code-Security vereint — speziell fuer den produzierenden Mittelstand.', + text_en: 'Before we dive into details, here is the key summary: BreakPilot COMPLAI is the only platform that combines organizational compliance, product compliance and code security — specifically for the manufacturing mid-market.', pause_after: 1500, }, { @@ -52,8 +52,8 @@ export const PRESENTER_SCRIPT: SlideScript[] = [ duration: 20, paragraphs: [ { - text_de: 'BreakPilot COMPLEI — ueber 380 Regularien, 10 Branchen, eine Plattform. Kontinuierliche Compliance und Code-Security. Gruendung August 2026. Wir bauen die Zukunft der industriellen Compliance.', - text_en: 'BreakPilot COMPLEI — over 380 regulations, 10 industries, one platform. Continuous compliance and code security. Founding August 2026. We are building the future of industrial compliance.', + text_de: 'BreakPilot COMPLAI — ueber 380 Regularien, 10 Branchen, eine Plattform. Kontinuierliche Compliance und Code-Security. Gruendung August 2026. Wir bauen die Zukunft der industriellen Compliance.', + text_en: 'BreakPilot COMPLAI — over 380 regulations, 10 industries, one platform. Continuous compliance and code security. Founding August 2026. We are building the future of industrial compliance.', pause_after: 1500, }, ], @@ -636,8 +636,8 @@ export const PRESENTER_SCRIPT: SlideScript[] = [ duration: 20, paragraphs: [ { - text_de: 'Zum Abschluss der wichtige rechtliche Hinweis: Dieses Pitch Deck ist vertraulich und ausschliesslich fuer den eingeladenen Empfaenger bestimmt. Alle Finanzangaben sind Planzahlen. Vielen Dank fuer Ihre Zeit und Ihr Interesse an BreakPilot COMPLEI.', - text_en: 'To conclude, the important legal notice: This pitch deck is confidential and intended exclusively for the invited recipient. All financial figures are projections. Thank you for your time and interest in BreakPilot COMPLEI.', + text_de: 'Zum Abschluss der wichtige rechtliche Hinweis: Dieses Pitch Deck ist vertraulich und ausschliesslich fuer den eingeladenen Empfaenger bestimmt. Alle Finanzangaben sind Planzahlen. Vielen Dank fuer Ihre Zeit und Ihr Interesse an BreakPilot COMPLAI.', + text_en: 'To conclude, the important legal notice: This pitch deck is confidential and intended exclusively for the invited recipient. All financial figures are projections. Thank you for your time and interest in BreakPilot COMPLAI.', pause_after: 1500, }, ],