Restric order and filters arguments of favorite list
[arvados-workbench2.git] / src / components / details-panel-factory / items / project-item.tsx
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import * as React from 'react';
6 import { ProjectIcon } from '../../icon/icon';
7 import Attribute from '../../attribute/attribute';
8 import AbstractItem from './abstract-item';
9 import { ProjectResource } from '../../../models/project';
10 import { formatDate } from '../../../common/formatters';
11 import { ResourceKind } from '../../../models/resource';
12 import { resourceLabel } from '../../../common/labels';
13
14 export default class ProjectItem extends AbstractItem<ProjectResource> {
15
16     getIcon(className?: string) {
17         return <ProjectIcon className={className} />;
18     }
19
20     buildDetails() {
21         return <div>
22             <Attribute label='Type' value={resourceLabel(ResourceKind.Project)} />
23             {/* Missing attr */}
24             <Attribute label='Size' value='---' />
25             <Attribute label='Owner' value={this.item.ownerUuid} />
26             <Attribute label='Last modified' value={formatDate(this.item.modifiedAt)} />
27             <Attribute label='Created at' value={formatDate(this.item.createdAt)} />
28             {/* Missing attr */}
29             <Attribute label='File size' value='1.4 GB' />
30             <Attribute label='Description' value={this.item.description} />
31         </div>;
32     }
33 }