Merge branch 'development'
This commit is contained in:
commit
16953fb53c
|
|
@ -33,7 +33,7 @@ export default function UsersTable(props: Props) {
|
||||||
});
|
});
|
||||||
|
|
||||||
const table = useReactTable({
|
const table = useReactTable({
|
||||||
data: props.userData,
|
data: props.userData.map(data => ({...data, roles: data.roles.map(x => x.name)})),
|
||||||
columns: createColumns({
|
columns: createColumns({
|
||||||
permissions: props.permissions,
|
permissions: props.permissions,
|
||||||
actions: {
|
actions: {
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@ export interface UserRow {
|
||||||
name: string | null;
|
name: string | null;
|
||||||
email: string | null;
|
email: string | null;
|
||||||
photoUrl: string | null;
|
photoUrl: string | null;
|
||||||
|
roles: string[]
|
||||||
}
|
}
|
||||||
|
|
||||||
interface ColumnOptions {
|
interface ColumnOptions {
|
||||||
|
|
@ -64,6 +65,11 @@ const createColumns = (options: ColumnOptions) => {
|
||||||
),
|
),
|
||||||
}),
|
}),
|
||||||
|
|
||||||
|
columnHelper.accessor("roles", {
|
||||||
|
header: "Role",
|
||||||
|
cell: (props) => <Text>{props.getValue()[0]}</Text>
|
||||||
|
}),
|
||||||
|
|
||||||
columnHelper.display({
|
columnHelper.display({
|
||||||
id: "status",
|
id: "status",
|
||||||
header: "Status",
|
header: "Status",
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user