diff --git a/src/components/KanbanBoard.tsx b/src/components/KanbanBoard.tsx index 28d72d2..0f2c681 100644 --- a/src/components/KanbanBoard.tsx +++ b/src/components/KanbanBoard.tsx @@ -218,6 +218,10 @@ export default function KanbanBoard({ projectId, projectSlug }: Props) { setTasks((prev) => prev.filter((t) => t.id !== id)); setSelectedTask(null); }} + onOpenTask={(taskId) => { + const t = tasks.find(t => t.id === taskId); + if (t) setSelectedTask(t); + }} /> )} diff --git a/src/components/TaskModal.tsx b/src/components/TaskModal.tsx index 3b7d902..579fdea 100644 --- a/src/components/TaskModal.tsx +++ b/src/components/TaskModal.tsx @@ -36,9 +36,10 @@ interface Props { onClose: () => void; onUpdated: (task: Task) => void; onDeleted: (taskId: string) => void; + onOpenTask?: (taskId: string) => void; } -export default function TaskModal({ task, projectId: _projectId, projectSlug: _projectSlug, onClose, onUpdated, onDeleted }: Props) { +export default function TaskModal({ task, projectId: _projectId, projectSlug: _projectSlug, onClose, onUpdated, onDeleted, onOpenTask }: Props) { const [title, setTitle] = useState(task.title); const [description, setDescription] = useState(task.description || ""); const [status, setStatus] = useState(task.status); @@ -161,7 +162,18 @@ export default function TaskModal({ task, projectId: _projectId, projectSlug: _p ✕ -
{task.key}
+
+ {task.parent_key && task.parent_id ? ( + + + / + + ) : null} + {task.key} +
@@ -239,6 +251,34 @@ export default function TaskModal({ task, projectId: _projectId, projectSlug: _p
+ {/* Subtasks */} + {task.subtasks && task.subtasks.length > 0 && ( +
+
Подзадачи ({task.subtasks.length})
+
+ {task.subtasks.map((sub) => ( +
+
+ + + {sub.title} +
+ {sub.assignee && ( + → {sub.assignee.slug} + )} +
+ ))} +
+
+ )} + {/* Dependencies */} {(links.length > 0 || showAddLink) && (
diff --git a/src/lib/api.ts b/src/lib/api.ts index 0b23c43..7374e62 100644 --- a/src/lib/api.ts +++ b/src/lib/api.ts @@ -127,10 +127,21 @@ export interface Task { position: number; time_spent: number; steps: Step[]; + subtasks: SubtaskBrief[]; + parent_key: string | null; + parent_title: string | null; created_at: string; updated_at: string; } +export interface SubtaskBrief { + id: string; + key: string; + title: string; + status: string; + assignee: MemberBrief | null; +} + export interface Attachment { id: string; filename: string;