Feature/improve usability of holdings table (#3017)

* Improve usability

* Update changelog
This commit is contained in:
Thomas Kaul 2024-02-18 10:18:53 +01:00 committed by GitHub
parent ad42c0bf28
commit 448cea0b69
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 12 additions and 7 deletions

View File

@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ### Changed
- Improved the usability of the holdings table
- Improved the language localization for German (`de`) - Improved the language localization for German (`de`)
- Upgraded `ng-extract-i18n-merge` from version `2.9.1` to `2.10.0` - Upgraded `ng-extract-i18n-merge` from version `2.9.1` to `2.10.0`

View File

@ -77,6 +77,7 @@
<gf-holdings-table <gf-holdings-table
[baseCurrency]="user?.settings?.baseCurrency" [baseCurrency]="user?.settings?.baseCurrency"
[deviceType]="data.deviceType" [deviceType]="data.deviceType"
[hasPermissionToOpenDetails]="false"
[holdings]="holdings" [holdings]="holdings"
[locale]="user?.settings?.locale" [locale]="user?.settings?.locale"
/> />

View File

@ -132,6 +132,7 @@
<div class="col-lg"> <div class="col-lg">
<gf-holdings-table <gf-holdings-table
[deviceType]="deviceType" [deviceType]="deviceType"
[hasPermissionToOpenDetails]="false"
[hasPermissionToShowValues]="false" [hasPermissionToShowValues]="false"
[holdings]="holdings" [holdings]="holdings"
[pageSize]="7" [pageSize]="7"

View File

@ -137,12 +137,11 @@
mat-row mat-row
[ngClass]="{ [ngClass]="{
'cursor-pointer': 'cursor-pointer':
hasPermissionToShowValues && hasPermissionToOpenDetails &&
!ignoreAssetSubClasses.includes(row.assetSubClass) !ignoreAssetSubClasses.includes(row.assetSubClass)
}" }"
(click)=" (click)="
hasPermissionToShowValues && !ignoreAssetSubClasses.includes(row.assetSubClass) &&
!ignoreAssetSubClasses.includes(row.assetSubClass) &&
onOpenPositionDialog({ onOpenPositionDialog({
dataSource: row.dataSource, dataSource: row.dataSource,
symbol: row.symbol symbol: row.symbol

View File

@ -26,6 +26,7 @@ export class HoldingsTableComponent implements OnChanges, OnDestroy, OnInit {
@Input() baseCurrency: string; @Input() baseCurrency: string;
@Input() deviceType: string; @Input() deviceType: string;
@Input() hasPermissionToCreateActivity: boolean; @Input() hasPermissionToCreateActivity: boolean;
@Input() hasPermissionToOpenDetails = true;
@Input() hasPermissionToShowValues = true; @Input() hasPermissionToShowValues = true;
@Input() holdings: PortfolioPosition[]; @Input() holdings: PortfolioPosition[];
@Input() locale: string; @Input() locale: string;
@ -68,10 +69,12 @@ export class HoldingsTableComponent implements OnChanges, OnDestroy, OnInit {
} }
} }
public onOpenPositionDialog({ dataSource, symbol }: UniqueAsset): void { public onOpenPositionDialog({ dataSource, symbol }: UniqueAsset) {
this.router.navigate([], { if (this.hasPermissionToOpenDetails) {
queryParams: { dataSource, symbol, positionDetailDialog: true } this.router.navigate([], {
}); queryParams: { dataSource, symbol, positionDetailDialog: true }
});
}
} }
public onShowAllPositions() { public onShowAllPositions() {