diff --git a/apps/api/src/app/portfolio/rules.service.ts b/apps/api/src/app/portfolio/rules.service.ts index 6c46db0a0..1d7acbd9d 100644 --- a/apps/api/src/app/portfolio/rules.service.ts +++ b/apps/api/src/app/portfolio/rules.service.ts @@ -25,13 +25,13 @@ export class RulesService { return { evaluation, value, - isActive: true, - key: rule.getKey(), - name: rule.getName(), - settings: { + configuration: { thresholdMax: isNumber(settings['thresholdMax']) ? true : false, thresholdMin: isNumber(settings['thresholdMin']) ? true : false - } as PortfolioReportRule['settings'] + } as PortfolioReportRule['configuration'], + isActive: true, + key: rule.getKey(), + name: rule.getName() }; } else { return { diff --git a/apps/client/src/app/components/rule/rule.component.html b/apps/client/src/app/components/rule/rule.component.html index 85dd3a490..aed14da63 100644 --- a/apps/client/src/app/components/rule/rule.component.html +++ b/apps/client/src/app/components/rule/rule.component.html @@ -64,8 +64,8 @@ @if ( rule?.isActive && - (rule?.settings.thresholdMax >= 0 || - rule?.settings.thresholdMin >= 0) + (rule?.configuration?.thresholdMax || + rule?.configuration?.thresholdMin) ) {