From 2f7dd4e093c898a13ea016c8d7e5929ca13d1541 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADn?= Date: Sat, 27 Sep 2025 16:31:56 +0200 Subject: [PATCH 1/2] Feature/add isClosedHoldings input to holdings table and update displayed columns logic --- .../src/app/components/home-holdings/home-holdings.html | 1 + .../src/lib/holdings-table/holdings-table.component.ts | 9 ++++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/client/src/app/components/home-holdings/home-holdings.html b/apps/client/src/app/components/home-holdings/home-holdings.html index 8b4e4c5d3..5dfbd9456 100644 --- a/apps/client/src/app/components/home-holdings/home-holdings.html +++ b/apps/client/src/app/components/home-holdings/home-holdings.html @@ -50,6 +50,7 @@ [deviceType]="deviceType" [hasPermissionToShowQuantities]="false" [holdings]="holdings" + [isClosedHoldings]="holdingType === 'CLOSED'" [locale]="user?.settings?.locale" (holdingClicked)="onHoldingClicked($event)" /> diff --git a/libs/ui/src/lib/holdings-table/holdings-table.component.ts b/libs/ui/src/lib/holdings-table/holdings-table.component.ts index 89bb4a541..f7dc4be93 100644 --- a/libs/ui/src/lib/holdings-table/holdings-table.component.ts +++ b/libs/ui/src/lib/holdings-table/holdings-table.component.ts @@ -55,6 +55,7 @@ export class GfHoldingsTableComponent implements OnChanges, OnDestroy { @Input() hasPermissionToShowQuantities = true; @Input() hasPermissionToShowValues = true; @Input() holdings: PortfolioPosition[]; + @Input() isClosedHoldings = false; @Input() locale = getLocale(); @Input() pageSize = Number.MAX_SAFE_INTEGER; @@ -74,15 +75,17 @@ export class GfHoldingsTableComponent implements OnChanges, OnDestroy { public ngOnChanges() { this.displayedColumns = ['icon', 'nameWithSymbol', 'dateOfFirstActivity']; - if (this.hasPermissionToShowQuantities) { + if (this.hasPermissionToShowQuantities && !this.isClosedHoldings) { this.displayedColumns.push('quantity'); } - if (this.hasPermissionToShowValues) { + if (this.hasPermissionToShowValues && !this.isClosedHoldings) { this.displayedColumns.push('valueInBaseCurrency'); } - this.displayedColumns.push('allocationInPercentage'); + if (!this.isClosedHoldings) { + this.displayedColumns.push('allocationInPercentage'); + } if (this.hasPermissionToShowValues) { this.displayedColumns.push('performance'); From 22093c6591ca045f992c10a8bba8ec18246ec078 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Germ=C3=A1n=20Mart=C3=ADn?= Date: Sat, 27 Sep 2025 16:44:40 +0200 Subject: [PATCH 2/2] Edit changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index bdb7ea502..b69d20bbe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed - Removed the deprecated `ITEM` activity type +- Removed unneeded columns in holdings table for closed view ## 2.202.0 - 2025-09-26