- toggleProjectTreeItem = (itemId: string, status: TreeItemStatus) => {
- if (status === TreeItemStatus.Loaded) {
- this.openProjectItem(itemId);
- } else {
- this.props.dispatch<any>(projectService.getProjectList(itemId)).then(() => this.openProjectItem(itemId));
- }
- }
-
- openProjectItem = (itemId: string) => {
- this.props.dispatch(projectActions.TOGGLE_PROJECT_TREE_ITEM(itemId));
- this.props.dispatch(push(`/project/${itemId}`));
- }
-