11/* eslint-disable @typescript-eslint/no-explicit-any */
2+ import { MUIDataTableColumn , MUIDataTableMeta } from 'mui-datatables' ;
23import { useState } from 'react' ;
34import { DeleteIcon , EditIcon } from '../../icons' ;
45import LogoutIcon from '../../icons/Logout/LogOutIcon' ;
@@ -17,11 +18,12 @@ import {
1718 TableTopIcon ,
1819 TableTopIconsWrapper
1920} from '../Workspaces/styles' ;
21+ import { Team } from '../Workspaces/types' ;
2022
2123// currently team does not support bulk team delete
2224interface DeleteTeamsBtnProps {
2325 selected : any ;
24- teams : any [ ] ;
26+ teams : Team [ ] ;
2527 deleteTeamsModalHandler : ( deleteTeams : { team_ids : string [ ] ; team_names : string [ ] } ) => void ;
2628}
2729
@@ -55,7 +57,7 @@ function DeleteTeamsBtn({ selected, teams, deleteTeamsModalHandler }: DeleteTeam
5557}
5658
5759interface TeamTableConfigurationProps {
58- teams : any [ ] ;
60+ teams : Team [ ] ;
5961 count : number ;
6062 page : number ;
6163 pageSize : number ;
@@ -65,9 +67,9 @@ interface TeamTableConfigurationProps {
6567 setSortOrder : ( sortOrder : string ) => void ;
6668 bulkSelect : boolean ;
6769 setBulkSelect : ( bulkSelect : boolean ) => void ;
68- handleTeamView : ( ev : any , rowData : any ) => void ;
69- handleDeleteTeam : ( ev : any , rowData : any ) => void ;
70- handleleaveTeam : ( ev : any , rowData : any ) => void ;
70+ handleTeamView : ( ev : React . MouseEvent , rowData : any ) => void ;
71+ handleDeleteTeam : ( ev : React . MouseEvent , rowData : any ) => void ;
72+ handleleaveTeam : ( ev : React . MouseEvent , rowData : any ) => void ;
7173 handleRemoveTeamFromWorkspace ?: ( rowData : any ) => void ;
7274 teamId : string ;
7375 workspace ?: boolean ;
@@ -114,15 +116,15 @@ export default function TeamTableConfiguration({
114116 [ 'actions' , 'xs' ]
115117 ] ;
116118
117- const columns = [
119+ const columns : MUIDataTableColumn [ ] = [
118120 {
119121 name : 'id' ,
120122 label : 'ID' ,
121123 options : {
122124 filter : false ,
123125 sort : false ,
124126 searchable : false ,
125- customBodyRender : ( value : any ) => < FormatId id = { value } />
127+ customBodyRender : ( value : string ) => < FormatId id = { value } />
126128 }
127129 } ,
128130 {
@@ -141,7 +143,7 @@ export default function TeamTableConfiguration({
141143 filter : false ,
142144 sort : true ,
143145 searchable : false ,
144- customBodyRender : ( value : any ) => < ConditionalTooltip value = { value } maxLength = { 30 } />
146+ customBodyRender : ( value : string ) => < ConditionalTooltip value = { value } maxLength = { 30 } />
145147 }
146148 } ,
147149 {
@@ -171,10 +173,10 @@ export default function TeamTableConfiguration({
171173 sort : true ,
172174 searchable : false ,
173175 sortDescFirst : true ,
174- customBodyRender : ( v : any ) => JSON . stringify ( v ) ,
176+ customBodyRender : ( v : string ) => JSON . stringify ( v ) ,
175177 filterOptions : {
176178 names : [ 'Deleted' , 'Not Deleted' ] ,
177- logic : ( val : any , filters : any ) => {
179+ logic : ( val : string , filters : any ) => {
178180 if ( val != 'NA' && filters . indexOf ( 'Deleted' ) >= 0 ) return true ;
179181 else if ( val == 'NA' && filters . indexOf ( 'Not Deleted' ) >= 0 ) return true ;
180182 return false ;
@@ -190,7 +192,7 @@ export default function TeamTableConfiguration({
190192 filter : false ,
191193 sort : false ,
192194 searchable : false ,
193- customBodyRender : ( _ : any , tableMeta : any ) => {
195+ customBodyRender : ( _ : string , tableMeta : MUIDataTableMeta ) => {
194196 if ( bulkSelect || tableMeta . rowData [ 4 ] . Valid ) {
195197 return (
196198 < TableIconsDisabledContainer >
@@ -251,7 +253,7 @@ export default function TeamTableConfiguration({
251253 < TooltipIcon
252254 id = { `delete_team-${ tableMeta . rowIndex } ` }
253255 title = { 'Delete Team' }
254- onClick = { ( ev : any ) => {
256+ onClick = { ( ev : React . MouseEvent ) => {
255257 isDeleteTeamAllowed && handleDeleteTeam ( ev , tableMeta . rowData ) ;
256258 } }
257259 iconType = "delete"
0 commit comments