}
};
+export enum SidePanelIdentifiers {
+ Projects = "Projects",
+ SharedWithMe = "SharedWithMe",
+ Workflows = "Workflows",
+ RecentOpen = "RecentOpen",
+ Favourites = "Favourites",
+ Trash = "Trash"
+}
+
export const sidePanelData = [
{
- id: "1",
+ id: SidePanelIdentifiers.Projects,
name: "Projects",
icon: "fas fa-th fa-fw",
open: false,
openAble: true
},
{
- id: "2",
+ id: SidePanelIdentifiers.SharedWithMe,
name: "Shared with me",
icon: "fas fa-users fa-fw",
active: false,
},
{
- id: "3",
+ id: SidePanelIdentifiers.Workflows,
name: "Workflows",
icon: "fas fa-cogs fa-fw",
active: false,
},
{
- id: "4",
+ id: SidePanelIdentifiers.RecentOpen,
name: "Recent open",
icon: "icon-time fa-fw",
active: false,
},
{
- id: "5",
+ id: SidePanelIdentifiers.Favourites,
name: "Favorites",
icon: "fas fa-star fa-fw",
active: false,
},
{
- id: "6",
+ id: SidePanelIdentifiers.Trash,
name: "Trash",
icon: "fas fa-trash-alt fa-fw",
active: false,
import detailsPanelActions, { loadDetails } from "../../store/details-panel/details-panel-action";
import { ResourceKind } from '../../models/kinds';
+import { SidePanelIdentifiers } from '../../store/side-panel/side-panel-reducer';
const drawerWidth = 240;
const appBarHeight = 100;
toggleSidePanelActive = (itemId: string) => {
this.props.dispatch(sidePanelActions.TOGGLE_SIDE_PANEL_ITEM_ACTIVE(itemId));
this.props.dispatch(projectActions.RESET_PROJECT_TREE_ACTIVITY(itemId));
+ this.props.dispatch(push("/"));
}
handleCreationDialogOpen = (itemUuid: string) => {
toggleActive={itemId => {
this.props.dispatch<any>(setProjectItem(itemId, ItemMode.ACTIVE));
this.props.dispatch<any>(loadDetails(itemId, ResourceKind.Project));
- }}/>
+ this.props.dispatch<any>(sidePanelActions.TOGGLE_SIDE_PANEL_ITEM_ACTIVE(SidePanelIdentifiers.Projects));
+ }} />
</SidePanel>
</Drawer>}
<main className={classes.contentWrapper}>