@@ -6,7 +6,7 @@ import {AUTHORITIES, highestAuthority} from "../utils/UserRole";
66import I18n from "../locale/I18n" ;
77import Logo from "./Logo" ;
88import { Button , ButtonType , Card , CardType } from "@surfnet/sds" ;
9- import { isEmpty } from "../utils/Utils" ;
9+ import { isEmpty , splitListSemantically } from "../utils/Utils" ;
1010import { deriveRemoteApplicationAttributes , reduceApplicationFromUserRoles } from "../utils/Manage" ;
1111import SearchIcon from "@surfnet/sds/icons/functional-icons/search.svg" ;
1212import { MoreLessText } from "./MoreLessText" ;
@@ -17,7 +17,7 @@ import {deleteUser} from "../api";
1717import { useNavigate } from "react-router-dom" ;
1818import { useAppStore } from "../stores/AppStore" ;
1919
20- export const User = ( { user, other, config, currentUser} ) => {
20+ export const User = ( { user, other, config, currentUser, otherInstitutionAdmins } ) => {
2121 const navigate = useNavigate ( ) ;
2222 const { setFlash} = useAppStore ( state => state ) ;
2323 const searchRef = useRef ( ) ;
@@ -155,6 +155,15 @@ export const User = ({user, other, config, currentUser}) => {
155155 onClick = { ( ) => doDeleteUser ( true ) } />
156156 </ div >
157157 }
158+ { user . institutionAdmin && < div >
159+ < p className = "label" > { isEmpty ( otherInstitutionAdmins ) ? I18n . t ( "users.onlyInstitutionAdmins" ) :
160+ I18n . t ( "users.institutionAdmins" , ) } </ p >
161+ { ! isEmpty ( otherInstitutionAdmins ) && < ul className = "admins" >
162+ { otherInstitutionAdmins . map ( ( admin , index ) => < li key = { index } >
163+ < span > { `${ admin . name } - ${ admin . email } ` } </ span >
164+ </ li > ) }
165+ </ ul > }
166+ </ div > }
158167 < h3 className = { "title span-row " } > { I18n . t ( "users.roles" ) } </ h3 >
159168 { ( highestAuthority ( user , false ) === AUTHORITIES . GUEST && ! other ) &&
160169 < p className = { "span-row" }
0 commit comments