/** 任务进度列表卡片 */ import { ClipboardList, ChevronRight } from "lucide-react"; import type { TaskSummary } from "../../types/api"; const STATUS_LABELS: Record = { pending: "待处理", in_progress: "进行中", completed: "已完成", cancelled: "已取消", }; function statusColor(status: string): string { switch (status) { case "pending": return "bg-yellow-100 text-yellow-700"; case "in_progress": return "bg-blue-100 text-blue-700"; case "completed": return "bg-green-100 text-green-700"; default: return "bg-gray-100 text-gray-600"; } } interface TaskListCardProps { tasks: TaskSummary[]; } export default function TaskListCard({ tasks }: TaskListCardProps) { return (

当前进度

{tasks.length} 个任务
{tasks.length === 0 ? (
暂无关联任务
) : (
{tasks.map((task) => (

{task.task_name}

负责人: {task.assignee_id ?? "未分配"}

{STATUS_LABELS[task.status] ?? task.status}
))}
)}
); }