X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/18ff30c75321f3be6a9e02529af2b5e1f1a3ddb0..c6ef6cc481dc56270d8ad80d387115eace618525:/src/views-components/context-menu/action-sets/project-action-set.ts diff --git a/src/views-components/context-menu/action-sets/project-action-set.ts b/src/views-components/context-menu/action-sets/project-action-set.ts index efcc429c..89446850 100644 --- a/src/views-components/context-menu/action-sets/project-action-set.ts +++ b/src/views-components/context-menu/action-sets/project-action-set.ts @@ -2,25 +2,28 @@ // // SPDX-License-Identifier: AGPL-3.0 +import { reset } from "redux-form"; + import { ContextMenuActionSet } from "../context-menu-action-set"; -import { projectActions } from "../../../store/project/project-action"; -import { NewProjectIcon } from "../../../components/icon/icon"; -import { ToggleFavoriteAction } from "./favorite-action"; -import { toggleFavorite } from "../../../store/favorites/favorites-actions"; -import { dataExplorerActions } from "../../../store/data-explorer/data-explorer-action"; -import { FAVORITE_PANEL_ID } from "../../../views/favorite-panel/favorite-panel"; +import { projectActions } from "~/store/project/project-action"; +import { NewProjectIcon } from "~/components/icon/icon"; +import { ToggleFavoriteAction } from "../actions/favorite-action"; +import { toggleFavorite } from "~/store/favorites/favorites-actions"; +import { favoritePanelActions } from "~/store/favorite-panel/favorite-panel-action"; +import { PROJECT_CREATE_DIALOG } from "../../dialog-create/dialog-project-create"; export const projectActionSet: ContextMenuActionSet = [[{ icon: NewProjectIcon, name: "New project", execute: (dispatch, resource) => { + dispatch(reset(PROJECT_CREATE_DIALOG)); dispatch(projectActions.OPEN_PROJECT_CREATOR({ ownerUuid: resource.uuid })); } }, { component: ToggleFavoriteAction, execute: (dispatch, resource) => { dispatch(toggleFavorite(resource)).then(() => { - dispatch(dataExplorerActions.REQUEST_ITEMS({ id : FAVORITE_PANEL_ID })); + dispatch(favoritePanelActions.REQUEST_ITEMS()); }); } }]];