1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { ContextMenuActionSet } from "../context-menu-action-set";
6 import { NewProjectIcon, RenameIcon, CopyIcon, MoveToIcon } from "~/components/icon/icon";
7 import { ToggleFavoriteAction } from "../actions/favorite-action";
8 import { toggleFavorite } from "~/store/favorites/favorites-actions";
9 import { favoritePanelActions } from "~/store/favorite-panel/favorite-panel-action";
10 import { openMoveProjectDialog } from '~/store/projects/project-move-actions';
11 import { openProjectCreateDialog } from '~/store/projects/project-create-actions';
12 import { openProjectUpdateDialog } from '~/store/projects/project-update-actions';
13 import { ToggleTrashAction } from "~/views-components/context-menu/actions/trash-action";
14 import { toggleProjectTrashed } from "~/store/trash/trash-actions";
16 export const projectActionSet: ContextMenuActionSet = [[
20 execute: (dispatch, resource) => {
21 dispatch<any>(openProjectCreateDialog(resource.uuid));
27 execute: (dispatch, resource) => {
28 dispatch<any>(openProjectUpdateDialog(resource));
32 component: ToggleFavoriteAction,
33 execute: (dispatch, resource) => {
34 dispatch<any>(toggleFavorite(resource)).then(() => {
35 dispatch<any>(favoritePanelActions.REQUEST_ITEMS());
40 component: ToggleTrashAction,
41 execute: (dispatch, resource) => {
42 dispatch<any>(toggleProjectTrashed(resource.uuid, resource.ownerUuid, resource.isTrashed!!));
48 execute: (dispatch, resource) => dispatch<any>(openMoveProjectDialog(resource))
52 name: "Copy to project",
53 execute: (dispatch, resource) => {