Skip to content

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

Feature/add name to activities table (#1516)

Thomas Kaulc38ebec3be03
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 238e44e707..005f3950fd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -14,6 +14,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
+- Added the name to the symbol column in the activities table
- Combined the name and symbol column in the holdings table (former positions table)
## 1.218.0 - 2022-12-12
diff --git a/apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html b/apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
index 4004f077fa..c888ab9be7 100644
--- a/apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
+++ b/apps/client/src/app/components/position/position-detail-dialog/position-detail-dialog.html
@@ -223,7 +223,7 @@
[hasPermissionToOpenDetails]="false"
[locale]="data.locale"
[showActions]="false"
- [showSymbolColumn]="false"
+ [showNameColumn]="false"
(export)="onExport()"
></gf-activities-table>
</div>
diff --git a/libs/ui/src/lib/activities-table/activities-table.component.html b/libs/ui/src/lib/activities-table/activities-table.component.html
index 0945bbc041..2f11eb2e2e 100644
--- a/libs/ui/src/lib/activities-table/activities-table.component.html
+++ b/libs/ui/src/lib/activities-table/activities-table.component.html
@@ -83,26 +83,31 @@
<td *matFooterCellDef class="px-1" mat-footer-cell></td>
</ng-container>
- <ng-container matColumnDef="symbol">
+ <ng-container matColumnDef="nameWithSymbol">
<th
*matHeaderCellDef
class="px-1"
mat-header-cell
mat-sort-header="SymbolProfile.symbol"
>
- <ng-container i18n>Symbol</ng-container>
+ <ng-container i18n>Name</ng-container>
</th>
<td *matCellDef="let element" class="px-1" mat-cell>
<div class="d-flex align-items-center">
- <span *ngIf="isUUID(element.SymbolProfile.symbol); else symbol">
- {{ element.SymbolProfile.name }}
- </span>
- <ng-template #symbol>
- {{ element.SymbolProfile.symbol | gfSymbol }}
- </ng-template>
- <span *ngIf="element.isDraft" class="badge badge-secondary ml-1" i18n
- >Draft</span
- >
+ <div>
+ <span class="text-truncate">{{ element.SymbolProfile.name }}</span>
+ <span
+ *ngIf="element.isDraft"
+ class="badge badge-secondary ml-1"
+ i18n
+ >Draft</span
+ >
+ </div>
+ </div>
+ <div *ngIf="!isUUID(element.SymbolProfile.symbol)">
+ <small class="text-muted">{{
+ element.SymbolProfile.symbol | gfSymbol
+ }}</small>
</div>
</td>
<td *matFooterCellDef class="px-1" mat-footer-cell></td>
diff --git a/libs/ui/src/lib/activities-table/activities-table.component.ts b/libs/ui/src/lib/activities-table/activities-table.component.ts
index 7805527a39..0c05143f5e 100644
--- a/libs/ui/src/lib/activities-table/activities-table.component.ts
+++ b/libs/ui/src/lib/activities-table/activities-table.component.ts
@@ -41,7 +41,7 @@ export class ActivitiesTableComponent implements OnChanges, OnDestroy {
@Input() locale: string;
@Input() pageSize = DEFAULT_PAGE_SIZE;
@Input() showActions: boolean;
- @Input() showSymbolColumn = true;
+ @Input() showNameColumn = true;
@Output() activityDeleted = new EventEmitter<string>();
@Output() activityToClone = new EventEmitter<OrderWithAccount>();
@@ -86,7 +86,7 @@ export class ActivitiesTableComponent implements OnChanges, OnDestroy {
'count',
'date',
'type',
- 'symbol',
+ 'nameWithSymbol',
'quantity',
'unitPrice',
'fee',
@@ -98,9 +98,9 @@ export class ActivitiesTableComponent implements OnChanges, OnDestroy {
'actions'
];
- if (!this.showSymbolColumn) {
+ if (!this.showNameColumn) {
this.displayedColumns = this.displayedColumns.filter((column) => {
- return column !== 'symbol';
+ return column !== 'nameWithSymbol';
});
}