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 { TogglePublicFavoriteAction } from "views-components/context-menu/actions/public-favorite-action";
7 import { togglePublicFavorite } from "store/public-favorites/public-favorites-actions";
8 import { publicFavoritePanelActions } from "store/public-favorites-panel/public-favorites-action";
10 import { projectActionSet, filterGroupActionSet } from "views-components/context-menu/action-sets/project-action-set";
12 export const projectAdminActionSet: ContextMenuActionSet = [[
13 ...projectActionSet.reduce((prev, next) => prev.concat(next), []),
15 component: TogglePublicFavoriteAction,
16 name: 'TogglePublicFavoriteAction',
17 execute: (dispatch, resource) => {
18 dispatch<any>(togglePublicFavorite(resource)).then(() => {
19 dispatch<any>(publicFavoritePanelActions.REQUEST_ITEMS());
25 export const filterGroupAdminActionSet: ContextMenuActionSet = [[
26 ...filterGroupActionSet.reduce((prev, next) => prev.concat(next), []),
28 component: TogglePublicFavoriteAction,
29 name: 'TogglePublicFavoriteAction',
30 execute: (dispatch, resource) => {
31 dispatch<any>(togglePublicFavorite(resource)).then(() => {
32 dispatch<any>(publicFavoritePanelActions.REQUEST_ITEMS());