Browse Source

refactoring

pull/12976/head
mpetrov 1 year ago
parent
commit
1cc03d63e2
  1. 7
      ui-ngx/src/app/modules/home/components/calculated-fields/calculated-fields-table-config.ts

7
ui-ngx/src/app/modules/home/components/calculated-fields/calculated-fields-table-config.ts

@ -263,7 +263,7 @@ export class CalculatedFieldsTableConfig extends EntityTableConfig<CalculatedFie
}
private updateImportedCalculatedField(calculatedField: CalculatedField): CalculatedField {
const updatedArguments = Object.keys(calculatedField.configuration.arguments).reduce((acc, key) => {
calculatedField.configuration.arguments = Object.keys(calculatedField.configuration.arguments).reduce((acc, key) => {
const arg = calculatedField.configuration.arguments[key];
acc[key] = arg.refEntityId?.entityType === ArgumentEntityType.Tenant
? { ...arg, refEntityId: { id: this.tenantId, entityType: ArgumentEntityType.Tenant } }
@ -271,10 +271,7 @@ export class CalculatedFieldsTableConfig extends EntityTableConfig<CalculatedFie
return acc;
}, {});
return {
...calculatedField,
configuration: { ...calculatedField.configuration, arguments: updatedArguments }
}
return calculatedField;
}
private onDebugConfigChanged(id: string, debugSettings: EntityDebugSettings): void {

Loading…
Cancel
Save