From 8e6e236a25ae17037dfeda8c00a61d1031c6ca2d Mon Sep 17 00:00:00 2001
From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com>
Date: Fri, 17 Apr 2026 08:20:00 +0200
Subject: [PATCH] Task/sort activity types alphabetically in activities table
component (#6736)
* Sort activity types alphabetically
* Update changelog
---
CHANGELOG.md | 1 +
.../lib/activities-table/activities-table.component.html | 2 +-
.../src/lib/activities-table/activities-table.component.ts | 7 +++++++
3 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5926bd4cc..6b8cd0648 100644
--- a/CHANGELOG.md
+++ b/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`
diff --git a/libs/ui/src/lib/activities-table/activities-table.component.html b/libs/ui/src/lib/activities-table/activities-table.component.html
index b8fe962d7..14089f061 100644
--- a/libs/ui/src/lib/activities-table/activities-table.component.html
+++ b/libs/ui/src/lib/activities-table/activities-table.component.html
@@ -5,7 +5,7 @@
Type
@for (
- activityType of activityTypesTranslationMap | keyvalue;
+ activityType of activityTypesTranslationMap | keyvalue: sortByValue;
track activityType.key
) {
diff --git a/libs/ui/src/lib/activities-table/activities-table.component.ts b/libs/ui/src/lib/activities-table/activities-table.component.ts
index ffc07f09c..766abcc23 100644
--- a/libs/ui/src/lib/activities-table/activities-table.component.ts
+++ b/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();