Feature/improve usability of X-ray page by hiding empty rule categories (#4108)

* Hide empty rule categories

* Update changelog
pull/4124/head
Thomas Kaul 1 week ago committed by GitHub
parent 6ad9661d7f
commit 943ff2f0dc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ### Changed
- Improved the usability of the _X-ray_ page by hiding empty rule categories
- Improved the language localization for German (`de`) - Improved the language localization for German (`de`)
## 2.128.0 - 2024-12-12 ## 2.128.0 - 2024-12-12

@ -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] = [];
}
} }
report.statistics = { report.statistics = {

@ -24,7 +24,12 @@
<ng-container i18n>rules align with your portfolio.</ng-container> <ng-container i18n>rules align with your portfolio.</ng-container>
} }
</p> </p>
<div class="mb-4"> <div
class="mb-4"
[ngClass]="{
'd-none': emergencyFundRules?.length === 0
}"
>
<h4 class="align-items-center d-flex m-0"> <h4 class="align-items-center d-flex m-0">
<span i18n>Emergency Fund</span> <span i18n>Emergency Fund</span>
@if (user?.subscription?.type === 'Basic') { @if (user?.subscription?.type === 'Basic') {
@ -43,7 +48,12 @@
(rulesUpdated)="onRulesUpdated($event)" (rulesUpdated)="onRulesUpdated($event)"
/> />
</div> </div>
<div class="mb-4"> <div
class="mb-4"
[ngClass]="{
'd-none': currencyClusterRiskRules?.length === 0
}"
>
<h4 class="align-items-center d-flex m-0"> <h4 class="align-items-center d-flex m-0">
<span i18n>Currency Cluster Risks</span> <span i18n>Currency Cluster Risks</span>
@if (user?.subscription?.type === 'Basic') { @if (user?.subscription?.type === 'Basic') {
@ -62,7 +72,12 @@
(rulesUpdated)="onRulesUpdated($event)" (rulesUpdated)="onRulesUpdated($event)"
/> />
</div> </div>
<div class="mb-4"> <div
class="mb-4"
[ngClass]="{
'd-none': accountClusterRiskRules?.length === 0
}"
>
<h4 class="align-items-center d-flex m-0"> <h4 class="align-items-center d-flex m-0">
<span i18n>Account Cluster Risks</span> <span i18n>Account Cluster Risks</span>
@if (user?.subscription?.type === 'Basic') { @if (user?.subscription?.type === 'Basic') {
@ -81,7 +96,12 @@
(rulesUpdated)="onRulesUpdated($event)" (rulesUpdated)="onRulesUpdated($event)"
/> />
</div> </div>
<div class="mb-4"> <div
class="mb-4"
[ngClass]="{
'd-none': economicMarketClusterRiskRules?.length === 0
}"
>
<h4 class="align-items-center d-flex m-0"> <h4 class="align-items-center d-flex m-0">
<span i18n>Economic Market Cluster Risks</span> <span i18n>Economic Market Cluster Risks</span>
@if (user?.subscription?.type === 'Basic') { @if (user?.subscription?.type === 'Basic') {
@ -100,7 +120,12 @@
(rulesUpdated)="onRulesUpdated($event)" (rulesUpdated)="onRulesUpdated($event)"
/> />
</div> </div>
<div class="mb-4"> <div
class="mb-4"
[ngClass]="{
'd-none': feeRules?.length === 0
}"
>
<h4 class="align-items-center d-flex m-0"> <h4 class="align-items-center d-flex m-0">
<span i18n>Fees</span> <span i18n>Fees</span>
@if (user?.subscription?.type === 'Basic') { @if (user?.subscription?.type === 'Basic') {

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