Replace project-panel with project-explorer
[arvados-workbench2.git] / src / views-components / project-explorer / project-explorer-item.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { TreeItem } from "../../components/tree/tree";
6 import { Project } from "../../models/project";
7
8 export interface ProjectExplorerItem {
9     uuid: string;
10     name: string;
11     type: string;
12     owner: string;
13     lastModified: string;
14     fileSize?: number;
15     status?: string;
16 }
17
18 export const mapProjectTreeItem = (item: TreeItem<Project>): ProjectExplorerItem => ({
19     name: item.data.name,
20     type: item.data.kind,
21     owner: item.data.ownerUuid,
22     lastModified: item.data.modifiedAt,
23     uuid: item.data.uuid
24 });