Browse Source

Refactoring

pull/4108/head
Thomas Kaul 8 months ago
parent
commit
971ba27619
  1. 4
      apps/api/src/app/portfolio/portfolio.controller.ts
  2. 2
      apps/client/src/app/pages/portfolio/x-ray/x-ray-page.component.ts

4
apps/api/src/app/portfolio/portfolio.controller.ts

@ -619,9 +619,7 @@ export class PortfolioController {
this.request.user.subscription.type === 'Basic' this.request.user.subscription.type === 'Basic'
) { ) {
for (const rule in report.rules) { for (const rule in report.rules) {
if (report.rules[rule]) { report.rules[rule] = null;
report.rules[rule] = [];
}
} }
} }

2
apps/client/src/app/pages/portfolio/x-ray/x-ray-page.component.ts

@ -134,7 +134,7 @@ export class XRayPageComponent {
let inactiveRules: PortfolioReportRule[] = []; let inactiveRules: PortfolioReportRule[] = [];
for (const category in rules) { for (const category in rules) {
const rulesArray = rules[category]; const rulesArray = rules[category] || [];
inactiveRules = inactiveRules.concat( inactiveRules = inactiveRules.concat(
rulesArray.filter(({ isActive }) => { rulesArray.filter(({ isActive }) => {

Loading…
Cancel
Save