Feature/add date of first activity to holdings (#1505)
* Add date of first activity * Update changelog
This commit is contained in:
@@ -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
|
||||
|
@@ -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');
|
||||
|
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user