[arvados-workbench2] updated: 2.7.0-235-ge40e247c

git repository hosting git at public.arvados.org
Mon Dec 4 17:49:39 UTC 2023


Summary of changes:
 src/store/trash/trash-actions.ts                   |  2 +
 .../ms-collection-action-set.ts                    | 83 ++++++++++++++--------
 .../multiselect-toolbar/ms-menu-actions.ts         |  3 +-
 .../multiselect-toolbar/ms-project-action-set.ts   |  8 +--
 4 files changed, 61 insertions(+), 35 deletions(-)

       via  e40e247cfa09ed8e61642e3c0ade40881105e02e (commit)
      from  21cec41c5bbdb37260f5be2e69cc247f5766e3d4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit e40e247cfa09ed8e61642e3c0ade40881105e02e
Author: Lisa Knox <lisaknox83 at gmail.com>
Date:   Mon Dec 4 12:49:30 2023 -0500

    21128: basic collection actioons good Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>

diff --git a/src/store/trash/trash-actions.ts b/src/store/trash/trash-actions.ts
index 50ac31c8..d6f0d9a7 100644
--- a/src/store/trash/trash-actions.ts
+++ b/src/store/trash/trash-actions.ts
@@ -77,6 +77,8 @@ export const toggleCollectionTrashed =
         async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository): Promise<any> => {
             let errorMessage = "";
             let successMessage = "";
+            console.log('hi')
+            dispatch<any>(addDisabledButton(MultiSelectMenuActionNames.ADD_TO_TRASH))
             try {
                 if (isTrashed) {
                     const { location } = getState().router;
diff --git a/src/views-components/multiselect-toolbar/ms-collection-action-set.ts b/src/views-components/multiselect-toolbar/ms-collection-action-set.ts
index 3afe1556..d9ad017b 100644
--- a/src/views-components/multiselect-toolbar/ms-collection-action-set.ts
+++ b/src/views-components/multiselect-toolbar/ms-collection-action-set.ts
@@ -2,43 +2,66 @@
 //
 // SPDX-License-Identifier: AGPL-3.0
 
-import { MoveToIcon, CopyIcon } from "components/icon/icon";
+import { MoveToIcon, CopyIcon, RenameIcon } from "components/icon/icon";
 import { openMoveCollectionDialog } from "store/collections/collection-move-actions";
 import { openCollectionCopyDialog, openMultiCollectionCopyDialog } from "store/collections/collection-copy-actions";
 import { toggleCollectionTrashed } from "store/trash/trash-actions";
 import { ContextMenuResource } from "store/context-menu/context-menu-actions";
-import { MultiSelectMenuActionSet, MultiSelectMenuActionNames } from "./ms-menu-actions";
+import { msCommonActionSet, MultiSelectMenuActionSet, MultiSelectMenuActionNames, MultiSelectMenuAction } from "./ms-menu-actions";
 import { TrashIcon } from "components/icon/icon";
+import { openCollectionUpdateDialog } from "store/collections/collection-update-actions";
+
+const { MAKE_A_COPY, MOVE_TO, ADD_TO_TRASH, EDIT_COLLECTION } = MultiSelectMenuActionNames;
+
+const msCopyCollection: MultiSelectMenuAction = {
+    name: MultiSelectMenuActionNames.MAKE_A_COPY,
+    icon: CopyIcon,
+    hasAlts: false,
+    isForMulti: true,
+    execute: (dispatch, [...resources]) => {
+        if (resources[0].fromContextMenu || resources.length === 1) dispatch<any>(openCollectionCopyDialog(resources[0]));
+        else dispatch<any>(openMultiCollectionCopyDialog(resources[0]));
+    },
+}
+
+const msMoveCollection: MultiSelectMenuAction = {
+    name: MultiSelectMenuActionNames.MOVE_TO,
+    icon: MoveToIcon,
+    hasAlts: false,
+    isForMulti: true,
+    execute: (dispatch, resources) => dispatch<any>(openMoveCollectionDialog(resources[0])),
+}
+
+const msToggleTrashAction: MultiSelectMenuAction = {
+    name: MultiSelectMenuActionNames.ADD_TO_TRASH,
+    icon: TrashIcon,
+    isForMulti: true,
+    hasAlts: false,
+    execute: (dispatch, resources: ContextMenuResource[]) => {
+        for (const resource of [...resources]) {
+            dispatch<any>(toggleCollectionTrashed(resource.uuid, resource.isTrashed!!));
+        }
+    },
+}
+
+const msEditCollection: MultiSelectMenuAction = {
+    icon: RenameIcon,
+    hasAlts: false,
+    isForMulti: false,
+    name: "Edit collection",
+    execute: (dispatch, resources) => {
+        dispatch<any>(openCollectionUpdateDialog(resources[0]));
+    },
+}
 
 export const msCollectionActionSet: MultiSelectMenuActionSet = [
     [
-        {
-            name: MultiSelectMenuActionNames.MAKE_A_COPY,
-            icon: CopyIcon,
-            hasAlts: false,
-            isForMulti: true,
-            execute: (dispatch, [...resources]) => {
-                if (resources[0].fromContextMenu || resources.length === 1) dispatch<any>(openCollectionCopyDialog(resources[0]));
-                else dispatch<any>(openMultiCollectionCopyDialog(resources[0]));
-            },
-        },
-        {
-            name: MultiSelectMenuActionNames.MOVE_TO,
-            icon: MoveToIcon,
-            hasAlts: false,
-            isForMulti: true,
-            execute: (dispatch, resources) => dispatch<any>(openMoveCollectionDialog(resources[0])),
-        },
-        {
-            name: MultiSelectMenuActionNames.ADD_TO_TRASH,
-            icon: TrashIcon,
-            isForMulti: true,
-            hasAlts: false,
-            execute: (dispatch, resources: ContextMenuResource[]) => {
-                for (const resource of [...resources]) {
-                    dispatch<any>(toggleCollectionTrashed(resource.uuid, resource.isTrashed!!));
-                }
-            },
-        },
+        ...msCommonActionSet,
+        msCopyCollection,
+        msMoveCollection,
+        msToggleTrashAction,
+        msEditCollection
     ],
 ];
+
+//edit collection
\ No newline at end of file
diff --git a/src/views-components/multiselect-toolbar/ms-menu-actions.ts b/src/views-components/multiselect-toolbar/ms-menu-actions.ts
index b01a5e17..1734644c 100644
--- a/src/views-components/multiselect-toolbar/ms-menu-actions.ts
+++ b/src/views-components/multiselect-toolbar/ms-menu-actions.ts
@@ -28,7 +28,8 @@ export enum MultiSelectMenuActionNames {
     COPY_AND_RERUN_PROCESS = 'Copy and re-run process',
     COPY_TO_CLIPBOARD = 'Copy to clipboard',
     DELETE_WORKFLOW = 'Delete Worflow',
-    EDIT_PPROJECT = 'Edit project',
+    EDIT_COLLECTION = 'Edit collection',
+    EDIT_PROJECT = 'Edit project',
     FREEZE_PROJECT = 'Freeze Project',
     MAKE_A_COPY = 'Make a copy',
     MOVE_TO = 'Move to',
diff --git a/src/views-components/multiselect-toolbar/ms-project-action-set.ts b/src/views-components/multiselect-toolbar/ms-project-action-set.ts
index a7c97bc9..245fb708 100644
--- a/src/views-components/multiselect-toolbar/ms-project-action-set.ts
+++ b/src/views-components/multiselect-toolbar/ms-project-action-set.ts
@@ -25,7 +25,7 @@ const {
     VIEW_DETAILS,
     API_DETAILS,
     OPEN_W_3RD_PARTY_CLIENT,
-    EDIT_PPROJECT,
+    EDIT_PROJECT,
     SHARE,
     MOVE_TO,
     ADD_TO_TRASH,
@@ -34,7 +34,7 @@ const {
 } = MultiSelectMenuActionNames;
 
 const msEditProjectAction = {
-    name: EDIT_PPROJECT,
+    name: EDIT_PROJECT,
     icon: RenameIcon,
     hasAlts: false,
     isForMulti: false,
@@ -115,7 +115,7 @@ export const msProjectActionFilter = new Set<string>([
     ADD_TO_TRASH,
     API_DETAILS,
     COPY_TO_CLIPBOARD,
-    EDIT_PPROJECT,
+    EDIT_PROJECT,
     FREEZE_PROJECT,
     MOVE_TO,
     NEW_PROJECT,
@@ -126,4 +126,4 @@ export const msProjectActionFilter = new Set<string>([
 ]);
 export const msReadOnlyProjectActionFilter = new Set<string>([ADD_TO_FAVORITES, API_DETAILS, COPY_TO_CLIPBOARD, OPEN_IN_NEW_TAB, OPEN_W_3RD_PARTY_CLIENT, VIEW_DETAILS,]);
 export const msFrozenProjectActionFilter = new Set<string>([ADD_TO_FAVORITES, API_DETAILS, COPY_TO_CLIPBOARD, OPEN_IN_NEW_TAB, OPEN_W_3RD_PARTY_CLIENT, VIEW_DETAILS, SHARE, FREEZE_PROJECT])
-export const msFilterGroupActionFilter = new Set<string>([ADD_TO_FAVORITES, API_DETAILS, COPY_TO_CLIPBOARD, OPEN_IN_NEW_TAB, OPEN_W_3RD_PARTY_CLIENT, VIEW_DETAILS, SHARE, ADD_TO_TRASH, EDIT_PPROJECT, MOVE_TO])
+export const msFilterGroupActionFilter = new Set<string>([ADD_TO_FAVORITES, API_DETAILS, COPY_TO_CLIPBOARD, OPEN_IN_NEW_TAB, OPEN_W_3RD_PARTY_CLIENT, VIEW_DETAILS, SHARE, ADD_TO_TRASH, EDIT_PROJECT, MOVE_TO])

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list