/** * @file dashboard/KanbanCard.tsx * @description Client component rendering a simplified kanban task card displaying title, priority, description, and metadata. */ "use client"; import { KanbanCardProps } from "@/types/tasks"; /** * Renders a task card component with a basic layout for title, priority, description, due date, and creator info. * * @param {KanbanCardProps} props - The component props containing the task object. * @returns {JSX.Element} The rendered kanban card component. */ export default function KanbanCard({ task }: KanbanCardProps) { const assignees = task.assignees || []; return (
{/* Title & Priority */}
{task.title} {task.priority && ( {task.priority} )}
{/* Description */} {task.description && (

{task.description}

)} {/* Footer / Meta & People */}
{task.dueDate && ( {new Date(task.dueDate).toLocaleDateString()} )}
{task.creator && ( {task.creator.substring(0, 2).toUpperCase()} )} {assignees.map((assignee, index) => ( {assignee.substring(0, 2).toUpperCase()} ))}
); }