init-setup-shell-acc-dialog
[arvados-workbench2.git] / src / store / side-panel / side-panel-action.ts
index 4fc745b136481947ae29cc48a5b73c0bd06525e9..fd08ee1319d5b1550bd278591df4997d7d7f247a 100644 (file)
@@ -4,7 +4,7 @@
 
 import { Dispatch } from 'redux';
 import { isSidePanelTreeCategory, SidePanelTreeCategory } from '~/store/side-panel-tree/side-panel-tree-actions';
-import { navigateToFavorites, navigateToResource } from '../navigation/navigation-action';
+import { navigateToFavorites, navigateTo, navigateToTrash, navigateToSharedWithMe, navigateToWorkflows } from '../navigation/navigation-action';
 import { snackbarActions } from '~/store/snackbar/snackbar-actions';
 
 export const navigateFromSidePanel = (id: string) =>
@@ -12,7 +12,7 @@ export const navigateFromSidePanel = (id: string) =>
         if (isSidePanelTreeCategory(id)) {
             dispatch<any>(getSidePanelTreeCategoryAction(id));
         } else {
-            dispatch<any>(navigateToResource(id));
+            dispatch<any>(navigateTo(id));
         }
     };
 
@@ -20,6 +20,12 @@ const getSidePanelTreeCategoryAction = (id: string) => {
     switch (id) {
         case SidePanelTreeCategory.FAVORITES:
             return navigateToFavorites;
+        case SidePanelTreeCategory.TRASH:
+            return navigateToTrash;
+        case SidePanelTreeCategory.SHARED_WITH_ME:
+            return navigateToSharedWithMe;
+        case SidePanelTreeCategory.WORKFLOWS:
+            return navigateToWorkflows;
         default:
             return sidePanelTreeCategoryNotAvailable(id);
     }
@@ -29,4 +35,4 @@ const sidePanelTreeCategoryNotAvailable = (id: string) =>
     snackbarActions.OPEN_SNACKBAR({
         message: `${id} not available`,
         hideDuration: 3000,
-    });
\ No newline at end of file
+    });