20031: Navigate to new collections when copying/moving to new collection
authorStephen Smith <stephen@curii.com>
Wed, 19 Apr 2023 00:12:11 +0000 (20:12 -0400)
committerStephen Smith <stephen@curii.com>
Wed, 19 Apr 2023 00:12:11 +0000 (20:12 -0400)
Arvados-DCO-1.1-Signed-off-by: Stephen Smith <stephen@curii.com>

src/store/collections/collection-partial-copy-actions.ts
src/store/collections/collection-partial-move-actions.ts

index 2a3fd5de8b9e9ff1c5fba2f1716f1facd80c03ca..efdfd96156a57724be3a5fe0f3b6e675ef2219ab 100644 (file)
@@ -14,6 +14,7 @@ import { getCommonResourceServiceError, CommonResourceServiceError } from 'servi
 import { progressIndicatorActions } from "store/progress-indicator/progress-indicator-actions";
 import { initProjectsTreePicker } from "store/tree-picker/tree-picker-actions";
 import { updateResources } from 'store/resources/resources-actions';
+import { navigateTo } from 'store/navigation/navigation-action';
 
 export const COLLECTION_PARTIAL_COPY_FORM_NAME = 'COLLECTION_PARTIAL_COPY_DIALOG';
 export const COLLECTION_PARTIAL_COPY_TO_SELECTED_COLLECTION = 'COLLECTION_PARTIAL_COPY_TO_SELECTED_DIALOG';
@@ -73,6 +74,7 @@ export const copyCollectionPartialToNewCollection = ({ name, description, projec
                     false
                 );
                 dispatch(updateResources([updatedCollection]));
+                dispatch<any>(navigateTo(updatedCollection.uuid))
 
                 dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_PARTIAL_COPY_FORM_NAME }));
                 dispatch(snackbarActions.OPEN_SNACKBAR({
index 6d3c45f3bfa451fc2f259700d609b8859f762d7d..c5760ed85dec2867243436af28ec1c06813c7669 100644 (file)
@@ -8,6 +8,7 @@ import { CommonResourceServiceError, getCommonResourceServiceError } from "servi
 import { ServiceRepository } from "services/services";
 import { filterCollectionFilesBySelection } from "store/collection-panel/collection-panel-files/collection-panel-files-state";
 import { dialogActions } from "store/dialog/dialog-actions";
+import { navigateTo } from "store/navigation/navigation-action";
 import { progressIndicatorActions } from "store/progress-indicator/progress-indicator-actions";
 import { resetPickerProjectTree } from "store/project-tree-picker/project-tree-picker-actions";
 import { updateResources } from "store/resources/resources-actions";
@@ -74,6 +75,7 @@ export const moveCollectionPartialToNewCollection = ({ name, description, projec
                     false
                 );
                 dispatch(updateResources([updatedCollection]));
+                dispatch<any>(navigateTo(updatedCollection.uuid))
 
                 dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_PARTIAL_MOVE_TO_NEW_COLLECTION }));
                 dispatch(snackbarActions.OPEN_SNACKBAR({