// SPDX-License-Identifier: AGPL-3.0
import * as React from 'react';
-import { WithStyles, withStyles, Typography, Tabs, Tab, Paper, Button } from '@material-ui/core';
+import { WithStyles, withStyles, Tabs, Tab, Paper, Button, Grid } from '@material-ui/core';
import { DataExplorer } from "~/views-components/data-explorer/data-explorer";
import { connect, DispatchProp } from 'react-redux';
import { DataColumns } from '~/components/data-table/data-table';
import { UserResource } from '~/models/user';
import { ShareMeIcon, AddIcon } from '~/components/icon/icon';
import { USERS_PANEL_ID, openUserCreateDialog } from '~/store/users/users-actions';
+import { noop } from 'lodash';
type UserPanelRules = "button";
filters: createTree(),
render: uuid => <ResourceIsAdmin uuid={uuid} />
},
- {
- name: UserPanelColumnNames.REDIRECT_TO_USER,
- selected: true,
- configurable: false,
- sortDirection: SortDirection.NONE,
- filters: createTree(),
- render: () => <Typography noWrap>(none)</Typography>
- },
{
name: UserPanelColumnNames.USERNAME,
selected: true,
</Tabs>
{value === 0 &&
<span>
- <div className={this.props.classes.button}>
- <Button variant="contained" color="primary" onClick={this.props.openUserCreateDialog}>
- <AddIcon /> NEW USER
- </Button>
- </div>
<DataExplorer
id={USERS_PANEL_ID}
- onRowClick={this.handleRowClick}
- onRowDoubleClick={this.handleRowDoubleClick}
+ onRowClick={noop}
+ onRowDoubleClick={noop}
onContextMenu={this.handleContextMenu}
contextMenuColumn={true}
- isUserPanel={true}
+ hideColumnSelector
+ actions={
+ <Grid container justify='flex-end'>
+ <Button variant="contained" color="primary" onClick={this.props.openUserCreateDialog}>
+ <AddIcon /> NEW USER
+ </Button>
+ </Grid>
+ }
+ paperProps={{
+ elevation: 0,
+ }}
dataTableDefaultView={
<DataTableDefaultView
icon={ShareMeIcon}
});
}
}
-
- handleRowDoubleClick = (uuid: string) => {
- this.props.handleRowDoubleClick(uuid);
- }
-
- handleRowClick = () => {
- return;
- }
}
);