Merge branch 'master' into 13979-creating-project-name-of-previously-created-project...
[arvados-workbench2.git] / src / views-components / context-menu / action-sets / root-project-action-set.ts
index 53642d03fbab75425fb360363feea3eaab5e8397..8c57f47fa35af3c144bb2917f02db86e28bc62bd 100644 (file)
@@ -2,14 +2,18 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
+import { reset } from "redux-form";
+
 import { ContextMenuActionSet } from "../context-menu-action-set";
-import actions from "../../../store/project/project-action";
-import { IconTypes } from "../../../components/icon/icon";
+import { projectActions } from "../../../store/project/project-action";
+import { NewProjectIcon } from "../../../components/icon/icon";
+import { PROJECT_CREATE_DIALOG } from "../../dialog-create/dialog-project-create";
 
 export const rootProjectActionSet: ContextMenuActionSet =  [[{
-    icon: IconTypes.FOLDER,
+    icon: NewProjectIcon,
     name: "New project",
     execute: (dispatch, resource) => {
-        dispatch(actions.OPEN_PROJECT_CREATOR({ ownerUuid: resource.uuid }));
+        dispatch(reset(PROJECT_CREATE_DIALOG));
+        dispatch(projectActions.OPEN_PROJECT_CREATOR({ ownerUuid: resource.uuid }));
     }
-}]];
\ No newline at end of file
+}]];