import { KANBAN_COLUMN_DISPLAY, TASK_STATUS_LABELS } from '@renderer/utils/memberHelpers'; import type { TeamTaskWithKanban } from '@shared/types'; interface TaskRowProps { task: TeamTaskWithKanban; } export const TaskRow = ({ task }: TaskRowProps): React.JSX.Element => { const blockedByIds = task.blockedBy?.filter((id) => id.length > 0) ?? []; const blocksIds = task.blocks?.filter((id) => id.length > 0) ?? []; return ( {task.id} {task.subject} {task.owner ?? 'Unassigned'} {task.kanbanColumn && task.kanbanColumn in KANBAN_COLUMN_DISPLAY ? KANBAN_COLUMN_DISPLAY[task.kanbanColumn].label : (TASK_STATUS_LABELS[task.status] ?? task.status)} {blockedByIds.length > 0 ? ( {blockedByIds.map((id) => `#${id}`).join(', ')} ) : ( {'\u2014'} )} {blocksIds.length > 0 ? ( {blocksIds.map((id) => `#${id}`).join(', ')} ) : ( {'\u2014'} )} ); };