feat(pitch-deck): admin UI for investor + financial-model management (#3)
All checks were successful
CI / test-go-consent (push) Successful in 42s
CI / test-python-voice (push) Successful in 30s
CI / test-bqas (push) Successful in 30s
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / Deploy (push) Successful in 2s
All checks were successful
CI / test-go-consent (push) Successful in 42s
CI / test-python-voice (push) Successful in 30s
CI / test-bqas (push) Successful in 30s
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / Deploy (push) Successful in 2s
Adds /pitch-admin dashboard with real bcrypt admin accounts and full audit attribution for every state-changing action. - pitch_admins + pitch_admin_sessions tables (migration 002) - pitch_audit_logs.admin_id + target_investor_id columns - lib/admin-auth.ts: bcryptjs, single-session, jose JWT with audience claim - middleware.ts: two-cookie gating with bearer-secret CLI fallback - 14 new API routes (admin-auth, dashboard, investor detail/edit/resend, admins CRUD, fm scenarios + assumptions PATCH) - 9 admin pages: login, dashboard, investors list/new/[id], audit, financial-model list/[id], admins - Bootstrap CLI: npm run admin:create - 36 vitest tests covering auth, admin-auth, rate-limit primitives Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit was merged in pull request #3.
This commit is contained in:
33
pitch-deck/components/pitch-admin/StatCard.tsx
Normal file
33
pitch-deck/components/pitch-admin/StatCard.tsx
Normal file
@@ -0,0 +1,33 @@
|
||||
import { LucideIcon } from 'lucide-react'
|
||||
|
||||
interface StatCardProps {
|
||||
label: string
|
||||
value: string | number
|
||||
icon?: LucideIcon
|
||||
hint?: string
|
||||
accent?: 'indigo' | 'green' | 'amber' | 'rose'
|
||||
}
|
||||
|
||||
const ACCENTS = {
|
||||
indigo: 'text-indigo-400 bg-indigo-500/10 border-indigo-500/20',
|
||||
green: 'text-green-400 bg-green-500/10 border-green-500/20',
|
||||
amber: 'text-amber-400 bg-amber-500/10 border-amber-500/20',
|
||||
rose: 'text-rose-400 bg-rose-500/10 border-rose-500/20',
|
||||
}
|
||||
|
||||
export default function StatCard({ label, value, icon: Icon, hint, accent = 'indigo' }: StatCardProps) {
|
||||
return (
|
||||
<div className="bg-white/[0.04] border border-white/[0.06] rounded-2xl p-5">
|
||||
<div className="flex items-start justify-between mb-3">
|
||||
<span className="text-xs font-medium text-white/50 uppercase tracking-wider">{label}</span>
|
||||
{Icon && (
|
||||
<div className={`w-9 h-9 rounded-lg flex items-center justify-center border ${ACCENTS[accent]}`}>
|
||||
<Icon className="w-4 h-4" />
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
<div className="text-3xl font-semibold text-white">{value}</div>
|
||||
{hint && <div className="text-xs text-white/40 mt-1">{hint}</div>}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user