Implement resource moving
[arvados-workbench2.git] / src / views-components / context-menu / action-sets / collection-resource-action-set.ts
index fd2f8d752579cd12ca33c09bc9462290e89f3d25..24c1bf15a8e5d06bf743149403678bd9caa204a1 100644 (file)
@@ -9,6 +9,7 @@ import { RenameIcon, ShareIcon, MoveToIcon, CopyIcon, DetailsIcon, RemoveIcon }
 import { openUpdater } from "~/store/collections/updater/collection-updater-action";
 import { favoritePanelActions } from "~/store/favorite-panel/favorite-panel-action";
 import { openMoveToDialog } from "../../move-to-dialog/move-to-dialog";
+import { ResourceKind } from '~/models/resource';
 
 export const collectionResourceActionSet: ContextMenuActionSet = [[
     {
@@ -28,9 +29,11 @@ export const collectionResourceActionSet: ContextMenuActionSet = [[
     {
         icon: MoveToIcon,
         name: "Move to",
-        execute: (dispatch) => {
-            dispatch<any>(openMoveToDialog());
-        }
+        execute: (dispatch, resource) => dispatch<any>(openMoveToDialog({
+            name: resource.name,
+            uuid: resource.uuid,
+            kind: ResourceKind.COLLECTION
+        }))
     },
     {
         component: ToggleFavoriteAction,