Merge branch 'master' into 13969-advanced-tab
[arvados-workbench2.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 { detailsPanelActions } from "~/store/details-panel/details-panel-action";
9 import { openAdvancedTabDialog } from "~/store/advanced-tab/advanced-tab";
10
11 export const trashedCollectionActionSet: ContextMenuActionSet = [[
12     {
13         icon: DetailsIcon,
14         name: "View details",
15         execute: dispatch => dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL())
16     },
17     {
18         icon: ProvenanceGraphIcon,
19         name: "Provenance graph",
20         execute: (dispatch, resource) => {
21             // add code
22         }
23     },
24     {
25         icon: AdvancedIcon,
26         name: "Advanced",
27         execute: (dispatch, resource) => dispatch<any>(openAdvancedTabDialog(resource.uuid))
28     },
29     {
30         icon: RestoreFromTrashIcon,
31         name: "Restore",
32         execute: (dispatch, resource) => dispatch<any>(toggleCollectionTrashed(resource.uuid, true))
33     },
34 ]];