Browse Source

UI:Refactoring

pull/11220/head
Artem Dzhereleiko 2 years ago
parent
commit
fc80bda9d9
  1. 3
      ui-ngx/src/app/core/http/entity.service.ts
  2. 3
      ui-ngx/src/app/shared/components/entity/entity-type-select.component.ts

3
ui-ngx/src/app/core/http/entity.service.ts

@ -756,9 +756,6 @@ export class EntityService {
}
}
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--) {
if (allowedEntityTypes.indexOf(entityTypes[index]) === -1) {
entityTypes.splice(index, 1);

3
ui-ngx/src/app/shared/components/entity/entity-type-select.component.ts

@ -93,6 +93,9 @@ export class EntityTypeSelectComponent implements ControlValueAccessor, OnInit,
this.entityTypes = this.filterAllowedEntityTypes
? this.entityService.prepareAllowedEntityTypesList(this.allowedEntityTypes, this.useAliasEntityTypes)
: 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(
(value) => {
let modelValue;

Loading…
Cancel
Save