+ this.props.dispatch(push("/"));
+ }
+
+ handleCreationDialogOpen = (itemUuid: string) => {
+ this.closeContextMenu();
+ this.props.dispatch(projectActions.OPEN_PROJECT_CREATOR({ ownerUuid: itemUuid }));
+ }
+
+
+ openContextMenu = (event: React.MouseEvent<HTMLElement>, itemUuid: string) => {
+ event.preventDefault();
+ this.setState({
+ contextMenu: {
+ anchorEl: mockAnchorFromMouseEvent(event),
+ itemUuid
+ }
+ });
+ }
+
+ closeContextMenu = () => {
+ this.setState({ contextMenu: {} });
+ }
+
+ openCreateDialog = (item: ContextMenuAction) => {
+ const { itemUuid } = this.state.contextMenu;
+ if (item.openCreateDialog && itemUuid) {
+ this.handleCreationDialogOpen(itemUuid);
+ }