Feature/add name to activities table (#1516)
* Add name to symbol column * Update changelog
This commit is contained in:
parent
2b8ab26e7e
commit
c38ebec3be
@ -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
|
||||
|
@ -223,7 +223,7 @@
|
||||
[hasPermissionToOpenDetails]="false"
|
||||
[locale]="data.locale"
|
||||
[showActions]="false"
|
||||
[showSymbolColumn]="false"
|
||||
[showNameColumn]="false"
|
||||
(export)="onExport()"
|
||||
></gf-activities-table>
|
||||
</div>
|
||||
|
@ -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>
|
||||
|
@ -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';
|
||||
});
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user