Skip to content

Commit

Permalink
Merge branch 'SIMSBIOHUB-397' into dataset_security_feature
Browse files Browse the repository at this point in the history
  • Loading branch information
al-rosenthal committed Dec 8, 2023
2 parents 1668355 + 97ed8ea commit b001aef
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
33 changes: 33 additions & 0 deletions app/src/components/security/ManageSecurity.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
import { mdiChevronDown, mdiChevronUp } from '@mdi/js';
import Icon from '@mdi/react';
import { Button, Menu, MenuItem } from '@mui/material';
import React from 'react';

const ManageSecurity: React.FC = () => {
const [anchorEl, setAnchorEl] = React.useState<null | HTMLElement>(null);
const open = Boolean(anchorEl);
const handleClick = (event: React.MouseEvent<HTMLButtonElement>) => {
setAnchorEl(event.currentTarget);
};
const handleClose = () => {
setAnchorEl(null);
};
return (
<>
<Button
color="primary"
data-testid="manage-security"
variant="outlined"
onClick={handleClick}
endIcon={open ? <Icon path={mdiChevronUp} size={1}/> : <Icon path={mdiChevronDown} size={1}/>}>

Check warning on line 22 in app/src/components/security/ManageSecurity.tsx

View workflow job for this annotation

GitHub Actions / Running Linter and Formatter

Replace `/>·:·<Icon·path={mdiChevronDown}·size={1}` with `·/>·:·<Icon·path={mdiChevronDown}·size={1}·`
Manage Security
</Button>
<Menu open={open} anchorEl={anchorEl} onClose={handleClose}>
<MenuItem>Secure Records</MenuItem>
<MenuItem>Unsecure Records</MenuItem>
</Menu>
</>
);
};

export default ManageSecurity;
2 changes: 2 additions & 0 deletions app/src/features/admin/dashboard/DashboardPage.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Typography } from '@mui/material';
import Box from '@mui/material/Box';
import Paper from '@mui/material/Paper';
import ManageSecurity from 'components/security/ManageSecurity';
import DatasetsForReviewTable from './components/DatasetsForReviewTable';

const DashboardPage = () => {
Expand Down Expand Up @@ -31,6 +32,7 @@ const DashboardPage = () => {
}}>
Pending Security Reviews
</Typography>
<ManageSecurity />
<Box
sx={{
p: 2
Expand Down

0 comments on commit b001aef

Please sign in to comment.