X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/8365beee952d63f7ae1d6e94063f36ddc8a98be0..99baf25913557ccaa4503dd7a7891f33e009e4ac:/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 9b96f848..02719f59 100644
--- a/src/components/details-panel-factory/items/project-item.tsx
+++ b/src/components/details-panel-factory/items/project-item.tsx
@@ -3,33 +3,34 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import * as React from 'react';
-import { DetailsPanelResource } from "./../details-panel-factory";
-import IconBase, { IconTypes } from '../../icon/icon';
+import { IconTypes } from '../../icon/icon';
 import Attribute from '../../attribute/attribute';
-import { AbstractItem } from './abstract-item';
+import AbstractItem from './abstract-item';
+import { ProjectResource } from '../../../models/project';
+import { formatDate } from '../../../common/formatters';
 
-export default class ProjectItem extends AbstractItem {
+export default class ProjectItem extends AbstractItem<ProjectResource> {
 
-    constructor(item: DetailsPanelResource) {
+    constructor(item: ProjectResource) {
         super(item);
+        console.log('item: ', this.item);
     }
 
     getIcon(): IconTypes {
-        return IconTypes.PROJECT;
+        return IconTypes.FOLDER;
     }
 
     buildDetails(): React.ReactElement<any> {
         return <div>
-            <Attribute label='Type' value='Project' />
+            <Attribute label='Type' value={this.item.groupClass} />
+            {/* 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
