Merge branch 'main' into 21357-favorites-names
[arvados.git] / services / workbench2 / src / views-components / context-menu / action-sets / group-member-action-set.ts
index 37aa35c0fd26b0ba2f71520d9c19901a263e294b..ad1ce97c2dcb8ba3ee238d7ee10b1a39809f81e7 100644 (file)
@@ -2,27 +2,33 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { ContextMenuActionSet } from "views-components/context-menu/context-menu-action-set";
-import { AdvancedIcon, RemoveIcon, AttributesIcon } from "components/icon/icon";
-import { openAdvancedTabDialog } from "store/advanced-tab/advanced-tab";
+import { ContextMenuActionSet } from 'views-components/context-menu/context-menu-action-set';
+import { AdvancedIcon, RemoveIcon, AttributesIcon } from 'components/icon/icon';
+import { openAdvancedTabDialog } from 'store/advanced-tab/advanced-tab';
 import { openGroupMemberAttributes, openRemoveGroupMemberDialog } from 'store/group-details-panel/group-details-panel-actions';
 
-export const groupMemberActionSet: ContextMenuActionSet = [[{
-    name: "Attributes",
-    icon: AttributesIcon,
-    execute: (dispatch, { uuid }) => {
-        dispatch<any>(openGroupMemberAttributes(uuid));
-    }
-}, {
-    name: "API Details",
-    icon: AdvancedIcon,
-    execute: (dispatch, resource) => {
-        dispatch<any>(openAdvancedTabDialog(resource.uuid));
-    }
-}, {
-    name: "Remove",
-    icon: RemoveIcon,
-    execute: (dispatch, { uuid }) => {
-        dispatch<any>(openRemoveGroupMemberDialog(uuid));
-    }
-}]];
+export const groupMemberActionSet: ContextMenuActionSet = [
+    [
+        {
+            name: 'Attributes',
+            icon: AttributesIcon,
+            execute: (dispatch, resources) => {
+                 dispatch<any>(openGroupMemberAttributes(resources[0].uuid));
+            },
+        },
+        {
+            name: 'API Details',
+            icon: AdvancedIcon,
+            execute: (dispatch, resources) => {
+                 dispatch<any>(openAdvancedTabDialog(resources[0].uuid));
+            },
+        },
+        {
+            name: 'Remove',
+            icon: RemoveIcon,
+            execute: (dispatch, resources) => {
+                 dispatch<any>(openRemoveGroupMemberDialog(resources[0].uuid));
+            },
+        },
+    ],
+];