Skip to content

Commit a47b402

Browse files
committed
Fixing accidently removed ArcherContainer
1 parent c4ef4ed commit a47b402

1 file changed

Lines changed: 38 additions & 35 deletions

File tree

src/frontend/src/pages/GanttPage/GanttChart/GanttChartSection.tsx

Lines changed: 38 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { Box } from '@mui/material';
1515
import { useState } from 'react';
1616
import GanttTaskBar from './GanttChartComponents/GanttTaskBar/GanttTaskBar';
1717
import GanttToolTip from './GanttChartComponents/GanttToolTip';
18+
import { ArcherContainer } from 'react-archer';
1819

1920
interface GanttChartSectionProps<T> {
2021
start: Date;
@@ -64,42 +65,44 @@ const GanttChartSection = <T,>({
6465
};
6566

6667
return (
67-
<Box sx={{ width: 'fit-content' }}>
68-
<Box sx={{ mt: '1rem', width: 'fit-content' }}>
69-
{tasks.map((task) => {
70-
return (
71-
<Box display="flex" alignItems="center">
72-
<GanttTaskBar
73-
key={task.id}
74-
days={days}
75-
task={task}
76-
isEditMode={isEditMode}
77-
createChange={handleCreateProjectChange}
78-
handleOnMouseOver={handleOnMouseOver}
79-
handleOnMouseLeave={handleOnMouseLeave}
80-
onShowChildrenToggle={() => onShowChildrenToggle(task)}
81-
onAddTaskPressed={onAddTaskPressed}
82-
showChildren={shouldShowChildren(task)}
83-
highlightedChange={highlightedChange}
84-
highlightSubtaskComparator={highlightSubtaskComparator}
85-
highlightTaskComparator={highlightTaskComparator}
86-
/>
87-
</Box>
88-
);
89-
})}
68+
<ArcherContainer strokeColor="#ef4545">
69+
<Box sx={{ width: 'fit-content' }}>
70+
<Box sx={{ mt: '1rem', width: 'fit-content' }}>
71+
{tasks.map((task) => {
72+
return (
73+
<Box display="flex" alignItems="center">
74+
<GanttTaskBar
75+
key={task.id}
76+
days={days}
77+
task={task}
78+
isEditMode={isEditMode}
79+
createChange={handleCreateProjectChange}
80+
handleOnMouseOver={handleOnMouseOver}
81+
handleOnMouseLeave={handleOnMouseLeave}
82+
onShowChildrenToggle={() => onShowChildrenToggle(task)}
83+
onAddTaskPressed={onAddTaskPressed}
84+
showChildren={shouldShowChildren(task)}
85+
highlightedChange={highlightedChange}
86+
highlightSubtaskComparator={highlightSubtaskComparator}
87+
highlightTaskComparator={highlightTaskComparator}
88+
/>
89+
</Box>
90+
);
91+
})}
92+
</Box>
93+
{currentTooltipOptions && (
94+
<GanttToolTip
95+
yCoordinate={cursorY}
96+
title={currentTooltipOptions.name}
97+
startDate={currentTooltipOptions.start}
98+
endDate={currentTooltipOptions.end}
99+
color={currentTooltipOptions.styles?.backgroundColor}
100+
upperRightDisplay={currentTooltipOptions.tooltip?.upperRightDisplay}
101+
lowerRightDisplay={currentTooltipOptions.tooltip?.lowerRightDisplay}
102+
/>
103+
)}
90104
</Box>
91-
{currentTooltipOptions && (
92-
<GanttToolTip
93-
yCoordinate={cursorY}
94-
title={currentTooltipOptions.name}
95-
startDate={currentTooltipOptions.start}
96-
endDate={currentTooltipOptions.end}
97-
color={currentTooltipOptions.styles?.backgroundColor}
98-
upperRightDisplay={currentTooltipOptions.tooltip?.upperRightDisplay}
99-
lowerRightDisplay={currentTooltipOptions.tooltip?.lowerRightDisplay}
100-
/>
101-
)}
102-
</Box>
105+
</ArcherContainer>
103106
);
104107
};
105108

0 commit comments

Comments
 (0)