X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/64b25cb874d430f23d169606265c9534a52bdc6c..1326c2ee2772e5e6191e49773bcb00840153e559:/src/store/workbench/workbench-actions.ts diff --git a/src/store/workbench/workbench-actions.ts b/src/store/workbench/workbench-actions.ts index f86ea78b..aaf8f266 100644 --- a/src/store/workbench/workbench-actions.ts +++ b/src/store/workbench/workbench-actions.ts @@ -7,7 +7,7 @@ import { RootState } from "../store"; import { loadDetailsPanel } from '~/store/details-panel/details-panel-action'; import { snackbarActions } from '../snackbar/snackbar-actions'; import { loadFavoritePanel } from '../favorite-panel/favorite-panel-action'; -import { openProjectPanel, projectPanelActions } from '~/store/project-panel/project-panel-action'; +import { openProjectPanel, projectPanelActions, setIsProjectPanelTrashed } from '~/store/project-panel/project-panel-action'; import { activateSidePanelTreeItem, initSidePanelTree, SidePanelTreeCategory, loadSidePanelTreeProjects } from '../side-panel-tree/side-panel-tree-actions'; import { loadResource, updateResources } from '../resources/resources-actions'; import { favoritePanelActions } from '~/store/favorite-panel/favorite-panel-action'; @@ -53,7 +53,6 @@ import { collectionPanelActions } from "~/store/collection-panel/collection-pane import { CollectionResource } from "~/models/collection"; import { searchResultsPanelActions, loadSearchResultsPanel } from '~/store/search-results-panel/search-results-panel-actions'; import { searchResultsPanelColumns } from '~/views/search-results-panel/search-results-panel-view'; -import * as uuid from 'uuid/v4'; export const WORKBENCH_LOADING_SCREEN = 'workbenchLoadingScreen'; @@ -123,6 +122,7 @@ export const loadProject = (uuid: string) => handleFirstTimeLoad( async (dispatch: Dispatch, getState: () => RootState, services: ServiceRepository) => { const userUuid = services.authService.getUuid(); + dispatch(setIsProjectPanelTrashed(false)); if (userUuid) { if (userUuid !== uuid) { const match = await loadGroupContentsResource({ uuid, userUuid, services }); @@ -134,11 +134,12 @@ export const loadProject = (uuid: string) => }, SHARED: project => { dispatch(setSharedWithMeBreadcrumbs(uuid)); - dispatch(activateSidePanelTreeItem(SidePanelTreeCategory.SHARED_WITH_ME)); + dispatch(activateSidePanelTreeItem(uuid)); dispatch(finishLoadingProject(project)); }, TRASHED: project => { dispatch(setTrashBreadcrumbs(uuid)); + dispatch(setIsProjectPanelTrashed(true)); dispatch(activateSidePanelTreeItem(SidePanelTreeCategory.TRASH)); dispatch(finishLoadingProject(project)); } @@ -213,7 +214,7 @@ export const loadCollection = (uuid: string) => dispatch(collectionPanelActions.SET_COLLECTION(collection as CollectionResource)); dispatch(updateResources([collection])); dispatch(setSharedWithMeBreadcrumbs(collection.ownerUuid)); - dispatch(activateSidePanelTreeItem(SidePanelTreeCategory.SHARED_WITH_ME)); + dispatch(activateSidePanelTreeItem(collection.ownerUuid)); dispatch(loadCollectionFiles(collection.uuid)); }, TRASHED: collection => {