|
|
@ -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 };
|
|
|
|