return { version: resource ? resource.version: '' };
})((props: { version: number }) => renderVersion(props.version));
-const renderDescription = (description: string)=>{
- const truncatedDescription = description ? description.slice(0, 18) + '...' : '-'
- return <Typography title={description}>{truncatedDescription}</Typography>;
-}
-
const renderFileCount = (fileCount: number) =>{
return <Typography>{fileCount ?? '-'}</Typography>
}
return { fileCount: resource ? resource.fileCount: '' };
})((props: { fileCount: number }) => renderFileCount(props.fileCount));
-export const ResourceDescription = connect(
- (state: RootState, props: { uuid: string }) => {
- const resource = getResource<GroupContentsResource>(props.uuid)(state.resources);
- return { description: resource ? resource.description : '' };
- })((props: { description: string }) => renderDescription(props.description));
-
const userFromID =
connect(
(state: RootState, props: { uuid: string }) => {
ResourceType,
ResourceOwnerWithName,
ResourceVersion,
- ResourceDescription,
ResourceFileSize,
ResourceFileCount,
ResourceUUID,
TYPE = "Type",
OWNER = "Owner",
VERSION = "Version",
- DESCRIPTION = "Description",
FILE_SIZE = "File size",
FILE_COUNT = "File count",
UUID = "UUID",
filters: createTree(),
render: uuid =><ResourceVersion uuid={uuid}/>
},
- {
- name: ProjectPanelColumnNames.DESCRIPTION,
- selected: false,
- configurable: true,
- filters: createTree(),
- render: uuid =><ResourceDescription uuid={uuid}/>
- },
{
name: ProjectPanelColumnNames.FILE_SIZE,
selected: true,