Browse Source

Task/sort activity types alphabetically in activities table component (#6736)

* Sort activity types alphabetically

* Update changelog
main
Thomas Kaul 1 day ago
committed by GitHub
parent
commit
8e6e236a25
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 2
      libs/ui/src/lib/activities-table/activities-table.component.html
  3. 7
      libs/ui/src/lib/activities-table/activities-table.component.ts

1
CHANGELOG.md

@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Sorted the activity types alphabetically on the activities page (experimental)
- Upgraded `angular` from version `21.1.1` to `21.2.7`
- Upgraded `Nx` from version `22.5.3` to `22.6.4`
- Upgraded `yahoo-finance2` from version `3.13.2` to `3.14.0`

2
libs/ui/src/lib/activities-table/activities-table.component.html

@ -5,7 +5,7 @@
<mat-label i18n>Type</mat-label>
<mat-select multiple [formControl]="typesFilter">
@for (
activityType of activityTypesTranslationMap | keyvalue;
activityType of activityTypesTranslationMap | keyvalue: sortByValue;
track activityType.key
) {
<mat-option [value]="activityType.key">

7
libs/ui/src/lib/activities-table/activities-table.component.ts

@ -353,6 +353,13 @@ export class GfActivitiesTableComponent implements AfterViewInit, OnInit {
this.activityToUpdate.emit(aActivity);
}
public sortByValue(
a: { key: ActivityType; value: string },
b: { key: ActivityType; value: string }
) {
return a.value.localeCompare(b.value);
}
public toggleAllRows() {
if (this.areAllRowsSelected()) {
this.selectedRows.clear();

Loading…
Cancel
Save