-const renderName = (item: FavoritePanelItem) =>
- <Grid container alignItems="center" wrap="nowrap" spacing={16}>
- <Grid item>
- {renderIcon(item)}
- </Grid>
- <Grid item>
- <Typography color="primary">
- {item.name}
- </Typography>
- </Grid>
- <Grid item>
- <Typography variant="caption">
- <FavoriteStar resourceUuid={item.uuid} />
- </Typography>
- </Grid>
- </Grid>;
-
-
-const renderIcon = (item: FavoritePanelItem) => {
- switch (item.kind) {
- case ResourceKind.Project:
- return <ProjectIcon />;
- case ResourceKind.Collection:
- return <CollectionIcon />;
- case ResourceKind.Process:
- return <ProcessIcon />;
- default:
- return <DefaultIcon />;
- }
-};
-
-const renderDate = (date: string) => {
- return <Typography noWrap>{formatDate(date)}</Typography>;
-};
-
-const renderFileSize = (fileSize?: number) =>
- <Typography noWrap>
- {formatFileSize(fileSize)}
- </Typography>;
-
-const renderOwner = (owner: string) =>
- <Typography noWrap color="primary" >
- {owner}
- </Typography>;
-
-const renderType = (type: string) =>
- <Typography noWrap>
- {resourceLabel(type)}
- </Typography>;
-
-const renderStatus = (item: FavoritePanelItem) =>
- <Typography noWrap align="center" >
- {item.status || "-"}
- </Typography>;
-