Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍
TypeScript angularetffinancefintechghostfoliohacktoberfestinvestingnestjsosspersonal-financeportfolioprismasoftwarestocktrackertradingtypescriptwealth-managementweb
Task/sort activity types alphabetically in activities table component (#6736)
Thomas Kaul8e6e236a25ae
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 5926bd4cc0..6b8cd06484 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.htmlindex b8fe962d74..14089f0613 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 @@<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">diff --git a/libs/ui/src/lib/activities-table/activities-table.component.ts b/libs/ui/src/lib/activities-table/activities-table.component.tsindex ffc07f09c5..766abcc233 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();