From c60909b142e638549dff0a7531b3fbc066ab2821 Mon Sep 17 00:00:00 2001 From: mpetrov Date: Mon, 3 Feb 2025 18:21:43 +0200 Subject: [PATCH] current tenant fix --- .../panel/calculated-field-argument-panel.component.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui-ngx/src/app/modules/home/components/calculated-fields/components/panel/calculated-field-argument-panel.component.ts b/ui-ngx/src/app/modules/home/components/calculated-fields/components/panel/calculated-field-argument-panel.component.ts index 0bda346725..60d79d7bd6 100644 --- a/ui-ngx/src/app/modules/home/components/calculated-fields/components/panel/calculated-field-argument-panel.component.ts +++ b/ui-ngx/src/app/modules/home/components/calculated-fields/components/panel/calculated-field-argument-panel.component.ts @@ -19,7 +19,8 @@ import { TbPopoverComponent } from '@shared/components/popover.component'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; import { charsWithNumRegex, noLeadTrailSpacesRegex } from '@shared/models/regex.constants'; import { - ArgumentEntityType, ArgumentEntityTypeParamsMap, + ArgumentEntityType, + ArgumentEntityTypeParamsMap, ArgumentEntityTypeTranslations, ArgumentType, ArgumentTypeTranslations, @@ -117,6 +118,9 @@ export class CalculatedFieldArgumentPanelComponent implements OnInit { saveArgument(): void { const { refEntityId, ...restConfig } = this.argumentFormGroup.value; const value = (refEntityId.entityType === ArgumentEntityType.Current ? restConfig : { refEntityId, ...restConfig }) as CalculatedFieldArgumentValue; + if (refEntityId.entityType === ArgumentEntityType.Tenant) { + refEntityId.id = this.tenantId; + } this.argumentsDataApplied.emit({ value, index: this.index }); }