diff --git a/CHANGELOG.md b/CHANGELOG.md index 1125cddad..b61d7e54a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +### Added + +- Added support for sorting in the accounts table + ### Changed - Improved the _Activities_ tab icon @@ -15,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed +- Fixed the activities sorting in the position detail dialog - Fixed a division by zero error in the cash positions calculation ## 1.213.0 - 14.11.2022 diff --git a/apps/client/src/app/app.module.ts b/apps/client/src/app/app.module.ts index b17a59437..b805a458f 100644 --- a/apps/client/src/app/app.module.ts +++ b/apps/client/src/app/app.module.ts @@ -10,6 +10,7 @@ import { MatNativeDateModule } from '@angular/material/core'; import { MatSnackBarModule } from '@angular/material/snack-bar'; +import { MatTooltipModule } from '@angular/material/tooltip'; import { BrowserModule } from '@angular/platform-browser'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { MaterialCssVarsModule } from 'angular-material-css-vars'; @@ -50,6 +51,7 @@ export function NgxStripeFactory(): string { }), MatNativeDateModule, MatSnackBarModule, + MatTooltipModule, NgxSkeletonLoaderModule, NgxStripeModule.forRoot(environment.stripePublicKey), ServiceWorkerModule.register('ngsw-worker.js', { diff --git a/apps/client/src/app/components/accounts-table/accounts-table.component.html b/apps/client/src/app/components/accounts-table/accounts-table.component.html index 3be8520dd..a1df7e2d5 100644 --- a/apps/client/src/app/components/accounts-table/accounts-table.component.html +++ b/apps/client/src/app/components/accounts-table/accounts-table.component.html @@ -1,4 +1,4 @@ -
+ |
|
@@ -88,8 +93,9 @@
|
|
@@ -122,8 +128,9 @@
|
@@ -158,6 +165,7 @@
*matHeaderCellDef
class="d-lg-none d-xl-none px-1 text-right"
mat-header-cell
+ mat-sort-header
>
|
diff --git a/apps/client/src/app/components/accounts-table/accounts-table.component.ts b/apps/client/src/app/components/accounts-table/accounts-table.component.ts
index 5e2e4886b..df5a1c589 100644
--- a/apps/client/src/app/components/accounts-table/accounts-table.component.ts
+++ b/apps/client/src/app/components/accounts-table/accounts-table.component.ts
@@ -6,8 +6,10 @@ import {
OnChanges,
OnDestroy,
OnInit,
- Output
+ Output,
+ ViewChild
} from '@angular/core';
+import { MatSort } from '@angular/material/sort';
import { MatTableDataSource } from '@angular/material/table';
import { Router } from '@angular/router';
import { Account as AccountModel } from '@prisma/client';
@@ -32,6 +34,8 @@ export class AccountsTableComponent implements OnChanges, OnDestroy, OnInit {
@Output() accountDeleted = new EventEmitter
---|