X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/37e43f4e19ad2bd27b15fe7f0d857218dad39055..c88bb4d5e97a168a4f2209112bdac97577eb35f9:/src/views-components/context-menu/action-sets/root-project-action-set.ts diff --git a/src/views-components/context-menu/action-sets/root-project-action-set.ts b/src/views-components/context-menu/action-sets/root-project-action-set.ts index fb380fc4..9cf5bf03 100644 --- a/src/views-components/context-menu/action-sets/root-project-action-set.ts +++ b/src/views-components/context-menu/action-sets/root-project-action-set.ts @@ -2,31 +2,24 @@ // // 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 { collectionCreateActions } from "../../../store/collections/creator/collection-creator-action"; -import { PROJECT_CREATE_DIALOG } from "../../dialog-create/dialog-project-create"; -import { COLLECTION_CREATE_DIALOG } from "../../dialog-create/dialog-collection-create"; -import { NewProjectIcon, CollectionIcon } from "../../../components/icon/icon"; +import { openCollectionCreateDialog } from 'store/collections/collection-create-actions'; +import { NewProjectIcon, CollectionIcon } from "components/icon/icon"; +import { openProjectCreateDialog } from 'store/projects/project-create-actions'; export const rootProjectActionSet: ContextMenuActionSet = [[ { icon: NewProjectIcon, name: "New project", execute: (dispatch, resource) => { - dispatch(reset(PROJECT_CREATE_DIALOG)); - dispatch(projectActions.OPEN_PROJECT_CREATOR({ ownerUuid: resource.uuid })); + dispatch(openProjectCreateDialog(resource.uuid)); } - }, + }, { icon: CollectionIcon, name: "New Collection", execute: (dispatch, resource) => { - dispatch(reset(COLLECTION_CREATE_DIALOG)); - dispatch(collectionCreateActions.OPEN_COLLECTION_CREATOR({ ownerUuid: resource.uuid })); + dispatch(openCollectionCreateDialog(resource.uuid)); } } ]];