Merge branch '17337-files-not-visible-in-arvados'
[arvados-workbench2.git] / src / store / side-panel / side-panel-action.ts
index 2a5fdd0c2d17c1aae6c3455034fd303ddb523a36..6279aaea307e1e1d2783228672d73a919cb32cfb 100644 (file)
@@ -4,8 +4,8 @@
 
 import { Dispatch } from 'redux';
 import { isSidePanelTreeCategory, SidePanelTreeCategory } from '~/store/side-panel-tree/side-panel-tree-actions';
-import { navigateToFavorites, navigateTo, navigateToTrash, navigateToSharedWithMe } from '../navigation/navigation-action';
-import { snackbarActions } from '~/store/snackbar/snackbar-actions';
+import { navigateToFavorites, navigateTo, navigateToTrash, navigateToSharedWithMe, navigateToWorkflows, navigateToPublicFavorites, navigateToAllProcesses } from '~/store/navigation/navigation-action';
+import {snackbarActions, SnackbarKind} from '~/store/snackbar/snackbar-actions';
 
 export const navigateFromSidePanel = (id: string) =>
     (dispatch: Dispatch) => {
@@ -20,10 +20,16 @@ const getSidePanelTreeCategoryAction = (id: string) => {
     switch (id) {
         case SidePanelTreeCategory.FAVORITES:
             return navigateToFavorites;
+        case SidePanelTreeCategory.PUBLIC_FAVORITES:
+            return navigateToPublicFavorites;
         case SidePanelTreeCategory.TRASH:
             return navigateToTrash;
         case SidePanelTreeCategory.SHARED_WITH_ME:
             return navigateToSharedWithMe;
+        case SidePanelTreeCategory.WORKFLOWS:
+            return navigateToWorkflows;
+        case SidePanelTreeCategory.ALL_PROCESSES:
+            return navigateToAllProcesses;
         default:
             return sidePanelTreeCategoryNotAvailable(id);
     }
@@ -33,4 +39,5 @@ const sidePanelTreeCategoryNotAvailable = (id: string) =>
     snackbarActions.OPEN_SNACKBAR({
         message: `${id} not available`,
         hideDuration: 3000,
+        kind: SnackbarKind.ERROR
     });