feat(pitch): showcase mode — per-investor toggle hides financial/investor slides for customer demos
Build pitch-deck / build-push-deploy (push) Successful in 1m35s
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 39s
CI / test-python-voice (push) Successful in 32s
CI / test-bqas (push) Successful in 30s
Build pitch-deck / build-push-deploy (push) Successful in 1m35s
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 39s
CI / test-python-voice (push) Successful in 32s
CI / test-bqas (push) Successful in 30s
Adds is_showcase boolean to pitch_investors; when set, filters out financials, the ask, cap table, assumptions, finanzplan, risks, and intro-presenter slides. Slide navigation is fully dynamic — progress bar and counts update accordingly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2,7 +2,8 @@
|
||||
|
||||
import { useCallback, useEffect, useState } from 'react'
|
||||
import { AnimatePresence } from 'framer-motion'
|
||||
import { useSlideNavigation } from '@/lib/hooks/useSlideNavigation'
|
||||
import { useSlideNavigation, SLIDE_ORDER } from '@/lib/hooks/useSlideNavigation'
|
||||
import { SHOWCASE_HIDDEN_SLIDES } from '@/lib/slide-order'
|
||||
import { useKeyboard } from '@/lib/hooks/useKeyboard'
|
||||
import { usePitchData } from '@/lib/hooks/usePitchData'
|
||||
import { usePresenterMode } from '@/lib/hooks/usePresenterMode'
|
||||
@@ -68,15 +69,22 @@ export default function PitchDeck({ lang, onToggleLanguage, investor, onLogout,
|
||||
const data = previewData || fetched.data
|
||||
const loading = previewData ? false : fetched.loading
|
||||
const error = previewData ? null : fetched.error
|
||||
const nav = useSlideNavigation()
|
||||
const [fabOpen, setFabOpen] = useState(false)
|
||||
const isWandeldarlehen = (data?.funding?.instrument || '').toLowerCase() === 'wandeldarlehen'
|
||||
const isShowcase = investor?.is_showcase === true
|
||||
|
||||
// Derive fp_scenario IDs from version snapshot (fm_scenarios stores fp_scenario IDs directly)
|
||||
const fpScenarios = data?.fp_scenarios || []
|
||||
const fpBaseScenarioId = fpScenarios.find(s => s.is_default)?.id ?? fpScenarios[0]?.id ?? null
|
||||
const preferredScenarioId = fpBaseScenarioId
|
||||
|
||||
// Showcase mode: filter out investor/financial slides
|
||||
const activeSlideOrder = isShowcase
|
||||
? SLIDE_ORDER.filter(s => !SHOWCASE_HIDDEN_SLIDES.has(s))
|
||||
: SLIDE_ORDER
|
||||
|
||||
const nav = useSlideNavigation(activeSlideOrder)
|
||||
|
||||
// Skip cap-table slide for Wandeldarlehen versions
|
||||
useEffect(() => {
|
||||
if (nav.currentSlide === 'cap-table' && isWandeldarlehen) {
|
||||
|
||||
Reference in New Issue
Block a user