|
|
|
@ -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}); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|