Commit aa14b0cb547a8a73b21cc80b8bbe63df5dc985b4

Authored by deaflynx
1 parent a75fc2ea

Minor fix for edge rule chains

@@ -91,7 +91,7 @@ export class RuleChainsTableConfigResolver implements Resolve<EntityTableConfig< @@ -91,7 +91,7 @@ export class RuleChainsTableConfigResolver implements Resolve<EntityTableConfig<
91 this.config.saveEntity = ruleChain => this.saveRuleChain(ruleChain); 91 this.config.saveEntity = ruleChain => this.saveRuleChain(ruleChain);
92 this.config.deleteEntity = id => this.ruleChainService.deleteRuleChain(id.id); 92 this.config.deleteEntity = id => this.ruleChainService.deleteRuleChain(id.id);
93 this.config.onEntityAction = action => this.onRuleChainAction(action); 93 this.config.onEntityAction = action => this.onRuleChainAction(action);
94 - this.config.deleteEnabled = (ruleChain) => ruleChain && !ruleChain.root; 94 + this.config.deleteEnabled = (ruleChain) => ruleChain && !ruleChain.root && !this.edgeId;
95 this.config.entitySelectionEnabled = (ruleChain) => { 95 this.config.entitySelectionEnabled = (ruleChain) => {
96 if (isDefined(this.edgeId) && this.edgeId != null) { 96 if (isDefined(this.edgeId) && this.edgeId != null) {
97 return this.edge.rootRuleChainId.id != ruleChain.id.id; 97 return this.edge.rootRuleChainId.id != ruleChain.id.id;
@@ -162,7 +162,6 @@ export class RuleChainsTableConfigResolver implements Resolve<EntityTableConfig< @@ -162,7 +162,6 @@ export class RuleChainsTableConfigResolver implements Resolve<EntityTableConfig<
162 })).subscribe(); 162 })).subscribe();
163 } 163 }
164 this.config.entitiesFetchFunction = pageLink => this.ruleChainService.getEdgeRuleChains(this.edgeId, pageLink); 164 this.config.entitiesFetchFunction = pageLink => this.ruleChainService.getEdgeRuleChains(this.edgeId, pageLink);
165 - this.config.entitiesDeleteEnabled = false;  
166 } 165 }
167 } 166 }
168 167