fix: role field in invite & User dialog.

This commit is contained in:
elforjani13
2021-11-26 19:48:19 +02:00
parent 64bf223458
commit 313d0f3d0f
7 changed files with 53 additions and 36 deletions

View File

@@ -28,8 +28,6 @@ export function ActionsMenu({
row: { original },
payload: { onEdit, onInactivate, onActivate, onDelete, onResendInvitation },
}) {
return (
<Menu>
<If condition={original.invite_accepted_at}>
@@ -78,7 +76,7 @@ export function ActionsMenu({
*/
function StatusAccessor(user) {
return !user.is_invite_accepted ? (
<Tag minimal={true} >
<Tag minimal={true}>
<T id={'inviting'} />
</Tag>
) : user.active ? (
@@ -111,8 +109,6 @@ function FullNameAccessor(user) {
}
export const useUsersListColumns = () => {
return React.useMemo(
() => [
{
@@ -134,11 +130,17 @@ export const useUsersListColumns = () => {
width: 150,
},
{
id: 'phone_number',
Header: intl.get('phone_number'),
accessor: 'phone_number',
id: 'role_name',
Header: intl.get('roles.column.role_name'),
accessor: 'role.name',
width: 120,
},
// {
// id: 'phone_number',
// Header: intl.get('phone_number'),
// accessor: 'phone_number',
// width: 120,
// },
{
id: 'status',
Header: 'Status',