|
|
@ -55,11 +55,15 @@ export class AccountDetailDialog implements OnDestroy, OnInit { |
|
|
|
public balancePrecision = 2; |
|
|
|
public currency: string; |
|
|
|
public dataSource: MatTableDataSource<Activity>; |
|
|
|
public dividendInBaseCurrency: number; |
|
|
|
public dividendInBaseCurrencyPrecision = 2; |
|
|
|
public equity: number; |
|
|
|
public equityPrecision = 2; |
|
|
|
public hasPermissionToDeleteAccountBalance: boolean; |
|
|
|
public historicalDataItems: HistoricalDataItem[]; |
|
|
|
public holdings: PortfolioPosition[]; |
|
|
|
public interestInBaseCurrency: number; |
|
|
|
public interestInBaseCurrencyPrecision = 2; |
|
|
|
public isLoadingActivities: boolean; |
|
|
|
public isLoadingChart: boolean; |
|
|
|
public name: string; |
|
|
@ -184,6 +188,8 @@ export class AccountDetailDialog implements OnDestroy, OnInit { |
|
|
|
({ |
|
|
|
balance, |
|
|
|
currency, |
|
|
|
dividendInBaseCurrency, |
|
|
|
interestInBaseCurrency, |
|
|
|
name, |
|
|
|
platform, |
|
|
|
transactionCount, |
|
|
@ -200,6 +206,15 @@ export class AccountDetailDialog implements OnDestroy, OnInit { |
|
|
|
} |
|
|
|
|
|
|
|
this.currency = currency; |
|
|
|
this.dividendInBaseCurrency = dividendInBaseCurrency; |
|
|
|
|
|
|
|
if ( |
|
|
|
this.data.deviceType === 'mobile' && |
|
|
|
this.dividendInBaseCurrency >= |
|
|
|
NUMERICAL_PRECISION_THRESHOLD_6_FIGURES |
|
|
|
) { |
|
|
|
this.dividendInBaseCurrencyPrecision = 0; |
|
|
|
} |
|
|
|
|
|
|
|
if (isNumber(balance) && isNumber(value)) { |
|
|
|
this.equity = new Big(value).minus(balance).toNumber(); |
|
|
@ -214,6 +229,16 @@ export class AccountDetailDialog implements OnDestroy, OnInit { |
|
|
|
this.equity = null; |
|
|
|
} |
|
|
|
|
|
|
|
this.interestInBaseCurrency = interestInBaseCurrency; |
|
|
|
|
|
|
|
if ( |
|
|
|
this.data.deviceType === 'mobile' && |
|
|
|
this.interestInBaseCurrency >= |
|
|
|
NUMERICAL_PRECISION_THRESHOLD_6_FIGURES |
|
|
|
) { |
|
|
|
this.interestInBaseCurrencyPrecision = 0; |
|
|
|
} |
|
|
|
|
|
|
|
this.name = name; |
|
|
|
this.platformName = platform?.name ?? '-'; |
|
|
|
this.transactionCount = transactionCount; |
|
|
|