Files
property-match/src/components/match-detail/ExecutiveSummaryPanel.tsx
T
Benjamin Sutter da50f3b5ea feat: premium redesign — DM Serif, refined palette, flat score badges
- Design tokens (ds.ts, theme.ts, scoreTheme.ts): new warm palette
  (#152642 navy, #f9f8f6 warm white, #e8e7e4 borders, #b8975a gold accent),
  flat score tier badges replacing CSS gradients, Inter + DM Serif Display typography
- Card components: white-background cards, DM Serif score numbers, max-2 badge
  chips with +N overflow tooltip, editorial score badge positioning
- Layout shell: gold left-accent nav active state, 64px top bar, outlined
  workspace chip, DM Serif page titles
- Shared atoms: GenericBadge (outlined/solid variants), ResultFilterBar
  (simplified chip styles), DecisionContextPanel (dot metrics, no left accent)
- Global replacement (118 files): #1e3a5f→#152642, #e2e8f0→#e8e7e4,
  #f4f6f9→#f9f8f6 — all handled via Node.js for proper UTF-8 safety

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-09 22:26:30 +02:00

58 lines
2.0 KiB
TypeScript

import { Box, Paper, Typography } from '@mui/material'
import { CheckCircle2, AlertTriangle, ArrowRight, Target } from 'lucide-react'
import type { Match } from '../../domain/match'
interface Props {
match: Match
}
export function ExecutiveSummaryPanel({ match }: Props) {
const topReason = match.positiveFactors[0]
const topTradeoff = match.tradeoffs?.[0]
const nextStep = match.nextBestActions?.[0]
const rows: { icon: React.ReactNode; label: string; text: string }[] = [
{
icon: <Target size={15} color="#152642" />,
label: 'Gesamteignung',
text: match.explainabilitySummary || `${match.matchStrength}-Match mit ${match.matchScore} Punkten`,
},
...(topReason ? [{
icon: <CheckCircle2 size={15} color="#1a7a4a" />,
label: 'Stärkster Grund',
text: topReason.explanation,
}] : []),
...(topTradeoff ? [{
icon: <AlertTriangle size={15} color="#d97706" />,
label: 'Hauptabwägung',
text: topTradeoff.concern,
}] : []),
...(nextStep ? [{
icon: <ArrowRight size={15} color="#7c3aed" />,
label: 'Empfohlener nächster Schritt',
text: nextStep.description ?? nextStep.label,
}] : []),
]
return (
<Paper sx={{ p: 2.5, mb: 2, bgcolor: '#f8fafc', border: '1px solid #e2e8f0' }}>
<Typography variant="h6" sx={{ fontWeight: 700, mb: 1.5 }}>Executive Summary</Typography>
<Box sx={{ display: 'flex', flexDirection: 'column', gap: 1.25 }}>
{rows.map((row, i) => (
<Box key={i} sx={{ display: 'flex', alignItems: 'flex-start', gap: 1 }}>
<Box sx={{ mt: 0.25, flexShrink: 0 }}>{row.icon}</Box>
<Box>
<Typography variant="caption" sx={{ fontWeight: 600, color: '#64748b', display: 'block' }}>
{row.label}
</Typography>
<Typography variant="body2">
{row.text}
</Typography>
</Box>
</Box>
))}
</Box>
</Paper>
)
}