Merge branch 'master' into 14430-shared-with-me-tree 14430-shared-with-me-tree
authorPawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>
Thu, 8 Nov 2018 14:52:03 +0000 (15:52 +0100)
committerPawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>
Thu, 8 Nov 2018 14:52:03 +0000 (15:52 +0100)
refs #14430

Arvados-DCO-1.1-Signed-off-by: Pawel Kowalczyk <pawel.kowalczyk@contractors.roche.com>

1  2 
src/store/workbench/workbench-actions.ts

index facbc9e876f04c8b3c57e173d3f116081bde176a,400264c3193b162653cfdef71ab2515d0fac5245..aaf8f2665f9a1b07318c6a9d3179a0fbd3727d5d
@@@ -7,7 -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 +53,6 @@@ import { collectionPanelActions } from 
  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 +122,7 @@@ export const loadProject = (uuid: strin
      handleFirstTimeLoad(
          async (dispatch: Dispatch<any>, getState: () => RootState, services: ServiceRepository) => {
              const userUuid = services.authService.getUuid();
+             dispatch(setIsProjectPanelTrashed(false));
              if (userUuid) {
                  if (userUuid !== uuid) {
                      const match = await loadGroupContentsResource({ uuid, userUuid, services });
                          },
                          SHARED: project => {
                              dispatch<any>(setSharedWithMeBreadcrumbs(uuid));
 -                            dispatch(activateSidePanelTreeItem(SidePanelTreeCategory.SHARED_WITH_ME));
 +                            dispatch(activateSidePanelTreeItem(uuid));
                              dispatch(finishLoadingProject(project));
                          },
                          TRASHED: project => {
                              dispatch<any>(setTrashBreadcrumbs(uuid));
+                             dispatch(setIsProjectPanelTrashed(true));
                              dispatch(activateSidePanelTreeItem(SidePanelTreeCategory.TRASH));
                              dispatch(finishLoadingProject(project));
                          }
@@@ -213,7 -214,7 +214,7 @@@ export const loadCollection = (uuid: st
                          dispatch(collectionPanelActions.SET_COLLECTION(collection as CollectionResource));
                          dispatch(updateResources([collection]));
                          dispatch<any>(setSharedWithMeBreadcrumbs(collection.ownerUuid));
 -                        dispatch(activateSidePanelTreeItem(SidePanelTreeCategory.SHARED_WITH_ME));
 +                        dispatch(activateSidePanelTreeItem(collection.ownerUuid));
                          dispatch(loadCollectionFiles(collection.uuid));
                      },
                      TRASHED: collection => {