diff --git a/pitch-deck/app/api/admin/fp-patch/route.ts b/pitch-deck/app/api/admin/fp-patch/route.ts index 32664fb..ff87109 100644 --- a/pitch-deck/app/api/admin/fp-patch/route.ts +++ b/pitch-deck/app/api/admin/fp-patch/route.ts @@ -1,8 +1,17 @@ -import { NextResponse } from 'next/server' +import { NextRequest, NextResponse } from 'next/server' +import { requireAdmin } from '@/lib/admin-auth' import pool from '@/lib/db' +import { computeFinanzplan } from '@/lib/finanzplan/engine' -export async function POST() { - const WD = 'c0000000-0000-0000-0000-000000000200' - await pool.query(`UPDATE fp_liquiditaet SET row_label='2. Finanzierungsrunde (optional)' WHERE scenario_id=$1 AND row_label='2. Finanzierungsrunde'`, [WD]) - return NextResponse.json({ ok: true }) +/** Admin-only: recompute a Finanzplan scenario. */ +export async function POST(request: NextRequest) { + const guard = await requireAdmin(request) + if (guard.kind === 'response') return guard.response + + const body = await request.json().catch(() => ({})) + const scenarioId = body.scenarioId || (await pool.query("SELECT id FROM fp_scenarios WHERE is_default = true LIMIT 1")).rows[0]?.id + if (!scenarioId) return NextResponse.json({ error: 'No scenario found' }, { status: 404 }) + + const result = await computeFinanzplan(pool, scenarioId) + return NextResponse.json({ success: true, scenarioId, cash_m60: result.liquiditaet?.endstand?.m60 }) } diff --git a/pitch-deck/components/slides/MilestonesSlide.tsx b/pitch-deck/components/slides/MilestonesSlide.tsx index c1526b7..220c041 100644 --- a/pitch-deck/components/slides/MilestonesSlide.tsx +++ b/pitch-deck/components/slides/MilestonesSlide.tsx @@ -780,9 +780,12 @@ export default function MilestonesSlide({ lang }: MilestonesSlideProps) { - + {de ? 'Meilensteine' : 'Milestones'} + + {de ? 'Von der Idee zur GmbH — was wir bereits erreicht haben' : 'From idea to GmbH — what we have already achieved'} + diff --git a/pitch-deck/components/slides/USPSlide.tsx b/pitch-deck/components/slides/USPSlide.tsx index a11f4e2..1e1e6be 100644 --- a/pitch-deck/components/slides/USPSlide.tsx +++ b/pitch-deck/components/slides/USPSlide.tsx @@ -631,9 +631,12 @@ export default function USPSlide({ lang }: USPSlideProps) { - + USP + + {de ? 'Compliance und Code — in einer Plattform, immer synchron' : 'Compliance and code — one platform, always in sync'} + diff --git a/pitch-deck/middleware.ts b/pitch-deck/middleware.ts index fc6dfe4..2cfd3ba 100644 --- a/pitch-deck/middleware.ts +++ b/pitch-deck/middleware.ts @@ -6,7 +6,6 @@ const PUBLIC_PATHS = [ '/auth', // investor login pages '/api/auth', // investor auth API '/api/health', - '/api/admin/fp-patch', '/api/admin-auth', // admin login API '/pitch-admin/login', // admin login page '/_next',
+ {de ? 'Von der Idee zur GmbH — was wir bereits erreicht haben' : 'From idea to GmbH — what we have already achieved'} +
+ {de ? 'Compliance und Code — in einer Plattform, immer synchron' : 'Compliance and code — one platform, always in sync'} +