Browse Source

Feature/sort the holdings table by performance in descending order by default

pull/8242/head
mister-ideas 5 days ago
parent
commit
67f231bc14
  1. 1
      CHANGELOG.md
  2. 4
      libs/ui/src/lib/holdings-table/holdings-table.component.html
  3. 11
      libs/ui/src/lib/holdings-table/holdings-table.component.ts

1
CHANGELOG.md

@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ### Changed
- Improved the holdings table of the home overview by adding the sorting by name and performance - Improved the holdings table of the home overview by adding the sorting by name and performance
- Changed the default sorting of the holdings table to the performance in descending order
- Improved the usability of the activities page by eliminating the reload on canceling the import activities dialog - Improved the usability of the activities page by eliminating the reload on canceling the import activities dialog
- Improved the accessibility of the _Buy me a coffee_ button on the about page - Improved the accessibility of the _Buy me a coffee_ button on the about page
- Improved the accessibility of the entity logo component - Improved the accessibility of the entity logo component

4
libs/ui/src/lib/holdings-table/holdings-table.component.html

@ -5,8 +5,8 @@
matSort matSort
[class.simple]="mode() === 'simple'" [class.simple]="mode() === 'simple'"
[dataSource]="dataSource" [dataSource]="dataSource"
[matSortActive]="sortActive()" [matSortActive]="sortActive"
[matSortDirection]="sortDirection()" [matSortDirection]="sortDirection"
> >
<ng-container matColumnDef="icon" [sticky]="mode() === 'default'"> <ng-container matColumnDef="icon" [sticky]="mode() === 'default'">
<th *matHeaderCellDef class="px-1" mat-header-cell></th> <th *matHeaderCellDef class="px-1" mat-header-cell></th>

11
libs/ui/src/lib/holdings-table/holdings-table.component.ts

@ -101,15 +101,8 @@ export class GfHoldingsTableComponent {
return !this.holdings(); return !this.holdings();
}); });
protected readonly sortActive = computed(() => { protected readonly sortActive = 'netPerformancePercentWithCurrencyEffect';
return this.mode() === 'default' protected readonly sortDirection: SortDirection = 'desc';
? 'allocationInPercentage'
: 'assetProfile.name';
});
protected readonly sortDirection = computed<SortDirection>(() => {
return this.mode() === 'default' ? 'desc' : 'asc';
});
public constructor() { public constructor() {
this.dataSource.sortingDataAccessor = (holding, path) => { this.dataSource.sortingDataAccessor = (holding, path) => {

Loading…
Cancel
Save