mirror of
https://github.com/strapi/strapi.git
synced 2025-11-03 11:25:17 +00:00
feature(content-manager): display full user names in list view
This commit is contained in:
parent
dfe799a9ae
commit
d0e299595a
@ -15,6 +15,7 @@ import {
|
||||
useFetchClient,
|
||||
useAPIErrorHandler,
|
||||
useQueryParams,
|
||||
getDisplayName,
|
||||
} from '@strapi/helper-plugin';
|
||||
import { Trash, Duplicate, Pencil } from '@strapi/icons';
|
||||
import { AxiosError } from 'axios';
|
||||
@ -197,6 +198,17 @@ export const TableRows = ({
|
||||
return <Td key={key}>{cellFormatter(data, { key, name, ...rest })}</Td>;
|
||||
}
|
||||
|
||||
if (['createdBy', 'updatedBy'].includes(name.split('.')[0])) {
|
||||
// Display the users full name
|
||||
return (
|
||||
<Td key={key}>
|
||||
<Typography textColor="neutral800">
|
||||
{getDisplayName(data[name.split('.')[0]], formatMessage)}
|
||||
</Typography>
|
||||
</Td>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<Td key={key}>
|
||||
<CellContent
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user