Browse Source

removes categoryName of interface, improves mergeInactiveRules

pull/5454/head
tobikugel 4 months ago
parent
commit
94f333cab4
  1. 2
      apps/client/src/app/components/rule/rule-settings-dialog/rule-settings-dialog.html
  2. 10
      apps/client/src/app/pages/portfolio/x-ray/x-ray-page.component.ts

2
apps/client/src/app/components/rule/rule-settings-dialog/rule-settings-dialog.html

@ -1,4 +1,4 @@
<div mat-dialog-title>{{ data.rule.categoryName }} › {{ data.rule.name }}</div> <div mat-dialog-title>{{ data.rule.name }}</div>
<div class="py-3" mat-dialog-content> <div class="py-3" mat-dialog-content>
@if ( @if (

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

@ -169,15 +169,9 @@ export class GfXRayPageComponent {
private mergeInactiveRules( private mergeInactiveRules(
categories: PortfolioReportResponse['xRay']['categories'] categories: PortfolioReportResponse['xRay']['categories']
): PortfolioReportRule[] { ): PortfolioReportRule[] {
let inactiveRules: PortfolioReportRule[] = []; const inactiveRules = categories.flatMap(
(category) => category.rules?.filter(({ isActive }) => !isActive) ?? []
for (const category of categories) {
inactiveRules = inactiveRules.concat(
category.rules.filter(({ isActive }) => {
return !isActive;
})
); );
}
return inactiveRules; return inactiveRules;
} }

Loading…
Cancel
Save