Feature/refactor X-ray summary (#4116)

* Refactor report statistics
pull/4118/head^2
Thomas Kaul 1 week ago committed by GitHub
parent 41eb9c56dd
commit 6341a6de6a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1677,14 +1677,14 @@ export class PortfolioService {
): PortfolioReportResponse['statistics'] {
const rulesActiveCount = Object.values(evaluatedRules)
.flat()
.filter(({ isActive }) => {
return isActive === true;
.filter((rule) => {
return rule?.isActive === true;
}).length;
const rulesFulfilledCount = Object.values(evaluatedRules)
.flat()
.filter(({ value }) => {
return value === true;
.filter((rule) => {
return rule?.value === true;
}).length;
return { rulesActiveCount, rulesFulfilledCount };

Loading…
Cancel
Save