X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/876e5e2f31a218255845977489ea70aacc0211cd..fca732a280e0e078a026ef8326eb5ad65f9864c6:/src/views-components/context-menu/action-sets/root-project-action-set.ts?ds=sidebyside 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..386c5162 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)); } } ]];