Feature/add date of first activity to holdings (#1505)

* Add date of first activity

* Update changelog
This commit is contained in:
Thomas Kaul
2022-12-11 10:19:35 +01:00
committed by GitHub
parent 7cd65eed39
commit 49dcade964
8 changed files with 36 additions and 1 deletions

View File

@@ -42,6 +42,26 @@
</td>
</ng-container>
<ng-container matColumnDef="dateOfFirstActivity">
<th
*matHeaderCellDef
class="d-none d-lg-table-cell justify-content-end px-1"
mat-header-cell
mat-sort-header
>
<ng-container i18n>First Activity</ng-container>
</th>
<td *matCellDef="let element" class="d-none d-lg-table-cell px-1" mat-cell>
<div class="d-flex justify-content-end">
<gf-value
[isDate]="element.dateOfFirstActivity ? true : false"
[locale]="locale"
[value]="element.dateOfFirstActivity ?? ''"
></gf-value>
</div>
</td>
</ng-container>
<ng-container matColumnDef="value">
<th
*matHeaderCellDef

View File

@@ -56,7 +56,7 @@ export class PositionsTableComponent implements OnChanges, OnDestroy, OnInit {
public ngOnInit() {}
public ngOnChanges() {
this.displayedColumns = ['icon', 'symbol', 'name'];
this.displayedColumns = ['icon', 'symbol', 'name', 'dateOfFirstActivity'];
if (this.hasPermissionToShowValues) {
this.displayedColumns.push('value');

View File

@@ -269,6 +269,12 @@ export class DataService {
response.holdings[symbol].assetSubClass = translate(
response.holdings[symbol].assetSubClass
);
response.holdings[symbol].dateOfFirstActivity = response.holdings[
symbol
].dateOfFirstActivity
? parseISO(response.holdings[symbol].dateOfFirstActivity)
: undefined;
}
}