Implement resource moving
[arvados-workbench2.git] / src / views-components / context-menu / action-sets / collection-resource-action-set.ts
index 7d8364bd70ea22b4c29bb69c5c11b95699f6765b..24c1bf15a8e5d06bf743149403678bd9caa204a1 100644 (file)
@@ -8,6 +8,8 @@ import { toggleFavorite } from "~/store/favorites/favorites-actions";
 import { RenameIcon, ShareIcon, MoveToIcon, CopyIcon, DetailsIcon, RemoveIcon } from "~/components/icon/icon";
 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 = [[
     {
@@ -27,9 +29,11 @@ export const collectionResourceActionSet: ContextMenuActionSet = [[
     {
         icon: MoveToIcon,
         name: "Move to",
-        execute: (dispatch, resource) => {
-            // add code
-        }
+        execute: (dispatch, resource) => dispatch<any>(openMoveToDialog({
+            name: resource.name,
+            uuid: resource.uuid,
+            kind: ResourceKind.COLLECTION
+        }))
     },
     {
         component: ToggleFavoriteAction,