// frontend/components/tasks/KanbanCard.tsx "use client"; import { Icon } from "@/components/Icon"; import { cx } from "@/lib/cx"; import { dueLabel, isSoon, pct, stat } from "@/lib/tasks/tree"; import type { Person, Project, Task } from "@/lib/types"; import { Av, Tag } from "./bits"; export function KanbanCard({ task, people, projects, onOpen, onDragStart, onDragEnd, dragging, }: { task: Task; people: Record; projects: Record; onOpen: (id: string) => void; onDragStart?: (e: React.DragEvent) => void; onDragEnd?: () => void; dragging?: boolean; }) { const s = stat(task); const soon = isSoon(task); const proj = projects[task.project_id]; const person = task.assignee_id ? people[task.assignee_id] : null; return (
onOpen(task.id)} >
{task.title}
{s.total > 0 && (
{s.done}/{s.total}
)}
{dueLabel(task.due)} {task.prio} {task.delegated && ( 위임 )}
); }