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
- 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 accessibility of the _Buy me a coffee_ button on the about page
- Improved the accessibility of the entity logo component

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

@ -5,8 +5,8 @@
matSort
[class.simple]="mode() === 'simple'"
[dataSource]="dataSource"
[matSortActive]="sortActive()"
[matSortDirection]="sortDirection()"
[matSortActive]="sortActive"
[matSortDirection]="sortDirection"
>
<ng-container matColumnDef="icon" [sticky]="mode() === 'default'">
<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();
});
protected readonly sortActive = computed(() => {
return this.mode() === 'default'
? 'allocationInPercentage'
: 'assetProfile.name';
});
protected readonly sortDirection = computed<SortDirection>(() => {
return this.mode() === 'default' ? 'desc' : 'asc';
});
protected readonly sortActive = 'netPerformancePercentWithCurrencyEffect';
protected readonly sortDirection: SortDirection = 'desc';
public constructor() {
this.dataSource.sortingDataAccessor = (holding, path) => {

Loading…
Cancel
Save