Skip to content

Commit

Permalink
fix(admin-ui): user management blank page fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mjatin-dev committed Jul 13, 2022
1 parent 47af2e1 commit 2ae6d41
Showing 1 changed file with 36 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -114,37 +114,42 @@ function UserList(props) {
<Card style={applicationStyle.mainCard}>
<CardBody>
<GluuViewWrapper canShow={hasPermission(permissions, ROLE_READ)}>
<MaterialTable
components={{
Container: (props) => <Paper {...props} elevation={0} />,
}}
columns={[
{
title: `${t('fields.name')}`,
field: 'displayName',
},
{ title: `${t('fields.userName')}`, field: 'userId' },
{ title: `${t('fields.email')}`, field: 'mail' },
]}
data={usersList}
isLoading={loading}
title=""
actions={myActions}
options={{
search: true,
searchFieldAlignment: 'left',
selection: false,
pageSize: pageSize,
rowStyle: (rowData) => ({
backgroundColor: rowData.enabled ? '#33AE9A' : '#FFF',
}),
headerStyle: { ...applicationStyle.tableHeaderStyle, ...bgThemeColor },
actionsColumnIndex: -1,
}}
detailPanel={(rowData) => {
return <UserDetailViewPage row={rowData} />
}}
/>
{usersList.length > 0 && (
<MaterialTable
components={{
Container: (props) => <Paper {...props} elevation={0} />,
}}
columns={[
{
title: `${t('fields.name')}`,
field: 'displayName',
},
{ title: `${t('fields.userName')}`, field: 'userId' },
{ title: `${t('fields.email')}`, field: 'mail' },
]}
data={usersList}
isLoading={loading}
title=""
actions={myActions}
options={{
search: true,
searchFieldAlignment: 'left',
selection: false,
pageSize: pageSize,
rowStyle: (rowData) => ({
backgroundColor: rowData.enabled ? '#33AE9A' : '#FFF',
}),
headerStyle: {
...applicationStyle.tableHeaderStyle,
...bgThemeColor,
},
actionsColumnIndex: -1,
}}
detailPanel={(rowData) => {
return <UserDetailViewPage row={rowData} />
}}
/>
)}
</GluuViewWrapper>
</CardBody>
<GluuCommitDialog handler={toggle} modal={modal} onAccept={submitForm} />
Expand Down

0 comments on commit 2ae6d41

Please sign in to comment.