From 0a61c946e683e8a44db3212656aa4b3da82ffd8e Mon Sep 17 00:00:00 2001 From: Stephen Smith Date: Tue, 18 Apr 2023 20:12:11 -0400 Subject: [PATCH] 20031: Navigate to new collections when copying/moving to new collection Arvados-DCO-1.1-Signed-off-by: Stephen Smith --- src/store/collections/collection-partial-copy-actions.ts | 2 ++ src/store/collections/collection-partial-move-actions.ts | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/store/collections/collection-partial-copy-actions.ts b/src/store/collections/collection-partial-copy-actions.ts index 2a3fd5de8b..efdfd96156 100644 --- a/src/store/collections/collection-partial-copy-actions.ts +++ b/src/store/collections/collection-partial-copy-actions.ts @@ -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(navigateTo(updatedCollection.uuid)) dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_PARTIAL_COPY_FORM_NAME })); dispatch(snackbarActions.OPEN_SNACKBAR({ diff --git a/src/store/collections/collection-partial-move-actions.ts b/src/store/collections/collection-partial-move-actions.ts index 6d3c45f3bf..c5760ed85d 100644 --- a/src/store/collections/collection-partial-move-actions.ts +++ b/src/store/collections/collection-partial-move-actions.ts @@ -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(navigateTo(updatedCollection.uuid)) dispatch(dialogActions.CLOSE_DIALOG({ id: COLLECTION_PARTIAL_MOVE_TO_NEW_COLLECTION })); dispatch(snackbarActions.OPEN_SNACKBAR({ -- 2.30.2