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'] { ): PortfolioReportResponse['statistics'] {
const rulesActiveCount = Object.values(evaluatedRules) const rulesActiveCount = Object.values(evaluatedRules)
.flat() .flat()
.filter(({ isActive }) => { .filter((rule) => {
return isActive === true; return rule?.isActive === true;
}).length; }).length;
const rulesFulfilledCount = Object.values(evaluatedRules) const rulesFulfilledCount = Object.values(evaluatedRules)
.flat() .flat()
.filter(({ value }) => { .filter((rule) => {
return value === true; return rule?.value === true;
}).length; }).length;
return { rulesActiveCount, rulesFulfilledCount }; return { rulesActiveCount, rulesFulfilledCount };

Loading…
Cancel
Save