X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/d8a3b5fdd6f606800e9b321acb3fca10c5183cb9..f8fb6725beec5b2bf0eec7f375d49f9189ff1bc3:/src/store/workbench/workbench-actions.ts diff --git a/src/store/workbench/workbench-actions.ts b/src/store/workbench/workbench-actions.ts index c6932558..944c48cf 100644 --- a/src/store/workbench/workbench-actions.ts +++ b/src/store/workbench/workbench-actions.ts @@ -101,6 +101,8 @@ import { subprocessPanelActions } from '~/store/subprocess-panel/subprocess-pane import { subprocessPanelColumns } from '~/views/subprocess-panel/subprocess-panel-root'; import { loadAllProcessesPanel, allProcessesPanelActions } from '../all-processes-panel/all-processes-panel-action'; import { allProcessesPanelColumns } from '~/views/all-processes-panel/all-processes-panel'; +import { collectionPanelFilesAction } from '../collection-panel/collection-panel-files/collection-panel-files-actions'; +import { createTree } from '~/models/tree'; export const WORKBENCH_LOADING_SCREEN = 'workbenchLoadingScreen'; @@ -237,7 +239,7 @@ export const createProject = (data: projectCreateActions.ProjectCreateFormDialog kind: SnackbarKind.SUCCESS })); await dispatch(loadSidePanelTreeProjects(newProject.ownerUuid)); - dispatch(reloadProjectMatchingUuid([newProject.ownerUuid])); + dispatch(navigateTo(newProject.uuid)); } }; @@ -278,6 +280,8 @@ export const loadCollection = (uuid: string) => async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => { const userUuid = getUserUuid(getState()); if (userUuid) { + // Clear collection files panel + dispatch(collectionPanelFilesAction.SET_COLLECTION_FILES({ files: createTree() })); const match = await loadGroupContentsResource({ uuid, userUuid, services }); match({ OWNED: async collection => { @@ -315,7 +319,7 @@ export const createCollection = (data: collectionCreateActions.CollectionCreateF kind: SnackbarKind.SUCCESS })); dispatch(updateResources([collection])); - dispatch(reloadProjectMatchingUuid([collection.ownerUuid])); + dispatch(navigateTo(collection.uuid)); } };