diff --git a/CHANGELOG.md b/CHANGELOG.md index 1024336b3..648a4bfd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -188,6 +188,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 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 1c46e18db..13691292c 100644 --- a/libs/ui/src/lib/holdings-table/holdings-table.component.ts +++ b/libs/ui/src/lib/holdings-table/holdings-table.component.ts @@ -53,6 +53,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; @@ -72,15 +73,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');