[arvados-workbench2] updated: 2.6.0-66-g4ace1969

git repository hosting git at public.arvados.org
Mon Aug 28 16:30:02 UTC 2023


Summary of changes:
 .../multiselectToolbar/MultiselectToolbar.tsx      |  1 -
 src/store/workbench/workbench-actions.ts           | 39 ++++++++++++----------
 2 files changed, 21 insertions(+), 19 deletions(-)

       via  4ace1969ce7b8d1a75eec8ebc7ea3611c4ebb6e8 (commit)
      from  ca3155fabcfe6dd61b2151c52861b2786e9bec40 (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 4ace1969ce7b8d1a75eec8ebc7ea3611c4ebb6e8
Author: Lisa Knox <lisaknox83 at gmail.com>
Date:   Mon Aug 28 12:29:56 2023 -0400

    15768: fixed project multimove filtering Arvados-DCO-1.1-Signed-off-by: Lisa Knox <lisa.knox at curii.com>

diff --git a/src/components/multiselectToolbar/MultiselectToolbar.tsx b/src/components/multiselectToolbar/MultiselectToolbar.tsx
index 880d0f49..faf65db3 100644
--- a/src/components/multiselectToolbar/MultiselectToolbar.tsx
+++ b/src/components/multiselectToolbar/MultiselectToolbar.tsx
@@ -181,7 +181,6 @@ function mapDispatchToProps(dispatch: Dispatch) {
                 const action = findActionByName(selectedAction.name as string, actionSet);
 
                 if (action) action.execute(dispatch, kindGroups[kind]);
-                // if (action && action.name === 'ToggleTrashAction') action.execute(dispatch, kindGroups[kind]);
             }
         },
     };
diff --git a/src/store/workbench/workbench-actions.ts b/src/store/workbench/workbench-actions.ts
index 6182a314..5101ab40 100644
--- a/src/store/workbench/workbench-actions.ts
+++ b/src/store/workbench/workbench-actions.ts
@@ -62,7 +62,7 @@ import { loadSiteManagerPanel } from "store/auth/auth-action-session";
 import { workflowPanelColumns } from "views/workflow-panel/workflow-panel-view";
 import { progressIndicatorActions } from "store/progress-indicator/progress-indicator-actions";
 import { getProgressIndicator } from "store/progress-indicator/progress-indicator-reducer";
-import { extractUuidKind, ResourceKind } from "models/resource";
+import { extractUuidKind, Resource, ResourceKind } from "models/resource";
 import { FilterBuilder } from "services/api/filter-builder";
 import { GroupContentsResource } from "services/groups-service/groups-service";
 import { MatchCases, ofType, unionize, UnionOf } from "common/unionize";
@@ -290,29 +290,31 @@ export const moveProject = (data: MoveToFormDialogData) => async (dispatch: Disp
     }
 
     async function moveSingleProject(projectUuid) {
-        try {
-            const originalProject = getResource(projectUuid)(getState().resources);
-            const oldProject = { ...originalProject, ownerUuid: data.ownerUuid } as any;
-            const oldOwnerUuid = oldProject ? oldProject.ownerUuid : "";
-            const movedProject = await dispatch<any>(projectMoveActions.moveProject(oldProject));
-            if (movedProject) {
+        const originalProject = getResource(projectUuid)(getState().resources) as Resource & { name: string };
+        if (originalProject.kind === ResourceKind.PROJECT) {
+            try {
+                const oldProject: MoveToFormDialogData = { name: originalProject.name, uuid: originalProject.uuid, ownerUuid: data.ownerUuid };
+                const oldOwnerUuid = oldProject ? oldProject.ownerUuid : "";
+                const movedProject = await dispatch<any>(projectMoveActions.moveProject(oldProject));
+                if (movedProject) {
+                    dispatch(
+                        snackbarActions.OPEN_SNACKBAR({
+                            message: "Project has been moved",
+                            hideDuration: 2000,
+                            kind: SnackbarKind.SUCCESS,
+                        })
+                    );
+                    await dispatch<any>(reloadProjectMatchingUuid([oldOwnerUuid, movedProject.ownerUuid, movedProject.uuid]));
+                }
+            } catch (e) {
                 dispatch(
                     snackbarActions.OPEN_SNACKBAR({
-                        message: "Project has been moved",
+                        message: e.message,
                         hideDuration: 2000,
-                        kind: SnackbarKind.SUCCESS,
+                        kind: SnackbarKind.ERROR,
                     })
                 );
-                await dispatch<any>(reloadProjectMatchingUuid([oldOwnerUuid, movedProject.ownerUuid, movedProject.uuid]));
             }
-        } catch (e) {
-            dispatch(
-                snackbarActions.OPEN_SNACKBAR({
-                    message: e.message,
-                    hideDuration: 2000,
-                    kind: SnackbarKind.ERROR,
-                })
-            );
         }
     }
     if (sourceUuid) await dispatch<any>(loadSidePanelTreeProjects(sourceUuid));
@@ -526,6 +528,7 @@ export const updateProcess = (data: processUpdateActions.ProcessUpdateFormDialog
 };
 
 export const moveProcess = (data: MoveToFormDialogData) => async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => {
+    console.log("PROCESSS_DATA: ", data);
     try {
         const process = await dispatch<any>(processMoveActions.moveProcess(data));
         dispatch<any>(updateResources([process]));

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


hooks/post-receive
-- 




More information about the arvados-commits mailing list