diff --git a/ui-ngx/src/app/modules/home/components/calculated-fields/components/related-entities-aggregation-configuration/related-entities-aggregation-component.component.ts b/ui-ngx/src/app/modules/home/components/calculated-fields/components/related-entities-aggregation-configuration/related-entities-aggregation-component.component.ts index 0e21263765..fcbe46be03 100644 --- a/ui-ngx/src/app/modules/home/components/calculated-fields/components/related-entities-aggregation-configuration/related-entities-aggregation-component.component.ts +++ b/ui-ngx/src/app/modules/home/components/calculated-fields/components/related-entities-aggregation-configuration/related-entities-aggregation-component.component.ts @@ -120,7 +120,12 @@ export class RelatedEntitiesAggregationComponentComponent implements ControlValu takeUntilDestroyed() ).subscribe((value: CalculatedFieldRelatedAggregationConfiguration) => { this.updatedModel(value); - }) + }); + this.relatedAggregationConfiguration.get('output').valueChanges.pipe( + takeUntilDestroyed(), + ).subscribe(() => { + this.toggleScopeByOutputType(); + }); } validate(): ValidationErrors | null { @@ -158,4 +163,12 @@ export class RelatedEntitiesAggregationComponentComponent implements ControlValu value.scheduledUpdateInterval = this.minAllowedScheduledUpdateIntervalInSecForCF; this.propagateChange(value); } + + private toggleScopeByOutputType(): void { + if (this.relatedAggregationConfiguration.get('output').value.type === OutputType.Attribute) { + this.relatedAggregationConfiguration.get('useLatestTs').disable({emitEvent: false}); + } else { + this.relatedAggregationConfiguration.get('useLatestTs').enable({emitEvent: false}); + } + } } diff --git a/ui-ngx/src/app/modules/home/pages/admin/two-factor-auth-settings.component.html b/ui-ngx/src/app/modules/home/pages/admin/two-factor-auth-settings.component.html index 5ca1fa5a93..2da7097509 100644 --- a/ui-ngx/src/app/modules/home/pages/admin/two-factor-auth-settings.component.html +++ b/ui-ngx/src/app/modules/home/pages/admin/two-factor-auth-settings.component.html @@ -208,7 +208,7 @@ - {{ 'admin.2fa.verification-code-check-rate-limit' | translate }}