Skip to content

Commit c136692

Browse files
committed
#3909 Final Changes and Small Fixes
1 parent 22e06bf commit c136692

2 files changed

Lines changed: 5 additions & 36 deletions

File tree

src/frontend/src/pages/GanttPage/ProjectGanttChart/GanttChartFilters.tsx

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -94,19 +94,7 @@ interface GanttChartFiltersProps {
9494
defaultChecked: boolean;
9595
}[];
9696
teamHandlers: { filterLabel: string; handler: (event: ChangeEvent<HTMLInputElement>) => void; defaultChecked: boolean }[];
97-
overdueHandler: {
98-
filterLabel: string;
99-
handler: (event: ChangeEvent<HTMLInputElement>) => void;
100-
defaultChecked?: boolean;
101-
}[];
102-
hideTasksHandler: {
103-
filterLabel: string;
104-
handler: (event: ChangeEvent<HTMLInputElement>) => void;
105-
defaultChecked?: boolean;
106-
}[];
10797
resetHandler: () => void;
108-
collapseHandler: () => void;
109-
expandHandler: () => void;
11098
onClose: () => void;
11199
}
112100

@@ -159,15 +147,15 @@ const GanttChartFilters = ({
159147
>
160148
Reset
161149
</Typography>
162-
<Typography sx={{ color: '#ffffff', lineHeight: 2.75, fontSize: '0.5rem' }}></Typography>
150+
<Typography sx={{ color: theme.palette.text.primary, lineHeight: 2.75, fontSize: '0.5rem' }}></Typography>
163151
<Typography
164152
fontSize="13px"
165153
sx={{ color: theme.palette.primary.main, cursor: 'pointer', '&:hover': { textDecoration: 'underline' } }}
166154
onClick={() => setExpanded({ car: true, division: true, team: true })}
167155
>
168156
Expand All
169157
</Typography>
170-
<Typography sx={{ color: '#ffffff', lineHeight: 2.75, fontSize: '0.5rem' }}></Typography>
158+
<Typography sx={{ color: theme.palette.text.primary, lineHeight: 2.75, fontSize: '0.5rem' }}></Typography>
171159
<Typography
172160
fontSize="13px"
173161
sx={{ color: theme.palette.primary.main, cursor: 'pointer', '&:hover': { textDecoration: 'underline' } }}

src/frontend/src/pages/GanttPage/ProjectGanttChart/GanttChartFiltersButton.tsx

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -12,31 +12,16 @@ interface GanttChartFiltersButtonProps {
1212
defaultChecked: boolean;
1313
}[];
1414
teamHandlers: { filterLabel: string; handler: (event: ChangeEvent<HTMLInputElement>) => void; defaultChecked: boolean }[];
15-
overdueHandler: {
16-
filterLabel: string;
17-
handler: (event: ChangeEvent<HTMLInputElement>) => void;
18-
defaultChecked?: boolean;
19-
}[];
20-
hideTasksHandler: {
21-
filterLabel: string;
22-
handler: (event: ChangeEvent<HTMLInputElement>) => void;
23-
defaultChecked?: boolean;
24-
}[];
2515
resetHandler: () => void;
26-
collapseHandler: () => void;
27-
expandHandler: () => void;
2816
}
2917

3018
const GanttChartFiltersButton = ({
3119
carHandlers,
3220
teamTypeHandlers,
3321
teamHandlers,
34-
overdueHandler,
35-
hideTasksHandler,
36-
resetHandler,
37-
collapseHandler,
38-
expandHandler
22+
resetHandler
3923
}: GanttChartFiltersButtonProps) => {
24+
const theme = useTheme();
4025
const [anchorFilterEl, setAnchorFilterEl] = useState<HTMLButtonElement | null>(null);
4126
const handleFilterClick = (event: React.MouseEvent<HTMLButtonElement>) => {
4227
setAnchorFilterEl(event.currentTarget);
@@ -68,7 +53,7 @@ const GanttChartFiltersButton = ({
6853
slotProps={{
6954
paper: {
7055
sx: {
71-
backgroundColor: useTheme().palette.background.paper,
56+
backgroundColor: theme.palette.background.paper,
7257
borderRadius: 2
7358
}
7459
}
@@ -78,11 +63,7 @@ const GanttChartFiltersButton = ({
7863
carHandlers={carHandlers}
7964
teamTypeHandlers={teamTypeHandlers}
8065
teamHandlers={teamHandlers}
81-
overdueHandler={overdueHandler}
82-
hideTasksHandler={hideTasksHandler}
8366
resetHandler={resetHandler}
84-
collapseHandler={collapseHandler}
85-
expandHandler={expandHandler}
8667
onClose={handleFilterClose}
8768
/>
8869
</Popover>

0 commit comments

Comments
 (0)