Skip to content
Snippets Groups Projects
Commit 9a257066 authored by Muthukrishnanmatriot's avatar Muthukrishnanmatriot
Browse files

added feature to show multi task associated with subtask

parent 778de5b0
No related branches found
No related tags found
1 merge request!471Resolve TMSS-711
......@@ -82,7 +82,12 @@ export class FindObjectResult extends Component{
<span className="find-obj-tree-view"> <a href={subtaskDetails.url} target='_blank'
title=" View SubTask API"><i className="fa fa-link" /></a></span></>;
subtask['icon'] = 'fas fa-tasks';
subtask['children'] = await this.findTask('blueprint', subtaskDetails.task_blueprint_id);
let tasks = [];
for (const taskId of subtaskDetails.task_blueprints_ids) {
let taskMap = await this.findTask('blueprint', taskId);
tasks.push(taskMap[0]);
}
subtask['children'] = tasks;
return [subtask];
}
return '';
......@@ -188,12 +193,14 @@ export class FindObjectResult extends Component{
}
expandNode(node, expandedKeys) {
expandNode(node, expandedKeys, expand) {
if (node.children && node.children.length) {
expandedKeys[node.key] = true;
expandedKeys[node.key] = expand;
if(node.key.startsWith('subtask') && node.children.length > 1) {
expand = false;
}
for (let child of node.children) {
this.expandNode(child, expandedKeys);
this.expandNode(child, expandedKeys, expand);
}
}
}
......@@ -201,7 +208,7 @@ export class FindObjectResult extends Component{
expandAll() {
let expandedKeys = {};
for (let node of this.state.objNodes) {
this.expandNode(node, expandedKeys);
this.expandNode(node, expandedKeys, true);
}
this.setState({expandedKeys: expandedKeys });
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment