File tree Expand file tree Collapse file tree
apps/frontend/src/components/techniqueProposal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ import {
5959} from 'utils/helperFunctions' ;
6060import { tableIcons } from 'utils/materialIcons' ;
6161import useDataApiWithFeedback from 'utils/useDataApiWithFeedback' ;
62+ import { getPreferredName } from 'utils/user' ;
6263import withConfirm , { WithConfirmType } from 'utils/withConfirm' ;
6364
6465import ProposalScientistComment from './ProposalScientistComment' ;
@@ -285,11 +286,7 @@ const TechniqueProposalTable = ({ confirm }: { confirm: WithConfirmType }) => {
285286 sorting : false ,
286287 render : ( proposalView : ProposalViewData ) => {
287288 if ( proposalView . principalInvestigator ?. lastname ) {
288- if ( proposalView . principalInvestigator ?. preferredname ) {
289- return `${ proposalView . principalInvestigator . lastname } , ${ proposalView . principalInvestigator . preferredname } ` ;
290- } else if ( proposalView . principalInvestigator ?. firstname ) {
291- return `${ proposalView . principalInvestigator . lastname } , ${ proposalView . principalInvestigator . firstname } ` ;
292- }
289+ return `${ proposalView . principalInvestigator . lastname } , ${ getPreferredName ( proposalView . principalInvestigator ) } ` ;
293290 }
294291
295292 return '' ;
You can’t perform that action at this time.
0 commit comments