20031: Add collection partial move/copy to new/existing collection
[arvados-workbench2.git] / src / views-components / context-menu / action-sets / collection-files-action-set.ts
index 03cfdb9bb8f806e52fa42394f38fc23bb2b08dcc..3e6e1a201a9b48b528b911ae427b9a5511ef33cf 100644 (file)
@@ -2,9 +2,13 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { ContextMenuActionSet } from "~/views-components/context-menu/context-menu-action-set";
-import { collectionPanelFilesAction, openMultipleFilesRemoveDialog } from "~/store/collection-panel/collection-panel-files/collection-panel-files-actions";
-import { openCollectionPartialCopyDialog, openCollectionPartialCopyToSelectedCollectionDialog } from '~/store/collections/collection-partial-copy-actions';
+import { ContextMenuActionSet } from "views-components/context-menu/context-menu-action-set";
+import { collectionPanelFilesAction, openMultipleFilesRemoveDialog } from "store/collection-panel/collection-panel-files/collection-panel-files-actions";
+import {
+    openCollectionPartialCopyToNewCollectionDialog,
+    openCollectionPartialCopyToExistingCollectionDialog
+} from 'store/collections/collection-partial-copy-actions';
+import { openCollectionPartialMoveToExistingCollectionDialog, openCollectionPartialMoveToNewCollectionDialog } from "store/collections/collection-partial-move-actions";
 
 // These action sets are used on the multi-select actions button.
 export const readOnlyCollectionFilesActionSet: ContextMenuActionSet = [[
@@ -21,15 +25,15 @@ export const readOnlyCollectionFilesActionSet: ContextMenuActionSet = [[
         }
     },
     {
-        name: "Create a new collection with selected",
+        name: "Copy selected into new collection",
         execute: dispatch => {
-            dispatch<any>(openCollectionPartialCopyDialog());
+            dispatch<any>(openCollectionPartialCopyToNewCollectionDialog());
         }
     },
     {
-        name: "Copy selected into the collection",
+        name: "Copy selected into existing collection",
         execute: dispatch => {
-            dispatch<any>(openCollectionPartialCopyToSelectedCollectionDialog());
+            dispatch<any>(openCollectionPartialCopyToExistingCollectionDialog());
         }
     }
 ]];
@@ -41,4 +45,16 @@ export const collectionFilesActionSet: ContextMenuActionSet = readOnlyCollection
             dispatch(openMultipleFilesRemoveDialog());
         }
     },
+    {
+        name: "Move selected into new collection",
+        execute: dispatch => {
+            dispatch<any>(openCollectionPartialMoveToNewCollectionDialog());
+        }
+    },
+    {
+        name: "Move selected into existing collection",
+        execute: dispatch => {
+            dispatch<any>(openCollectionPartialMoveToExistingCollectionDialog());
+        }
+    }
 ]]);