|
|
|
@ -24,6 +24,7 @@ import { EntityType } from '@shared/models/entity-type.models'; |
|
|
|
import { Subscription } from 'rxjs'; |
|
|
|
import { RuleChainService } from '@core/http/rule-chain.service'; |
|
|
|
import { RuleNodeConfigComponent } from './rule-node-config.component'; |
|
|
|
import { Router } from '@angular/router'; |
|
|
|
|
|
|
|
@Component({ |
|
|
|
selector: 'tb-rule-node', |
|
|
|
@ -46,6 +47,9 @@ export class RuleNodeDetailsComponent extends PageComponent implements OnInit, O |
|
|
|
@Input() |
|
|
|
isReadOnly: boolean; |
|
|
|
|
|
|
|
@Input() |
|
|
|
isAdd = false; |
|
|
|
|
|
|
|
ruleNodeType = RuleNodeType; |
|
|
|
entityType = EntityType; |
|
|
|
|
|
|
|
@ -55,7 +59,8 @@ export class RuleNodeDetailsComponent extends PageComponent implements OnInit, O |
|
|
|
|
|
|
|
constructor(protected store: Store<AppState>, |
|
|
|
private fb: FormBuilder, |
|
|
|
private ruleChainService: RuleChainService) { |
|
|
|
private ruleChainService: RuleChainService, |
|
|
|
private router: Router) { |
|
|
|
super(store); |
|
|
|
this.ruleNodeFormGroup = this.fb.group({}); |
|
|
|
} |
|
|
|
@ -133,4 +138,13 @@ export class RuleNodeDetailsComponent extends PageComponent implements OnInit, O |
|
|
|
this.ruleNodeConfigComponent.validate(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
openRuleChain($event: Event) { |
|
|
|
if ($event) { |
|
|
|
$event.stopPropagation(); |
|
|
|
} |
|
|
|
if (this.ruleNode.targetRuleChainId) { |
|
|
|
this.router.navigateByUrl(`/ruleChains/${this.ruleNode.targetRuleChainId}`); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|