f2c9b92fc05dcb9fcb1a3e590ec0cd9dccddcc44
[arvados-workbench2.git] / src / views-components / context-menu / action-sets / group-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 "views-components/context-menu/context-menu-action-set";
6 import { RenameIcon, AdvancedIcon, RemoveIcon, AttributesIcon } from "components/icon/icon";
7 import { openAdvancedTabDialog } from "store/advanced-tab/advanced-tab";
8 import { openGroupAttributes, openRemoveGroupDialog } from "store/groups-panel/groups-panel-actions";
9 import { openProjectUpdateDialog } from "store/projects/project-update-actions";
10
11 export const groupActionSet: ContextMenuActionSet = [[{
12     name: "Rename",
13     icon: RenameIcon,
14     execute: (dispatch, resource) => {
15         dispatch<any>(openProjectUpdateDialog(resource));
16     }
17 }, {
18     name: "Attributes",
19     icon: AttributesIcon,
20     execute: (dispatch, { uuid }) => {
21         dispatch<any>(openGroupAttributes(uuid));
22     }
23 }, {
24     name: "Advanced",
25     icon: AdvancedIcon,
26     execute: (dispatch, resource) => {
27         dispatch<any>(openAdvancedTabDialog(resource.uuid));
28     }
29 }, {
30     name: "Remove",
31     icon: RemoveIcon,
32     execute: (dispatch, { uuid }) => {
33         dispatch<any>(openRemoveGroupDialog(uuid));
34     }
35 }]];