Browse Source

Fix cash label (assetSubClassLabel)

pull/6783/head
Thomas Kaul 4 weeks ago
parent
commit
a7ca7aa42a
  1. 2
      libs/ui/src/lib/holdings-table/holdings-table.component.html
  2. 16
      libs/ui/src/lib/services/data.service.ts

2
libs/ui/src/lib/holdings-table/holdings-table.component.html

@ -26,7 +26,7 @@
<div class="text-truncate"> <div class="text-truncate">
{{ element.name }} {{ element.name }}
@if (element.name === element.symbol) { @if (element.name === element.symbol) {
<span>({{ element.assetSubClassLabel }})</span> <span>({{ element.assetProfile.assetSubClassLabel }})</span>
} }
</div> </div>
<div> <div>

16
libs/ui/src/lib/services/data.service.ts

@ -610,13 +610,11 @@ export class DataService {
map((response) => { map((response) => {
if (response.holdings) { if (response.holdings) {
for (const symbol of Object.keys(response.holdings)) { for (const symbol of Object.keys(response.holdings)) {
response.holdings[symbol].assetClassLabel = translate( response.holdings[symbol].assetProfile.assetClassLabel =
response.holdings[symbol].assetClass translate(response.holdings[symbol].assetProfile.assetClass);
);
response.holdings[symbol].assetSubClassLabel = translate( response.holdings[symbol].assetProfile.assetSubClassLabel =
response.holdings[symbol].assetSubClass translate(response.holdings[symbol].assetProfile.assetSubClass);
);
response.holdings[symbol].dateOfFirstActivity = response.holdings[ response.holdings[symbol].dateOfFirstActivity = response.holdings[
symbol symbol
@ -699,6 +697,12 @@ export class DataService {
map((response) => { map((response) => {
if (response.holdings) { if (response.holdings) {
for (const symbol of Object.keys(response.holdings)) { for (const symbol of Object.keys(response.holdings)) {
response.holdings[symbol].assetProfile.assetClassLabel =
translate(response.holdings[symbol].assetProfile.assetClass);
response.holdings[symbol].assetProfile.assetSubClassLabel =
translate(response.holdings[symbol].assetProfile.assetSubClass);
response.holdings[symbol].valueInBaseCurrency = isNumber( response.holdings[symbol].valueInBaseCurrency = isNumber(
response.holdings[symbol].valueInBaseCurrency response.holdings[symbol].valueInBaseCurrency
) )

Loading…
Cancel
Save