Don't show any/all convergence option on root node

This commit is contained in:
Jake McDermott 2020-01-21 12:30:33 -05:00 committed by Rebeccah
parent 86a39938fe
commit bbb4701fa9
2 changed files with 12 additions and 2 deletions

View File

@ -183,7 +183,7 @@
</select>
</div>
</div>
<div id="workflow_node_checkbox_group" class="form-group Form-formGroup Form-formGroup--singleColumn" >
<div id="workflow_node_checkbox_group" class="form-group Form-formGroup Form-formGroup--singleColumn" ng-show="!(nodeConfig.editNodeIsRoot || nodeConfig.newNodeIsRoot)">
<label class="Form-inputLabelContainer" for="checkbox_group">
<span translate class="Form-inputLabel">Options</span>
</label>

View File

@ -720,6 +720,15 @@ export default ['$scope', 'TemplatesService',
/* EDIT NODE FUNCTIONS */
$scope.startEditNode = (nodeToEdit) => {
// Determine if this is a root node
let editNodeIsRoot = false;
$scope.graphState.arrayOfLinksForChart.forEach((link) => {
if (link.source.id === 1 && link.target.id === nodeIdToChartNodeIdMapping[nodeToEdit.id]) {
editNodeIsRoot = true;
return;
}
});
$scope.workflowChangesStarted = true;
if ($scope.linkConfig) {
$scope.cancelLinkForm();
@ -733,7 +742,8 @@ export default ['$scope', 'TemplatesService',
$scope.nodeConfig = {
mode: "edit",
nodeId: nodeToEdit.id,
node: nodeRef[nodeToEdit.id]
node: nodeRef[nodeToEdit.id],
editNodeIsRoot,
};
$scope.graphState.nodeBeingEdited = nodeToEdit.id;