diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-09-27 21:54:39 -0700 |
---|---|---|
committer | Anton Tananaev <anton.tananaev@gmail.com> | 2020-09-27 21:54:39 -0700 |
commit | 236b10503612706ed914678d942ac604f2973f47 (patch) | |
tree | e557381dbdc721002346a0fc64b1a679280fa3f1 /modern/src/admin/UsersPage.js | |
parent | 96af05dbf2171c4e194cf67c3c93d134ef467e50 (diff) | |
download | trackermap-web-236b10503612706ed914678d942ac604f2973f47.tar.gz trackermap-web-236b10503612706ed914678d942ac604f2973f47.tar.bz2 trackermap-web-236b10503612706ed914678d942ac604f2973f47.zip |
Implement notification settings
Diffstat (limited to 'modern/src/admin/UsersPage.js')
-rw-r--r-- | modern/src/admin/UsersPage.js | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/modern/src/admin/UsersPage.js b/modern/src/admin/UsersPage.js index d0861f1c..630bea43 100644 --- a/modern/src/admin/UsersPage.js +++ b/modern/src/admin/UsersPage.js @@ -3,14 +3,11 @@ import MainToolbar from '../MainToolbar'; import { TableContainer, Table, TableRow, TableCell, TableHead, TableBody, makeStyles, IconButton } from '@material-ui/core'; import MoreVertIcon from '@material-ui/icons/MoreVert'; import t from '../common/localization'; -import formatter from '../common/formatter'; import { useEffectAsync } from '../reactHelper'; import EditCollectionView from '../EditCollectionView'; +import { formatBoolean } from '../common/formatter'; const useStyles = makeStyles(theme => ({ - root: { - height: '100%', - }, columnAction: { width: theme.spacing(1), padding: theme.spacing(0, 1), @@ -49,10 +46,10 @@ const UsersView = ({ updateTimestamp, onMenuClick }) => { <MoreVertIcon /> </IconButton> </TableCell> - <TableCell>{formatter(item, 'name')}</TableCell> - <TableCell>{formatter(item, 'email')}</TableCell> - <TableCell>{formatter(item, 'administrator')}</TableCell> - <TableCell>{formatter(item, 'disabled')}</TableCell> + <TableCell>{item.name}</TableCell> + <TableCell>{item.email}</TableCell> + <TableCell>{formatBoolean(item, 'administrator')}</TableCell> + <TableCell>{formatBoolean(item, 'disabled')}</TableCell> </TableRow> ))} </TableBody> @@ -62,13 +59,11 @@ const UsersView = ({ updateTimestamp, onMenuClick }) => { } const UsersPage = () => { - const classes = useStyles(); - return ( - <div className={classes.root}> + <> <MainToolbar /> <EditCollectionView content={UsersView} editPath="/user" endpoint="users" /> - </div> + </> ); } |