7
7
8
8
import { FunctionComponent , RefObject , useCallback , useMemo , useState } from 'react' ;
9
9
import { useIntl } from 'react-intl' ;
10
- import { Cancel , CheckCircle , ManageAccounts , RadioButtonUnchecked } from '@mui/icons-material' ;
10
+ import { ManageAccounts } from '@mui/icons-material' ;
11
11
import { GridButton , GridButtonDelete , GridTable , GridTableRef } from '../../components/Grid' ;
12
12
import { UserAdminSrv , UserProfile } from '../../services' ;
13
13
import {
@@ -21,6 +21,7 @@ import {
21
21
import { useSnackMessage } from '@gridsuite/commons-ui' ;
22
22
import DeleteConfirmationDialog from '../common/delete-confirmation-dialog' ;
23
23
import { defaultColDef , defaultRowSelection } from '../common/table-config' ;
24
+ import ValidityCellRenderer from './validity-cell-renderer' ;
24
25
25
26
export interface ProfilesTableProps {
26
27
gridRef : RefObject < GridTableRef < UserProfile > > ;
@@ -82,6 +83,7 @@ const ProfilesTable: FunctionComponent<ProfilesTableProps> = (props) => {
82
83
caseSensitive : false ,
83
84
trimInput : true ,
84
85
} as TextFilterParams < UserProfile > ,
86
+ tooltipField : 'name' ,
85
87
} ,
86
88
{
87
89
field : 'allLinksValid' ,
@@ -90,15 +92,7 @@ const ProfilesTable: FunctionComponent<ProfilesTableProps> = (props) => {
90
92
display : 'flex' ,
91
93
alignItems : 'center' ,
92
94
} ) ,
93
- cellRenderer : ( params : any ) => {
94
- if ( params . value == null ) {
95
- return < RadioButtonUnchecked fontSize = "small" /> ;
96
- } else if ( params . value ) {
97
- return < CheckCircle fontSize = "small" color = "success" /> ;
98
- } else {
99
- return < Cancel fontSize = "small" color = "error" /> ;
100
- }
101
- } ,
95
+ cellRenderer : ValidityCellRenderer ,
102
96
tooltipValueGetter : ( p : ITooltipParams ) => {
103
97
if ( p . value == null ) {
104
98
return intl . formatMessage ( {
0 commit comments