18692: Initial frozen project implementation with tests
[arvados.git] / src / views-components / context-menu / action-sets / trashed-collection-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 { DetailsIcon, ProvenanceGraphIcon, AdvancedIcon, RestoreFromTrashIcon } from 'components/icon/icon';
7 import { toggleCollectionTrashed } from "store/trash/trash-actions";
8 import { openAdvancedTabDialog } from "store/advanced-tab/advanced-tab";
9 import { toggleDetailsPanel } from 'store/details-panel/details-panel-action';
10
11 export const trashedCollectionActionSet: ContextMenuActionSet = [[
12     {
13         icon: DetailsIcon,
14         name: "View details",
15         execute: dispatch => {
16             dispatch<any>(toggleDetailsPanel());
17         }
18     },
19     {
20         icon: ProvenanceGraphIcon,
21         name: "Provenance graph",
22         execute: (dispatch, resource) => {
23             // add code
24         }
25     },
26     {
27         icon: AdvancedIcon,
28         name: "Advanced",
29         execute: (dispatch, resource) => {
30             dispatch<any>(openAdvancedTabDialog(resource.uuid));
31         }
32     },
33     {
34         icon: RestoreFromTrashIcon,
35         name: "Restore",
36         execute: (dispatch, resource) => {
37             dispatch<any>(toggleCollectionTrashed(resource.uuid, true));
38         }
39     },
40 ]];