Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

Feature/add value to positions table (#484)

Thomas Kaulf6acf5207b5b
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 958a495300..8b50a6b470 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Added
+- Added the value column to the positions table
- Added support for cryptocurrency _Algorand_
### Changed
diff --git a/apps/client/src/app/components/positions-table/positions-table.component.html b/apps/client/src/app/components/positions-table/positions-table.component.html
index 6b07f013d8..69f09678c8 100644
--- a/apps/client/src/app/components/positions-table/positions-table.component.html
+++ b/apps/client/src/app/components/positions-table/positions-table.component.html
@@ -15,6 +15,27 @@
</td>
</ng-container>
+ <ng-container matColumnDef="value">
+ <th
+ *matHeaderCellDef
+ class="d-none d-lg-table-cell justify-content-end px-1"
+ i18n
+ mat-header-cell
+ mat-sort-header
+ >
+ Value
+ </th>
+ <td class="d-none d-lg-table-cell px-1" mat-cell *matCellDef="let element">
+ <div class="d-flex justify-content-end">
+ <gf-value
+ [isCurrency]="true"
+ [locale]="locale"
+ [value]="isLoading ? undefined : element.value"
+ ></gf-value>
+ </div>
+ </td>
+ </ng-container>
+
<ng-container matColumnDef="performance">
<th
*matHeaderCellDef
diff --git a/apps/client/src/app/components/positions-table/positions-table.component.ts b/apps/client/src/app/components/positions-table/positions-table.component.ts
index 8f287786c9..6bb8f1d0e1 100644
--- a/apps/client/src/app/components/positions-table/positions-table.component.ts
+++ b/apps/client/src/app/components/positions-table/positions-table.component.ts
@@ -70,6 +70,7 @@ export class PositionsTableComponent implements OnChanges, OnDestroy, OnInit {
public ngOnChanges() {
this.displayedColumns = [
'symbol',
+ 'value',
'performance',
'allocationInvestment',
'allocationCurrent'