mirror of
https://github.com/strapi/strapi.git
synced 2025-11-09 14:51:29 +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,
|
useFetchClient,
|
||||||
useAPIErrorHandler,
|
useAPIErrorHandler,
|
||||||
useQueryParams,
|
useQueryParams,
|
||||||
|
getDisplayName,
|
||||||
} from '@strapi/helper-plugin';
|
} from '@strapi/helper-plugin';
|
||||||
import { Trash, Duplicate, Pencil } from '@strapi/icons';
|
import { Trash, Duplicate, Pencil } from '@strapi/icons';
|
||||||
import { AxiosError } from 'axios';
|
import { AxiosError } from 'axios';
|
||||||
@ -197,6 +198,17 @@ export const TableRows = ({
|
|||||||
return <Td key={key}>{cellFormatter(data, { key, name, ...rest })}</Td>;
|
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 (
|
return (
|
||||||
<Td key={key}>
|
<Td key={key}>
|
||||||
<CellContent
|
<CellContent
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user