From 714a933604fb282c14b69faac28759d24cd508de Mon Sep 17 00:00:00 2001 From: Larbi Gharib <larbi.gharib@savoirfairelinux.com> Date: Tue, 20 Jul 2021 19:06:32 +0100 Subject: [PATCH] Checkbox display revoked users Change-Id: I8870e36d4bcbb9a05079715b89ae44f3d57aef78 --- jams-react-client/package.json | 3 ++- jams-react-client/src/views/Users/Users.js | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/jams-react-client/package.json b/jams-react-client/package.json index ff95c432..40ea75d9 100644 --- a/jams-react-client/package.json +++ b/jams-react-client/package.json @@ -92,5 +92,6 @@ "not op_mini all" ], "development": [] - } + }, + "proxy": "http://localhost:8080" } diff --git a/jams-react-client/src/views/Users/Users.js b/jams-react-client/src/views/Users/Users.js index 9a92182e..90baa046 100644 --- a/jams-react-client/src/views/Users/Users.js +++ b/jams-react-client/src/views/Users/Users.js @@ -18,6 +18,9 @@ import UserProfile from "views/UserProfile/UserProfile.js"; import InfoIcon from "@material-ui/icons/Info"; import BusinessOutlinedIcon from "@material-ui/icons/BusinessOutlined"; import Search from "@material-ui/icons/Search"; +import Checkbox from '@material-ui/core/Checkbox'; +import FormGroup from '@material-ui/core/FormGroup'; +import FormControlLabel from '@material-ui/core/FormControlLabel'; import axios from "axios"; import configApiCall from "api.js"; import auth from "auth.js"; @@ -80,6 +83,7 @@ export default function Users(props) { const [createUser, setCreateUser] = React.useState(false); const [loading, setLoading] = React.useState(false); const [progress, setProgress] = React.useState(0); + const [showRevokedUsers, setShowRevokedUsers] = React.useState(false) const [searchValue, setSearchValue] = React.useState(""); @@ -186,6 +190,18 @@ export default function Users(props) { </Button> </Link> )} + <FormControlLabel + control={ + <Checkbox + checked={showRevokedUsers} + onChange={() => setShowRevokedUsers(!showRevokedUsers)} + inputProps={{ 'aria-label': 'primary checkbox' }} + color="primary" + />} + style={{marginLeft: "1rem"}} + label="Display revoked users" + /> + <GridContainer> <GridItem xs={12} sm={12} md={6}> {!noUsersFound && ( -- GitLab