15768: merge cleanup Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox@curii.com>
[arvados.git] / src / views-components / context-menu / action-sets / root-project-action-set.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { ContextMenuActionSet } from '../context-menu-action-set';
6 import { openCollectionCreateDialog } from 'store/collections/collection-create-actions';
7 import { NewProjectIcon, CollectionIcon } from 'components/icon/icon';
8 import { openProjectCreateDialog } from 'store/projects/project-create-actions';
9
10 export const rootProjectActionSet: ContextMenuActionSet = [
11     [
12         {
13             icon: NewProjectIcon,
14             name: 'New project',
15             execute: (dispatch, resources) => {
16                 resources.forEach((resource) => dispatch<any>(openProjectCreateDialog(resource.uuid)));
17             },
18         },
19         {
20             icon: CollectionIcon,
21             name: 'New Collection',
22             execute: (dispatch, resources) => {
23                 resources.forEach((resource) => dispatch<any>(openCollectionCreateDialog(resource.uuid)));
24             },
25         },
26     ],
27 ];