5
5
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
6
6
*/
7
7
8
- import { FunctionComponent , RefObject , useCallback , useMemo , useState } from 'react' ;
8
+ import { type FunctionComponent , type RefObject , useCallback , useMemo , useState } from 'react' ;
9
9
import { useIntl } from 'react-intl' ;
10
10
import { PersonAdd } from '@mui/icons-material' ;
11
- import { GridButton , GridButtonDelete , GridTable , GridTableRef } from '../../components/Grid' ;
12
- import { GroupInfos , UserAdminSrv , UserInfos } from '../../services' ;
13
- import {
14
- ColDef ,
15
- GetRowIdParams ,
16
- ICheckboxCellRendererParams ,
17
- RowClickedEvent ,
18
- TextFilterParams ,
19
- } from 'ag-grid-community' ;
11
+ import { GridButton , GridButtonDelete , GridTable , type GridTableRef } from '../../components/Grid' ;
12
+ import { type GroupInfos , UserAdminSrv , type UserInfos } from '../../services' ;
13
+ import type { ColDef , GetRowIdParams , RowClickedEvent , TextFilterParams } from 'ag-grid-community' ;
20
14
import { useSnackMessage } from '@gridsuite/commons-ui' ;
21
15
import DeleteConfirmationDialog from '../common/delete-confirmation-dialog' ;
22
16
import { defaultColDef , defaultRowSelection } from '../common/table-config' ;
@@ -65,9 +59,7 @@ const UsersTable: FunctionComponent<UsersTableProps> = (props) => {
65
59
lockVisible : true ,
66
60
filter : true ,
67
61
headerName : intl . formatMessage ( { id : 'users.table.id' } ) ,
68
- headerTooltip : intl . formatMessage ( {
69
- id : 'users.table.id.description' ,
70
- } ) ,
62
+ headerTooltip : intl . formatMessage ( { id : 'users.table.id.description' } ) ,
71
63
filterParams : {
72
64
caseSensitive : false ,
73
65
trimInput : true ,
@@ -80,12 +72,8 @@ const UsersTable: FunctionComponent<UsersTableProps> = (props) => {
80
72
cellDataType : 'text' ,
81
73
flex : 2 ,
82
74
filter : true ,
83
- headerName : intl . formatMessage ( {
84
- id : 'users.table.profileName' ,
85
- } ) ,
86
- headerTooltip : intl . formatMessage ( {
87
- id : 'users.table.profileName.description' ,
88
- } ) ,
75
+ headerName : intl . formatMessage ( { id : 'users.table.profileName' } ) ,
76
+ headerTooltip : intl . formatMessage ( { id : 'users.table.profileName.description' } ) ,
89
77
filterParams : {
90
78
caseSensitive : false ,
91
79
trimInput : true ,
@@ -98,34 +86,14 @@ const UsersTable: FunctionComponent<UsersTableProps> = (props) => {
98
86
cellDataType : 'text' ,
99
87
flex : 4 ,
100
88
filter : true ,
101
- headerName : intl . formatMessage ( {
102
- id : 'users.table.groups' ,
103
- } ) ,
104
- headerTooltip : intl . formatMessage ( {
105
- id : 'users.table.groups.description' ,
106
- } ) ,
89
+ headerName : intl . formatMessage ( { id : 'users.table.groups' } ) ,
90
+ headerTooltip : intl . formatMessage ( { id : 'users.table.groups.description' } ) ,
107
91
filterParams : {
108
92
caseSensitive : false ,
109
93
trimInput : true ,
110
94
} as TextFilterParams < GroupInfos > ,
111
95
cellRenderer : MultiChipCellRenderer ,
112
96
} ,
113
- {
114
- field : 'isAdmin' ,
115
- cellDataType : 'boolean' ,
116
- //detected as cellRenderer: 'agCheckboxCellRenderer',
117
- cellRendererParams : {
118
- disabled : true ,
119
- } as ICheckboxCellRendererParams < UserInfos , { } > ,
120
- flex : 1 ,
121
- headerName : intl . formatMessage ( {
122
- id : 'users.table.isAdmin' ,
123
- } ) ,
124
- headerTooltip : intl . formatMessage ( {
125
- id : 'users.table.isAdmin.description' ,
126
- } ) ,
127
- filter : true ,
128
- } ,
129
97
] ,
130
98
[ intl ]
131
99
) ;
0 commit comments