diff --git a/ui-ngx/src/app/modules/home/components/calculated-fields/components/dialog/calculated-field-dialog.component.html b/ui-ngx/src/app/modules/home/components/calculated-fields/components/dialog/calculated-field-dialog.component.html
index 478d41f42b..7e538a8dc7 100644
--- a/ui-ngx/src/app/modules/home/components/calculated-fields/components/dialog/calculated-field-dialog.component.html
+++ b/ui-ngx/src/app/modules/home/components/calculated-fields/components/dialog/calculated-field-dialog.component.html
@@ -64,23 +64,26 @@
@switch (fieldFormGroup.get('type').value) {
@case (CalculatedFieldType.GEOFENCING) {
-
-
+
}
@case (CalculatedFieldType.PROPAGATION) {
-
+ [testScript]="onTestScript.bind(this)"
+ >
}
@case (CalculatedFieldType.RELATED_ENTITIES_AGGREGATION) {
-
+ [tenantId]="data.tenantId"
+ >
}
@default {
-
+ >
}
}
diff --git a/ui-ngx/src/app/modules/home/components/calculated-fields/components/output/calculated-field-output.component.ts b/ui-ngx/src/app/modules/home/components/calculated-fields/components/output/calculated-field-output.component.ts
index 464ca99bd2..2a9215b7cf 100644
--- a/ui-ngx/src/app/modules/home/components/calculated-fields/components/output/calculated-field-output.component.ts
+++ b/ui-ngx/src/app/modules/home/components/calculated-fields/components/output/calculated-field-output.component.ts
@@ -113,7 +113,7 @@ export class CalculatedFieldOutputComponent implements ControlValueAccessor, Val
}
validate(): ValidationErrors | null {
- return this.outputForm.valid ? null : {outputConfig: false};
+ return this.outputForm.valid || this.outputForm.disabled ? null : {outputConfig: false};
}
writeValue(value: CalculatedFieldOutput | CalculatedFieldSimpleOutput): void {
@@ -127,6 +127,16 @@ export class CalculatedFieldOutputComponent implements ControlValueAccessor, Val
registerOnTouched(_: any): void { }
+ setDisabledState(isDisabled: boolean): void {
+ if (isDisabled) {
+ this.outputForm.disable({emitEvent: false});
+ } else {
+ this.outputForm.enable({emitEvent: false});
+ this.updatedFormWithMode();
+ this.toggleScopeByOutputType(this.outputForm.get('type').value);
+ }
+ }
+
private updatedModel(value: CalculatedFieldOutput | CalculatedFieldSimpleOutput) {
if (this.simpleMode && 'name' in value) {
value.name = value.name?.trim() ?? '';
diff --git a/ui-ngx/src/app/shared/components/entity/entity-key-autocomplete.component.html b/ui-ngx/src/app/shared/components/entity/entity-key-autocomplete.component.html
index efc90ec048..c08355462f 100644
--- a/ui-ngx/src/app/shared/components/entity/entity-key-autocomplete.component.html
+++ b/ui-ngx/src/app/shared/components/entity/entity-key-autocomplete.component.html
@@ -22,13 +22,13 @@
required
(focusin)="keyInputSubject.next()"
[matAutocomplete]="keysAutocomplete">
- @if (keyControl.value) {
+ @if (keyControl.value && keyControl.enabled) {
- } @else if (keyControl.hasError('required') && keyControl.touched) {
+ } @else if (keyControl.hasError('required') && keyControl.touched && keyControl.enabled) {