From f78dc6dc9f184fd0acddb1724fb338b86854787d Mon Sep 17 00:00:00 2001 From: Mark Benson <41453195+thealternator89@users.noreply.github.com> Date: Thu, 16 Apr 2026 07:19:17 +1200 Subject: [PATCH] feat: add child tasks table to task view --- src/renderer/components/TaskView.tsx | 97 +++++++++++++++++++++++++++- 1 file changed, 95 insertions(+), 2 deletions(-) diff --git a/src/renderer/components/TaskView.tsx b/src/renderer/components/TaskView.tsx index f50f918..7977eb7 100644 --- a/src/renderer/components/TaskView.tsx +++ b/src/renderer/components/TaskView.tsx @@ -252,6 +252,10 @@ const TaskView: React.FC = () => { } }; + const childTasks = useMemo(() => { + return projectTasks.filter(t => t.ParentId === task?.Id); + }, [projectTasks, task]); + if (loading) { return (
| ID | +Title | +Effort | +Assignee | +Status | +
|---|---|---|---|---|
| + {project ? `${project.Prefix}-${child.DisplayId}` : child.DisplayId} + | ++ + {child.Title} + + | ++ {effortInfo.type === 'none' ? ( + - + ) : ( + + {effortInfo.type === 'calculated' && } + {effortInfo.type === 'manual-higher' && } + {effortInfo.type === 'manual-equal' && } + {effortInfo.type === 'calculated-higher' && } + {effortInfo.effectiveValue}d + + )} + | ++ {child.AssigneeId ? (() => { + const person = people.find(p => p.Id === child.AssigneeId); + const color = person?.Color || 'info'; + const textColor = ['warning', 'light', 'info'].includes(color) ? 'text-dark' : 'text-white'; + return ( + + {child.AssigneeName} + + ); + })() : ( + Unassigned + )} + | ++ {child.StatusLabel ? (() => { + const status = statuses.find(s => s.Id === child.StatusId); + const isNew = !!status?.IsNew; + + let color = 'secondary'; + if (child.IsComplete) { + color = 'success'; + } else if (isNew) { + color = 'info'; + } + + return ( + + {child.StatusLabel} + + ); + })() : ( + No status + )} + | +