[ARVADOS-WORKBENCH2] updated: 1.1.4-361-g1f37ef5
Git user
git at public.curoverse.com
Tue Jul 24 02:53:40 EDT 2018
Summary of changes:
src/components/side-panel/side-panel.tsx | 3 ++-
src/store/side-panel/side-panel-reducer.ts | 10 +++++++++-
src/views/workbench/workbench.tsx | 4 +++-
3 files changed, 14 insertions(+), 3 deletions(-)
via 1f37ef5dfe95421be1af2f821ea4a8499babc655 (commit)
from 62daa4bdd790f99845bbc49062015799fdfd82b5 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit 1f37ef5dfe95421be1af2f821ea4a8499babc655
Author: Daniel Kos <daniel.kos at contractors.roche.com>
Date: Tue Jul 24 08:53:38 2018 +0200
Add getting items on favorites click
Feature #13753
Arvados-DCO-1.1-Signed-off-by: Daniel Kos <daniel.kos at contractors.roche.com>
diff --git a/src/components/side-panel/side-panel.tsx b/src/components/side-panel/side-panel.tsx
index 0d27584..8622b68 100644
--- a/src/components/side-panel/side-panel.tsx
+++ b/src/components/side-panel/side-panel.tsx
@@ -10,6 +10,7 @@ import { List, ListItem, ListItemIcon, Collapse } from "@material-ui/core";
import { SidePanelRightArrowIcon, IconType } from '../icon/icon';
import * as classnames from "classnames";
import { ListItemTextIcon } from '../list-item-text-icon/list-item-text-icon';
+import { Dispatch } from "redux";
type CssRules = 'active' | 'row' | 'root' | 'list' | 'iconClose' | 'iconOpen' | 'toggableIconContainer' | 'toggableIcon';
@@ -58,7 +59,7 @@ export interface SidePanelItem {
open?: boolean;
margin?: boolean;
openAble?: boolean;
- path?: string;
+ activeAction?: (dispatch: Dispatch) => void;
}
interface SidePanelDataProps {
diff --git a/src/store/side-panel/side-panel-reducer.ts b/src/store/side-panel/side-panel-reducer.ts
index 5dd5c01..8d170b3 100644
--- a/src/store/side-panel/side-panel-reducer.ts
+++ b/src/store/side-panel/side-panel-reducer.ts
@@ -6,6 +6,10 @@ import * as _ from "lodash";
import { sidePanelActions, SidePanelAction } from './side-panel-action';
import { SidePanelItem } from '../../components/side-panel/side-panel';
import { ProjectsIcon, ShareMeIcon, WorkflowIcon, RecentIcon, FavoriteIcon, TrashIcon } from "../../components/icon/icon";
+import { dataExplorerActions } from "../data-explorer/data-explorer-action";
+import { Dispatch } from "react-redux";
+import { FAVORITE_PANEL_ID } from "../../views/favorite-panel/favorite-panel";
+import { push } from "react-router-redux";
export type SidePanelState = SidePanelItem[];
@@ -78,7 +82,11 @@ export const sidePanelData = [
name: "Favorites",
icon: FavoriteIcon,
active: false,
- path: '/favorites'
+ activeAction: (dispatch: Dispatch) => {
+ dispatch(push("/favorites"));
+ dispatch(dataExplorerActions.RESET_PAGINATION({id: FAVORITE_PANEL_ID}));
+ dispatch(dataExplorerActions.REQUEST_ITEMS({id: FAVORITE_PANEL_ID}));
+ }
},
{
id: SidePanelIdentifiers.Trash,
diff --git a/src/views/workbench/workbench.tsx b/src/views/workbench/workbench.tsx
index 3fec6d6..309b31a 100644
--- a/src/views/workbench/workbench.tsx
+++ b/src/views/workbench/workbench.tsx
@@ -255,7 +255,9 @@ export const Workbench = withStyles(styles)(
this.props.dispatch(sidePanelActions.TOGGLE_SIDE_PANEL_ITEM_ACTIVE(itemId));
this.props.dispatch(projectActions.RESET_PROJECT_TREE_ACTIVITY(itemId));
const panelItem = this.props.sidePanelItems.find(it => it.id === itemId);
- this.props.dispatch(push(panelItem && panelItem.path ? panelItem.path : "/"));
+ if (panelItem && panelItem.activeAction) {
+ panelItem.activeAction(this.props.dispatch);
+ }
}
handleCreationDialogOpen = (itemUuid: string) => {
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list