X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/98d4fa453583e340187988f024c9a65cb47e332d..180c2c37b635cbb7a33257d2ee9b4395553ce5e7:/src/components/details-panel-factory/items/project-item.tsx

diff --git a/src/components/details-panel-factory/items/project-item.tsx b/src/components/details-panel-factory/items/project-item.tsx
index 10402ed5ff..702aa17b2f 100644
--- a/src/components/details-panel-factory/items/project-item.tsx
+++ b/src/components/details-panel-factory/items/project-item.tsx
@@ -3,33 +3,31 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import * as React from 'react';
-import IconBase, { IconTypes } from '../../icon/icon';
-import Attribute from '../../attribute/attribute';
-import AbstractItem from './abstract-item';
+import { ProjectIcon } from '../../icon/icon';
+import { Attribute } from '../../attribute/attribute';
+import { AbstractItem } from './abstract-item';
 import { ProjectResource } from '../../../models/project';
+import { formatDate } from '../../../common/formatters';
+import { ResourceKind } from '../../../models/resource';
+import { resourceLabel } from '../../../common/labels';
 
-export default class ProjectItem extends AbstractItem {
+export class ProjectItem extends AbstractItem<ProjectResource> {
 
-    constructor(item: ProjectResource) {
-        super(item);
+    getIcon(className?: string) {
+        return <ProjectIcon className={className} />;
     }
 
-    getIcon(): IconTypes {
-        return IconTypes.PROJECT;
-    }
-
-    buildDetails(): React.ReactElement<any> {
+    buildDetails() {
         return <div>
-            <Attribute label='Type' value='Project' />
+            <Attribute label='Type' value={resourceLabel(ResourceKind.Project)} />
+            {/* Missing attr */}
             <Attribute label='Size' value='---' />
-            <Attribute label="Location">
-                <IconBase icon={IconTypes.FOLDER} />
-                Projects
-                </Attribute>
-            <Attribute label='Owner' value='me' />
-            <Attribute label='Last modified' value='5:25 PM 5/23/2018' />
-            <Attribute label='Created at' value='1:25 PM 5/23/2018' />
+            <Attribute label='Owner' value={this.item.ownerUuid} />
+            <Attribute label='Last modified' value={formatDate(this.item.modifiedAt)} />
+            <Attribute label='Created at' value={formatDate(this.item.createdAt)} />
+            {/* Missing attr */}
             <Attribute label='File size' value='1.4 GB' />
+            <Attribute label='Description' value={this.item.description} />
         </div>;
     }
-}
\ No newline at end of file
+}
