|
@ -40,6 +40,7 @@ export class PositionDetailDialog implements OnDestroy { |
|
|
public netPerformance: number; |
|
|
public netPerformance: number; |
|
|
public netPerformancePercent: number; |
|
|
public netPerformancePercent: number; |
|
|
public quantity: number; |
|
|
public quantity: number; |
|
|
|
|
|
public quantityPrecision = 2; |
|
|
public symbol: string; |
|
|
public symbol: string; |
|
|
public transactionCount: number; |
|
|
public transactionCount: number; |
|
|
|
|
|
|
|
@ -150,6 +151,18 @@ export class PositionDetailDialog implements OnDestroy { |
|
|
this.benchmarkDataItems[0].value = this.averagePrice; |
|
|
this.benchmarkDataItems[0].value = this.averagePrice; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (Number.isInteger(this.quantity)) { |
|
|
|
|
|
this.quantityPrecision = 0; |
|
|
|
|
|
} else if (assetSubClass === 'CRYPTOCURRENCY') { |
|
|
|
|
|
if (this.quantity < 1) { |
|
|
|
|
|
this.quantityPrecision = 7; |
|
|
|
|
|
} else if (this.quantity < 1000) { |
|
|
|
|
|
this.quantityPrecision = 5; |
|
|
|
|
|
} else if (this.quantity > 10000000) { |
|
|
|
|
|
this.quantityPrecision = 0; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
this.changeDetectorRef.markForCheck(); |
|
|
this.changeDetectorRef.markForCheck(); |
|
|
} |
|
|
} |
|
|
); |
|
|
); |
|
|