Skip to content

Commit

Permalink
fix: ajout des pseudo partout dans l'interface web (#1827)
Browse files Browse the repository at this point in the history
  • Loading branch information
rap2hpoutre authored Jan 15, 2024
1 parent 933ac50 commit a5d0464
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 3 additions & 4 deletions dashboard/src/components/SelectPerson.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import { useHistory } from 'react-router-dom';
import { Label } from 'reactstrap';
import { useRecoilValue } from 'recoil';
Expand Down Expand Up @@ -38,13 +37,13 @@ const SelectPerson = ({
defaultValue != null && isMulti ? persons.filter((i) => defaultValue?.includes(i._id)) : persons.find((i) => i._id === defaultValue)
}
getOptionValue={(i) => i._id}
getOptionLabel={(i) => i?.name || ''}
getOptionLabel={(i) => i?.name}
formatOptionLabel={(i, options) => {
if (options.context === 'menu') return i?.name || '';
return (
<div style={{ display: 'flex', alignItems: 'center' }}>
{i?.name}
{!disableAccessToPerson && (
{Boolean(i?.otherNames) && <span style={{ marginLeft: '0.5rem', fontSize: '0.8rem', opacity: 0.5 }}>{i?.otherNames}</span>}
{!disableAccessToPerson && options.context !== 'menu' && (
<ButtonCustom
onClick={(e) => {
e.preventDefault();
Expand Down
1 change: 1 addition & 0 deletions dashboard/src/scenes/report/view-old.js
Original file line number Diff line number Diff line change
Expand Up @@ -1849,6 +1849,7 @@ const PersonCreatedAt = ({ date, persons, setSortBy, setSortOrder, sortBy, sortO
onSortBy: setSortBy,
sortOrder,
sortBy,
render: (p) => <PersonName showOtherNames item={{ person: p._id }} />,
},
{
title: 'Utilisateur (créateur)',
Expand Down

0 comments on commit a5d0464

Please sign in to comment.