Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 15 additions & 14 deletions src/frontend/src/pages/GanttPage/GanttChart/GanttChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,21 @@ const GanttChart = <E, T>({
>
<GanttChartTimeline start={startDate} end={endDate} />
<Box sx={{ position: 'relative' }}>
{collections.map((collection) => {
return collection.tasks ? (
<GanttChartCollectionSection
startDate={startDate}
endDate={endDate}
collection={collection}
shouldShowChildren={shouldShowChildren}
onShowChildrenToggle={onShowChildrenToggle}
editability={editability}
/>
) : (
<></>
);
})}
{collections
.filter((collection) => collection.tasks.length > 0)
.map((collection) => {
return (
<GanttChartCollectionSection
key={collection.id}
startDate={startDate}
endDate={endDate}
collection={collection}
shouldShowChildren={shouldShowChildren}
onShowChildrenToggle={onShowChildrenToggle}
editability={editability}
/>
);
})}

{currentWeekCol > 0 && (
<Box
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,8 @@ const GanttChartSection = <T,>({
<Box sx={{ mt: '1rem', width: 'fit-content' }}>
{tasks.map((task) => {
return (
<Box display="flex" alignItems="center">
<Box key={task.id} display="flex" alignItems="center">
<GanttTaskBar
key={task.id}
days={days}
task={task}
isEditMode={isEditMode}
Expand Down