diff --git a/ui-ngx/src/app/modules/home/components/calculated-fields/calculated-field.component.html b/ui-ngx/src/app/modules/home/components/calculated-fields/calculated-field.component.html
index 5513770627..10ab150b69 100644
--- a/ui-ngx/src/app/modules/home/components/calculated-fields/calculated-field.component.html
+++ b/ui-ngx/src/app/modules/home/components/calculated-fields/calculated-field.component.html
@@ -125,7 +125,12 @@
[additionalActionConfig]="entitiesTableConfig.additionalDebugActionConfig"
/>
-
+
+
{{ 'common.type' | translate }}
diff --git a/ui-ngx/src/app/modules/home/components/calculated-fields/calculated-field.component.ts b/ui-ngx/src/app/modules/home/components/calculated-fields/calculated-field.component.ts
index c521c624d4..0b62d9bb96 100644
--- a/ui-ngx/src/app/modules/home/components/calculated-fields/calculated-field.component.ts
+++ b/ui-ngx/src/app/modules/home/components/calculated-fields/calculated-field.component.ts
@@ -60,7 +60,7 @@ export class CalculatedFieldComponent extends EntityComponent void): void {
diff --git a/ui-ngx/src/app/modules/home/components/calculated-fields/components/simple-configuration/simple-configuration.component.ts b/ui-ngx/src/app/modules/home/components/calculated-fields/components/simple-configuration/simple-configuration.component.ts
index e6ff1d1bad..2771795635 100644
--- a/ui-ngx/src/app/modules/home/components/calculated-fields/components/simple-configuration/simple-configuration.component.ts
+++ b/ui-ngx/src/app/modules/home/components/calculated-fields/components/simple-configuration/simple-configuration.component.ts
@@ -109,6 +109,7 @@ export class SimpleConfigurationComponent implements ControlValueAccessor, Valid
private propagateChange: (config: SimpeConfiguration) => void = () => { };
constructor(private fb: FormBuilder) {
+ this.updatedFormWithScript();
this.simpleConfiguration.get('output').valueChanges.pipe(
takeUntilDestroyed(),
).subscribe(() => {
@@ -151,7 +152,6 @@ export class SimpleConfigurationComponent implements ControlValueAccessor, Valid
formValue.expressionSIMPLE = formValue.expression;
}
this.simpleConfiguration.patchValue(formValue, {emitEvent: false});
- this.updatedFormWithScript();
setTimeout(() => {
this.simpleConfiguration.get('arguments').updateValueAndValidity({onlySelf: true});
});
diff --git a/ui-ngx/src/app/shared/components/entity/entity-select.component.html b/ui-ngx/src/app/shared/components/entity/entity-select.component.html
index c0b4f1aafb..49e853e722 100644
--- a/ui-ngx/src/app/shared/components/entity/entity-select.component.html
+++ b/ui-ngx/src/app/shared/components/entity/entity-select.component.html
@@ -25,6 +25,7 @@
[useAliasEntityTypes]="useAliasEntityTypes"
[allowedEntityTypes]="allowedEntityTypes"
[additionEntityTypes]="additionEntityTypes"
+ [filterAllowedEntityTypes]="filterAllowedEntityTypes"
formControlName="entityType">
diff --git a/ui-ngx/src/app/shared/components/entity/entity-select.component.ts b/ui-ngx/src/app/shared/components/entity/entity-select.component.ts
index 5e75426952..fbfb7ae453 100644
--- a/ui-ngx/src/app/shared/components/entity/entity-select.component.ts
+++ b/ui-ngx/src/app/shared/components/entity/entity-select.component.ts
@@ -14,7 +14,7 @@
/// limitations under the License.
///
-import { AfterViewInit, Component, DestroyRef, forwardRef, Input, OnInit } from '@angular/core';
+import { AfterViewInit, Component, DestroyRef, EventEmitter, forwardRef, Input, OnInit, Output } from '@angular/core';
import { ControlValueAccessor, NG_VALUE_ACCESSOR, UntypedFormBuilder, UntypedFormGroup } from '@angular/forms';
import { Store } from '@ngrx/store';
import { AppState } from '@core/core.state';
@@ -26,6 +26,7 @@ import { NULL_UUID } from '@shared/models/id/has-uuid';
import { coerceBoolean } from '@shared/decorators/coercion';
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
import { MatFormFieldAppearance } from '@angular/material/form-field';
+import { BaseData } from '@shared/models/base-data';
@Component({
selector: 'tb-entity-select',
@@ -66,6 +67,12 @@ export class EntitySelectComponent implements ControlValueAccessor, OnInit, Afte
@coerceBoolean()
useEntityDisplayName = false;
+ @Input()
+ filterAllowedEntityTypes: boolean;
+
+ @Output()
+ entityChanged = new EventEmitter>();
+
displayEntityTypeSelect: boolean;
AliasEntityType = AliasEntityType;
@@ -176,4 +183,8 @@ export class EntitySelectComponent implements ControlValueAccessor, OnInit, Afte
}
}
}
+
+ changeEntity(entity: BaseData): void {
+ this.entityChanged.emit(entity);
+ }
}