export const ResourceUUID = connect(
(state: RootState, props: { uuid: string }) => {
const resource = getResource<CollectionResource>(props.uuid)(state.resources);
+ console.log('COLLECTION_RESOIRCE', resource)
return { uuid: resource ? resource.uuid : '' };
})((props: { uuid: string }) => renderUuid({uuid: props.uuid}));
return <Typography title={description}>{truncatedDescription}</Typography>;
}
+const renderFileCount = (fileCount: number) =>{
+ return <Typography>{fileCount ?? '-'}</Typography>
+}
+
+export const ResourceFileCount = connect(
+ (state: RootState, props: { uuid: string }) => {
+ const resource = getResource<CollectionResource>(props.uuid)(state.resources);
+ 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);
import { ResourceKind, Resource } from 'models/resource';
import {
ResourceFileSize,
+ ResourceFileCount,
ResourceCreatedAtDate,
ResourceLastModifiedDate,
ResourceTrashDate,
TYPE = "Type",
OWNER = "Owner",
FILE_SIZE = "File size",
+ FILE_COUNT = "File count",
UUID = "UUID",
CREATED_AT = "Date created",
LAST_MODIFIED = "Last modified",
filters: createTree(),
render: uuid => <ResourceFileSize uuid={uuid} />
},
+ {
+ name: ProjectPanelColumnNames.FILE_COUNT,
+ selected: true,
+ configurable: true,
+ filters: createTree(),
+ render: uuid =><ResourceFileCount uuid={uuid}/>
+ },
{
name: ProjectPanelColumnNames.UUID,
selected: true,
filters: createTree(),
render: uuid =><ResourceVersion uuid={uuid}/>
}
+
];
export const PROJECT_PANEL_ID = "projectPanel";