/** * 决策卡组件 * * 在决策中心列表中展示单个决策卡,点击可展开详情抽屉。 */ import { ChevronRight } from 'lucide-react' import { cn, formatCurrency } from '@/lib/utils' import type { DecisionCard } from '@/lib/decision-aggregator' import { SOURCE_LABELS, LEVEL_LABELS } from '@/lib/decision-aggregator' interface DecisionCardProps { decision: DecisionCard index: number approved: boolean onOpen: (d: DecisionCard) => void } /** 来源类型颜色 */ const SOURCE_COLORS: Record = { profit_opportunity: 'bg-purple-100 text-purple-700', risk_alert: 'bg-red-100 text-red-700', task_anomaly: 'bg-amber-100 text-amber-700', } /** 等级颜色 */ const LEVEL_COLORS: Record = { L1: 'bg-red-50 text-red-600 border border-red-200', L2: 'bg-amber-50 text-amber-600 border border-amber-200', L3: 'bg-green-50 text-green-600 border border-green-200', } export function DecisionCardItem({ decision, index, approved, onOpen }: DecisionCardProps) { const isApproved = approved || decision.status === '已批准' return ( ) }