Add context menu sharing handlers
authorMichal Klobukowski <michal.klobukowski@contractors.roche.com>
Tue, 30 Oct 2018 13:51:45 +0000 (14:51 +0100)
committerMichal Klobukowski <michal.klobukowski@contractors.roche.com>
Tue, 30 Oct 2018 13:51:45 +0000 (14:51 +0100)
Feature #14365

Arvados-DCO-1.1-Signed-off-by: Michal Klobukowski <michal.klobukowski@contractors.roche.com>

src/views-components/context-menu/action-sets/collection-resource-action-set.ts
src/views-components/context-menu/action-sets/process-action-set.ts
src/views-components/context-menu/action-sets/process-resource-action-set.ts

index 8665bc1b6b858a29f3e23ced0ba316b35298b5c4..99bd1567cd74cf207c3f1e8aa2389fafac246b4c 100644 (file)
@@ -13,6 +13,7 @@ import { openMoveCollectionDialog } from '~/store/collections/collection-move-ac
 import { openCollectionCopyDialog } from '~/store/collections/collection-copy-actions';
 import { toggleCollectionTrashed } from "~/store/trash/trash-actions";
 import { detailsPanelActions } from '~/store/details-panel/details-panel-action';
+import { openSharingDialog } from "~/store/sharing-dialog/sharing-dialog-actions";
 
 export const collectionResourceActionSet: ContextMenuActionSet = [[
     {
@@ -25,8 +26,8 @@ export const collectionResourceActionSet: ContextMenuActionSet = [[
     {
         icon: ShareIcon,
         name: "Share",
-        execute: (dispatch, resource) => {
-            // add code
+        execute: (dispatch, { uuid }) => {
+            dispatch<any>(openSharingDialog(uuid));
         }
     },
     {
index 32488731862843e5f5645801ee65ba6f012b9d6d..edb444104de2f7c7a572381c3ecdb67e51ee1e33 100644 (file)
@@ -16,6 +16,7 @@ import { openProcessUpdateDialog } from "~/store/processes/process-update-action
 import { openCopyProcessDialog } from '~/store/processes/process-copy-actions';
 import { openProcessCommandDialog } from '../../../store/processes/process-command-actions';
 import { detailsPanelActions } from '~/store/details-panel/details-panel-action';
+import { openSharingDialog } from "~/store/sharing-dialog/sharing-dialog-actions";
 
 export const processActionSet: ContextMenuActionSet = [[
     {
@@ -26,8 +27,8 @@ export const processActionSet: ContextMenuActionSet = [[
     {
         icon: ShareIcon,
         name: "Share",
-        execute: (dispatch, resource) => {
-            // add code
+        execute: (dispatch, { uuid }) => {
+            dispatch<any>(openSharingDialog(uuid));
         }
     },
     {
index a446dc861f10300117dea5e130d7910da92b45d8..a433ff8ddce085b473fcc6d154963e7087f594cd 100644 (file)
@@ -11,6 +11,7 @@ import { openMoveProcessDialog } from '~/store/processes/process-move-actions';
 import { openProcessUpdateDialog } from "~/store/processes/process-update-actions";
 import { openCopyProcessDialog } from '~/store/processes/process-copy-actions';
 import { detailsPanelActions } from '~/store/details-panel/details-panel-action';
+import { openSharingDialog } from "~/store/sharing-dialog/sharing-dialog-actions";
 
 export const processResourceActionSet: ContextMenuActionSet = [[
     {
@@ -21,8 +22,8 @@ export const processResourceActionSet: ContextMenuActionSet = [[
     {
         icon: ShareIcon,
         name: "Share",
-        execute: (dispatch, resource) => {
-            // add code
+        execute: (dispatch, { uuid }) => {
+            dispatch<any>(openSharingDialog(uuid));
         }
     },
     {