Merge branch 'master' into 13969-advanced-tab
[arvados-workbench2.git] / src / views-components / context-menu / action-sets / collection-resource-action-set.ts
index f1df0c08a84a8ad2531b374b927823a6cca289cc..565a7d090c930cbc2ea93f678c3e58a730927cbe 100644 (file)
@@ -12,6 +12,7 @@ import { favoritePanelActions } from "~/store/favorite-panel/favorite-panel-acti
 import { openMoveCollectionDialog } from '~/store/collections/collection-move-actions';
 import { openCollectionCopyDialog } from '~/store/collections/collection-copy-actions';
 import { toggleCollectionTrashed } from "~/store/trash/trash-actions";
+import { detailsPanelActions } from '~/store/details-panel/details-panel-action';
 
 export const collectionResourceActionSet: ContextMenuActionSet = [[
     {
@@ -31,7 +32,9 @@ export const collectionResourceActionSet: ContextMenuActionSet = [[
     {
         icon: MoveToIcon,
         name: "Move to",
-        execute: (dispatch, resource) => dispatch<any>(openMoveCollectionDialog(resource))
+        execute: (dispatch, resource) => {
+            dispatch<any>(openMoveCollectionDialog(resource));
+        }
     },
     {
         component: ToggleFavoriteAction,
@@ -44,7 +47,7 @@ export const collectionResourceActionSet: ContextMenuActionSet = [[
     {
         component: ToggleTrashAction,
         execute: (dispatch, resource) => {
-            dispatch<any>(toggleCollectionTrashed(resource));
+            dispatch<any>(toggleCollectionTrashed(resource.uuid, resource.isTrashed!!));
         }
     },
     {
@@ -52,13 +55,13 @@ export const collectionResourceActionSet: ContextMenuActionSet = [[
         name: "Copy to project",
         execute: (dispatch, resource) => {
             dispatch<any>(openCollectionCopyDialog(resource));
-        },
+        }
     },
     {
         icon: DetailsIcon,
         name: "View details",
-        execute: (dispatch, resource) => {
-            // add code
+        execute: dispatch => {
+            dispatch(detailsPanelActions.TOGGLE_DETAILS_PANEL());
         }
     },
     {