@@ -4,23 +4,22 @@ import { useRouteMatch } from 'react-router'
44import { useAsync , NavigationArrow , getRandomColor , not , useKeyDown , noop , ConditionalWrap , Progressing , showError , removeItemsFromArray , getRandomString , Option , MultiValueContainer , MultiValueRemove , multiSelectStyles , sortBySelected , mapByKey , useEffectAfterMount } from '../common'
55import { getUserList , getGroupList , getUserId , getGroupId , getUserRole } from './userGroup.service' ;
66import { ReactComponent as AddIcon } from '../../assets/icons/ic-add.svg' ;
7- import Select , { components } from 'react-select' ;
87import { get } from '../../services/api'
98import { getEnvironmentListMin , getProjectFilteredApps } from '../../services/service'
109import { getChartGroups } from '../charts/charts.service'
1110import { ChartGroup } from '../charts/charts.types'
1211import { DirectPermissionsRoleFilter , ChartGroupPermissionsFilter , ActionTypes , OptionType } from './userGroups.types'
1312import UserForm from './User'
1413import GroupForm from './Group' ;
15- import './UserGroup.scss ';
14+ import Select , { components } from 'react-select ';
1615import { DOCUMENTATION , Routes } from '../../config'
17-
1816import { ReactComponent as CloseIcon } from '../../assets/icons/ic-close.svg'
1917import Tippy from '@tippyjs/react' ;
2018import EmptyState from '../EmptyState/EmptyState' ;
2119import EmptyImage from '../../assets/img/[email protected] ' ; 2220import EmptySearch from '../../assets/img/[email protected] ' ; 2321import { ReactComponent as Lock } from '../../assets/icons/ic-locked.svg'
22+ import './UserGroup.scss' ;
2423
2524interface UserGroup {
2625 appsList : Map < number , { loading : boolean , result : { id : number , name : string } [ ] , error : any } > ;
@@ -248,10 +247,10 @@ const UserGroupList: React.FC<{ type: 'user' | 'group', reloadLists: () => void
248247 if ( loading ) return < div className = "w-100 flex" style = { { minHeight : '600px' } } > < Progressing pageLoader /> </ div >
249248 if ( ! addHash ) return type === "user" ? < NoUsers onClick = { addNewEntry } /> : < NoGroups onClick = { addNewEntry } />
250249 const filteredAndSorted = result
251- . filter ( userOrGroup => ( userOrGroup . email_id ?. includes ( searchString ) || userOrGroup . name ?. includes ( searchString ) || userOrGroup . description ?. includes ( searchString ) ) )
250+ . filter ( userOrGroup => ( userOrGroup . email_id ?. includes ( searchString ?. toLowerCase ( ) ) || userOrGroup . name ?. includes ( searchString ?. toLowerCase ( ) ) || userOrGroup . description ?. includes ( searchString ) ) )
252251 return (
253252 < div id = "auth-page__body" className = "auth-page__body-users__list-container" >
254- { result . length > 0 && < input value = { searchString } autoComplete = "off" ref = { searchRef } type = "search" placeholder = { `search ${ type } ` } className = "auth-search" onChange = { e => setSearchString ( e . target . value ) } /> }
253+ { result . length > 0 && < input value = { searchString } autoComplete = "off" ref = { searchRef } type = "search" placeholder = { `Search ${ type } ` } className = "auth-search" onChange = { e => setSearchString ( e . target . value ) } /> }
255254 { ! ( filteredAndSorted . length === 0 && result . length > 0 ) && < AddUser cancelCallback = { cancelCallback } key = { addHash } text = { `Add ${ type } ` } type = { type } open = { ! ( result ) || result ?. length === 0 } { ...{ createCallback, updateCallback, deleteCallback } } /> }
256255 { filteredAndSorted
257256 . map ( ( data , index ) =>
0 commit comments