Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
LawrenceLau2020 committed Sep 24, 2024
1 parent 1f896e2 commit 5f49550
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
15 changes: 14 additions & 1 deletion react-app/src/components/projects/ProjectsTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,17 @@ const ProjectsTable = () => {
case 'All Projects':
ref.current.setFilterModel({ items: [] });
break;
case 'SPL Projects':
ref.current.setFilterModel({
items: [
{
value: ['Approved for SPL', 'Contract in Place', 'On Market', 'Pre-Marketing'],
field: 'Status',
operator: 'isAnyOf',
},
],
});
break;
case 'Approved for SPL':
case 'Contract in Place':
case 'On Market':
Expand Down Expand Up @@ -235,7 +246,9 @@ const ProjectsTable = () => {
<CustomMenuItem key={'All Projects'} value={'All Projects'}>
All Projects
</CustomMenuItem>,
<CustomListSubheader key={'SPL Projects'}>SPL Projects</CustomListSubheader>,
<CustomMenuItem key={'SPL Projects'} value={'SPL Projects'} sx={{ fontWeight: 'bold' }}>
SPL Projects
</CustomMenuItem>,
<CustomMenuItem key={'Approved for SPL'} value={'Approved for SPL'}>
Approved for SPL
</CustomMenuItem>,
Expand Down
5 changes: 4 additions & 1 deletion react-app/src/components/table/DataTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
MenuItem,
Select,
SxProps,
Theme,
Tooltip,
Typography,
debounce,
Expand Down Expand Up @@ -143,7 +144,9 @@ export const CustomDataGrid = (props: DataGridProps) => {
);
};

export const CustomMenuItem = (props: PropsWithChildren & { value: string }) => {
export const CustomMenuItem = (
props: PropsWithChildren & { value: string; sx?: SxProps<Theme> },
) => {
const theme = useTheme();
return (
<MenuItem
Expand Down

0 comments on commit 5f49550

Please sign in to comment.