Browse Source
Task/refactor rounding logic in holding detail dialog (#7199)
* Refactor rounding logic
* Update changelog
pull/7211/head
Thomas Kaul
2 weeks ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with
11 additions and
5 deletions
-
CHANGELOG.md
-
apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.component.ts
-
apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html
|
|
|
@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 |
|
|
|
|
|
|
|
### Changed |
|
|
|
|
|
|
|
- Refactored the rounding logic in the holding detail dialog |
|
|
|
- Refactored the rounding logic in the treemap chart component |
|
|
|
- Restricted the modification of activity tags in the impersonation mode |
|
|
|
- Hardened the endpoint of the public access for portfolio sharing by restricting it to public accesses |
|
|
|
|
|
|
|
@ -77,7 +77,7 @@ import { |
|
|
|
swapVerticalOutline, |
|
|
|
walletOutline |
|
|
|
} from 'ionicons/icons'; |
|
|
|
import { isNumber } from 'lodash'; |
|
|
|
import { isNumber, round } from 'lodash'; |
|
|
|
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; |
|
|
|
import { switchMap } from 'rxjs/operators'; |
|
|
|
|
|
|
|
@ -170,6 +170,7 @@ export class GfHoldingDetailDialogComponent implements OnInit { |
|
|
|
protected quantity: number; |
|
|
|
protected quantityPrecision = 2; |
|
|
|
protected reportDataGlitchMail: string; |
|
|
|
protected readonly round = round; |
|
|
|
protected readonly routerLinkAdminControlMarketData = |
|
|
|
internalRoutes.adminControl.subRoutes.marketData.routerLink; |
|
|
|
protected sectors: { |
|
|
|
|
|
|
|
@ -118,8 +118,10 @@ |
|
|
|
i18n |
|
|
|
size="medium" |
|
|
|
[class.text-danger]=" |
|
|
|
marketPriceMin?.toFixed(2) === marketPrice?.toFixed(2) && |
|
|
|
marketPriceMax?.toFixed(2) !== marketPriceMin?.toFixed(2) |
|
|
|
round(marketPriceMin, marketPriceMinPrecision) === |
|
|
|
round(marketPrice, marketPricePrecision) && |
|
|
|
round(marketPriceMax, marketPriceMaxPrecision) !== |
|
|
|
round(marketPriceMin, marketPriceMinPrecision) |
|
|
|
" |
|
|
|
[isCurrency]="true" |
|
|
|
[locale]="data.locale" |
|
|
|
@ -134,8 +136,10 @@ |
|
|
|
i18n |
|
|
|
size="medium" |
|
|
|
[class.text-success]=" |
|
|
|
marketPriceMax?.toFixed(2) === marketPrice?.toFixed(2) && |
|
|
|
marketPriceMax?.toFixed(2) !== marketPriceMin?.toFixed(2) |
|
|
|
round(marketPriceMax, marketPriceMaxPrecision) === |
|
|
|
round(marketPrice, marketPricePrecision) && |
|
|
|
round(marketPriceMax, marketPriceMaxPrecision) !== |
|
|
|
round(marketPriceMin, marketPriceMinPrecision) |
|
|
|
" |
|
|
|
[isCurrency]="true" |
|
|
|
[locale]="data.locale" |
|
|
|
|