|
@ -249,13 +249,22 @@ export class AllocationsPageComponent implements OnDestroy, OnInit { |
|
|
public initializeAnalysisData() { |
|
|
public initializeAnalysisData() { |
|
|
this.initialize(); |
|
|
this.initialize(); |
|
|
|
|
|
|
|
|
for (const [id, { name, valueInBaseCurrency }] of Object.entries( |
|
|
for (const [ |
|
|
this.portfolioDetails.accounts |
|
|
id, |
|
|
)) { |
|
|
{ name, valueInBaseCurrency, valueInPercentage } |
|
|
|
|
|
] of Object.entries(this.portfolioDetails.accounts)) { |
|
|
|
|
|
let value = 0; |
|
|
|
|
|
|
|
|
|
|
|
if (this.hasImpersonationId) { |
|
|
|
|
|
value = valueInPercentage; |
|
|
|
|
|
} else { |
|
|
|
|
|
value = valueInBaseCurrency; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
this.accounts[id] = { |
|
|
this.accounts[id] = { |
|
|
id, |
|
|
id, |
|
|
name, |
|
|
name, |
|
|
value: valueInBaseCurrency |
|
|
value |
|
|
}; |
|
|
}; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|