|
|
|
@ -31,6 +31,8 @@ import { EntityTableConfig } from '@home/models/entity/entities-table-config.mod |
|
|
|
}) |
|
|
|
export class RuleChainComponent extends EntityComponent<RuleChain> { |
|
|
|
|
|
|
|
ruleChainScope: 'tenant' | 'edges' | 'edge'; |
|
|
|
|
|
|
|
constructor(protected store: Store<AppState>, |
|
|
|
protected translate: TranslateService, |
|
|
|
@Inject('entity') protected entityValue: RuleChain, |
|
|
|
@ -39,6 +41,11 @@ export class RuleChainComponent extends EntityComponent<RuleChain> { |
|
|
|
super(store, fb, entityValue, entitiesTableConfigValue); |
|
|
|
} |
|
|
|
|
|
|
|
ngOnInit() { |
|
|
|
this.ruleChainScope = this.entitiesTableConfig.componentsData.ruleChainScope; |
|
|
|
super.ngOnInit(); |
|
|
|
} |
|
|
|
|
|
|
|
hideDelete() { |
|
|
|
if (this.entitiesTableConfig) { |
|
|
|
return !this.entitiesTableConfig.deleteEnabled(this.entity); |
|
|
|
@ -79,30 +86,6 @@ export class RuleChainComponent extends EntityComponent<RuleChain> { |
|
|
|
})); |
|
|
|
} |
|
|
|
|
|
|
|
isTenantRuleChainScope() { |
|
|
|
if (this.entitiesTableConfig) { |
|
|
|
return this.entitiesTableConfig.componentsData.ruleChainScope == 'tenant'; |
|
|
|
} else { |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
isEdgesRuleChainScope() { |
|
|
|
if (this.entitiesTableConfig) { |
|
|
|
return this.entitiesTableConfig.componentsData.ruleChainScope == 'edges'; |
|
|
|
} else { |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
isEdgeRuleChainScope() { |
|
|
|
if (this.entitiesTableConfig) { |
|
|
|
return this.entitiesTableConfig.componentsData.ruleChainScope == 'edge'; |
|
|
|
} else { |
|
|
|
return false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
isRootRuleChain() { |
|
|
|
if (this.entitiesTableConfig && this.entityValue) { |
|
|
|
return this.entitiesTableConfig.componentsData.rootRuleChainId == this.entityValue.id.id; |
|
|
|
|