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
parent
commit
2eabd95cb4
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 3
      apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.component.ts
  3. 12
      apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html

1
CHANGELOG.md

@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ### Changed
- Refactored the rounding logic in the holding detail dialog
- Refactored the rounding logic in the treemap chart component - Refactored the rounding logic in the treemap chart component
- Restricted the modification of activity tags in the impersonation mode - 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 - Hardened the endpoint of the public access for portfolio sharing by restricting it to public accesses

3
apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.component.ts

@ -77,7 +77,7 @@ import {
swapVerticalOutline, swapVerticalOutline,
walletOutline walletOutline
} from 'ionicons/icons'; } from 'ionicons/icons';
import { isNumber } from 'lodash'; import { isNumber, round } from 'lodash';
import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
import { switchMap } from 'rxjs/operators'; import { switchMap } from 'rxjs/operators';
@ -170,6 +170,7 @@ export class GfHoldingDetailDialogComponent implements OnInit {
protected quantity: number; protected quantity: number;
protected quantityPrecision = 2; protected quantityPrecision = 2;
protected reportDataGlitchMail: string; protected reportDataGlitchMail: string;
protected readonly round = round;
protected readonly routerLinkAdminControlMarketData = protected readonly routerLinkAdminControlMarketData =
internalRoutes.adminControl.subRoutes.marketData.routerLink; internalRoutes.adminControl.subRoutes.marketData.routerLink;
protected sectors: { protected sectors: {

12
apps/client/src/app/components/holding-detail-dialog/holding-detail-dialog.html

@ -118,8 +118,10 @@
i18n i18n
size="medium" size="medium"
[class.text-danger]=" [class.text-danger]="
marketPriceMin?.toFixed(2) === marketPrice?.toFixed(2) && round(marketPriceMin, marketPriceMinPrecision) ===
marketPriceMax?.toFixed(2) !== marketPriceMin?.toFixed(2) round(marketPrice, marketPricePrecision) &&
round(marketPriceMax, marketPriceMaxPrecision) !==
round(marketPriceMin, marketPriceMinPrecision)
" "
[isCurrency]="true" [isCurrency]="true"
[locale]="data.locale" [locale]="data.locale"
@ -134,8 +136,10 @@
i18n i18n
size="medium" size="medium"
[class.text-success]=" [class.text-success]="
marketPriceMax?.toFixed(2) === marketPrice?.toFixed(2) && round(marketPriceMax, marketPriceMaxPrecision) ===
marketPriceMax?.toFixed(2) !== marketPriceMin?.toFixed(2) round(marketPrice, marketPricePrecision) &&
round(marketPriceMax, marketPriceMaxPrecision) !==
round(marketPriceMin, marketPriceMinPrecision)
" "
[isCurrency]="true" [isCurrency]="true"
[locale]="data.locale" [locale]="data.locale"

Loading…
Cancel
Save