Feature/add units to x ray rule settings (#3926)
* Introduce unit * Update changelog
This commit is contained in:
parent
7f97168aa7
commit
144e5da753
@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
- Disabled the text hover effect in the chart of the holdings tab on the home page (experimental)
|
- Disabled the text hover effect in the chart of the holdings tab on the home page (experimental)
|
||||||
|
- Improved the usability to customize the rule thresholds in the _X-ray_ section by introducing units (experimental)
|
||||||
- Improved the language localization for German (`de`)
|
- Improved the language localization for German (`de`)
|
||||||
|
|
||||||
## 2.115.0 - 2024-10-14
|
## 2.115.0 - 2024-10-14
|
||||||
|
@ -81,7 +81,8 @@ export class AccountClusterRiskCurrentInvestment extends Rule<Settings> {
|
|||||||
threshold: {
|
threshold: {
|
||||||
max: 1,
|
max: 1,
|
||||||
min: 0,
|
min: 0,
|
||||||
step: 0.01
|
step: 0.01,
|
||||||
|
unit: '%'
|
||||||
},
|
},
|
||||||
thresholdMax: true
|
thresholdMax: true
|
||||||
};
|
};
|
||||||
|
@ -66,7 +66,8 @@ export class CurrencyClusterRiskCurrentInvestment extends Rule<Settings> {
|
|||||||
threshold: {
|
threshold: {
|
||||||
max: 1,
|
max: 1,
|
||||||
min: 0,
|
min: 0,
|
||||||
step: 0.01
|
step: 0.01,
|
||||||
|
unit: '%'
|
||||||
},
|
},
|
||||||
thresholdMax: true
|
thresholdMax: true
|
||||||
};
|
};
|
||||||
|
@ -48,7 +48,8 @@ export class FeeRatioInitialInvestment extends Rule<Settings> {
|
|||||||
threshold: {
|
threshold: {
|
||||||
max: 0.1,
|
max: 0.1,
|
||||||
min: 0,
|
min: 0,
|
||||||
step: 0.005
|
step: 0.0025,
|
||||||
|
unit: '%'
|
||||||
},
|
},
|
||||||
thresholdMax: true
|
thresholdMax: true
|
||||||
};
|
};
|
||||||
|
@ -6,11 +6,20 @@
|
|||||||
[ngClass]="{ 'd-none': !data.rule.configuration.thresholdMin }"
|
[ngClass]="{ 'd-none': !data.rule.configuration.thresholdMin }"
|
||||||
>
|
>
|
||||||
<h6 class="mb-0">
|
<h6 class="mb-0">
|
||||||
<ng-container i18n>Threshold Min</ng-container> ({{
|
<ng-container i18n>Threshold Min</ng-container>:
|
||||||
data.settings.thresholdMin?.toFixed(2)
|
@if (data.rule.configuration.threshold.unit === '%') {
|
||||||
}})
|
{{ data.settings.thresholdMin | percent: '1.2-2' }}
|
||||||
|
} @else {
|
||||||
|
{{ data.settings.thresholdMin }}
|
||||||
|
}
|
||||||
</h6>
|
</h6>
|
||||||
<label>{{ data.rule.configuration.threshold.min.toFixed(2) }}</label>
|
@if (data.rule.configuration.threshold.unit === '%') {
|
||||||
|
<label>{{
|
||||||
|
data.rule.configuration.threshold.min | percent: '1.2-2'
|
||||||
|
}}</label>
|
||||||
|
} @else {
|
||||||
|
<label>{{ data.rule.configuration.threshold.min }}</label>
|
||||||
|
}
|
||||||
<mat-slider
|
<mat-slider
|
||||||
name="thresholdMin"
|
name="thresholdMin"
|
||||||
[max]="data.rule.configuration.threshold.max"
|
[max]="data.rule.configuration.threshold.max"
|
||||||
@ -19,18 +28,33 @@
|
|||||||
>
|
>
|
||||||
<input matSliderThumb [(ngModel)]="data.settings.thresholdMin" />
|
<input matSliderThumb [(ngModel)]="data.settings.thresholdMin" />
|
||||||
</mat-slider>
|
</mat-slider>
|
||||||
<label>{{ data.rule.configuration.threshold.max.toFixed(2) }}</label>
|
@if (data.rule.configuration.threshold.unit === '%') {
|
||||||
|
<label>{{
|
||||||
|
data.rule.configuration.threshold.max | percent: '1.2-2'
|
||||||
|
}}</label>
|
||||||
|
} @else {
|
||||||
|
<label>{{ data.rule.configuration.threshold.max }}</label>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="w-100"
|
class="w-100"
|
||||||
[ngClass]="{ 'd-none': !data.rule.configuration.thresholdMax }"
|
[ngClass]="{ 'd-none': !data.rule.configuration.thresholdMax }"
|
||||||
>
|
>
|
||||||
<h6 class="mb-0">
|
<h6 class="mb-0">
|
||||||
<ng-container i18n>Threshold Max</ng-container> ({{
|
<ng-container i18n>Threshold Max</ng-container>:
|
||||||
data.settings.thresholdMax?.toFixed(2)
|
@if (data.rule.configuration.threshold.unit === '%') {
|
||||||
}})
|
{{ data.settings.thresholdMax | percent: '1.2-2' }}
|
||||||
|
} @else {
|
||||||
|
{{ data.settings.thresholdMax }}
|
||||||
|
}
|
||||||
</h6>
|
</h6>
|
||||||
<label>{{ data.rule.configuration.threshold.min.toFixed(2) }}</label>
|
@if (data.rule.configuration.threshold.unit === '%') {
|
||||||
|
<label>{{
|
||||||
|
data.rule.configuration.threshold.min | percent: '1.2-2'
|
||||||
|
}}</label>
|
||||||
|
} @else {
|
||||||
|
<label>{{ data.rule.configuration.threshold.min }}</label>
|
||||||
|
}
|
||||||
<mat-slider
|
<mat-slider
|
||||||
name="thresholdMax"
|
name="thresholdMax"
|
||||||
[max]="data.rule.configuration.threshold.max"
|
[max]="data.rule.configuration.threshold.max"
|
||||||
@ -39,7 +63,13 @@
|
|||||||
>
|
>
|
||||||
<input matSliderThumb [(ngModel)]="data.settings.thresholdMax" />
|
<input matSliderThumb [(ngModel)]="data.settings.thresholdMax" />
|
||||||
</mat-slider>
|
</mat-slider>
|
||||||
<label>{{ data.rule.configuration.threshold.max.toFixed(2) }}</label>
|
@if (data.rule.configuration.threshold.unit === '%') {
|
||||||
|
<label>{{
|
||||||
|
data.rule.configuration.threshold.max | percent: '1.2-2'
|
||||||
|
}}</label>
|
||||||
|
} @else {
|
||||||
|
<label>{{ data.rule.configuration.threshold.max }}</label>
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -4,6 +4,7 @@ export interface PortfolioReportRule {
|
|||||||
max: number;
|
max: number;
|
||||||
min: number;
|
min: number;
|
||||||
step: number;
|
step: number;
|
||||||
|
unit?: string;
|
||||||
};
|
};
|
||||||
thresholdMax?: boolean;
|
thresholdMax?: boolean;
|
||||||
thresholdMin?: boolean;
|
thresholdMin?: boolean;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user