UI:Refactoring

This commit is contained in:
Artem Dzhereleiko 2024-07-22 15:04:58 +03:00
parent a19577928f
commit fc80bda9d9
2 changed files with 3 additions and 3 deletions

View File

@ -756,9 +756,6 @@ export class EntityService {
} }
} }
if (allowedEntityTypes && allowedEntityTypes.length) { if (allowedEntityTypes && allowedEntityTypes.length) {
if (allowedEntityTypes.includes(AliasEntityType.CURRENT_RULE_NODE)) {
entityTypes.push(AliasEntityType.CURRENT_RULE_NODE);
}
for (let index = entityTypes.length - 1; index >= 0; index--) { for (let index = entityTypes.length - 1; index >= 0; index--) {
if (allowedEntityTypes.indexOf(entityTypes[index]) === -1) { if (allowedEntityTypes.indexOf(entityTypes[index]) === -1) {
entityTypes.splice(index, 1); entityTypes.splice(index, 1);

View File

@ -93,6 +93,9 @@ export class EntityTypeSelectComponent implements ControlValueAccessor, OnInit,
this.entityTypes = this.filterAllowedEntityTypes this.entityTypes = this.filterAllowedEntityTypes
? this.entityService.prepareAllowedEntityTypesList(this.allowedEntityTypes, this.useAliasEntityTypes) ? this.entityService.prepareAllowedEntityTypesList(this.allowedEntityTypes, this.useAliasEntityTypes)
: this.allowedEntityTypes; : this.allowedEntityTypes;
if (this.allowedEntityTypes?.length && this.allowedEntityTypes.includes(AliasEntityType.CURRENT_RULE_NODE)) {
this.entityTypes.push(AliasEntityType.CURRENT_RULE_NODE);
}
this.entityTypeFormGroup.get('entityType').valueChanges.subscribe( this.entityTypeFormGroup.get('entityType').valueChanges.subscribe(
(value) => { (value) => {
let modelValue; let modelValue;