da50f3b5ea
- 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>
45 lines
1.7 KiB
TypeScript
45 lines
1.7 KiB
TypeScript
import { Box, Chip, Typography } from '@mui/material'
|
|
import { ShortlistStatusBadge } from './ShortlistStatusBadge'
|
|
import { useShortlistStore } from '../../stores/shortlistStore'
|
|
import type { Shortlist } from '../../domain/shortlist'
|
|
|
|
interface Props {
|
|
shortlist: Shortlist
|
|
}
|
|
|
|
export function ShortlistCard({ shortlist }: Props) {
|
|
const { selectedShortlistId, setSelectedShortlist } = useShortlistStore()
|
|
const isSelected = selectedShortlistId === shortlist.id
|
|
|
|
const updatedDate = new Date(shortlist.updatedAt).toLocaleDateString('de-CH', { day: '2-digit', month: '2-digit', year: 'numeric' })
|
|
|
|
return (
|
|
<Box
|
|
onClick={() => setSelectedShortlist(isSelected ? null : shortlist.id)}
|
|
sx={{
|
|
p: 1.5,
|
|
cursor: 'pointer',
|
|
borderBottom: '1px solid #f1f5f9',
|
|
borderLeft: isSelected ? '3px solid #1e3a5f' : '3px solid transparent',
|
|
bgcolor: isSelected ? '#eff6ff' : 'transparent',
|
|
'&:hover': { bgcolor: isSelected ? '#eff6ff' : '#f8fafc' },
|
|
}}
|
|
>
|
|
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignItems: 'flex-start', mb: 0.5, gap: 0.5 }}>
|
|
<Typography variant="body2" sx={{ fontWeight: 600, lineHeight: 1.3, flex: 1 }}>
|
|
{shortlist.title}
|
|
</Typography>
|
|
<Chip
|
|
label={shortlist.items.length}
|
|
size="small"
|
|
sx={{ bgcolor: '#e8e7e4', color: '#475569', fontSize: 10, height: 18, minWidth: 22, flexShrink: 0 }}
|
|
/>
|
|
</Box>
|
|
<Box sx={{ display: 'flex', alignItems: 'center', gap: 0.75, flexWrap: 'wrap' }}>
|
|
<ShortlistStatusBadge status={shortlist.status} />
|
|
<Typography variant="caption" color="text.secondary">{updatedDate}</Typography>
|
|
</Box>
|
|
</Box>
|
|
)
|
|
}
|