From bcdd529adad0b901ab0244f3cbeab95b1c2087c4 Mon Sep 17 00:00:00 2001 From: Raj Gupta <150777419+Raj-G07@users.noreply.github.com> Date: Sat, 27 Sep 2025 19:02:58 +0530 Subject: [PATCH] Suggested Changes --- CHANGELOG.md | 3 +-- .../app/components/admin-jobs/admin-jobs.component.ts | 11 ++++------- .../src/app/components/admin-jobs/admin-jobs.html | 2 +- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f83f4fcdd..a443aa2ef 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,10 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased -- Add sorting to job queue table - ### Added +- Added support for column sorting to the queue jobs table in the admin control panel - Added the symbol to the benchmark component - Added an option to configure the account column of the activities table component diff --git a/apps/client/src/app/components/admin-jobs/admin-jobs.component.ts b/apps/client/src/app/components/admin-jobs/admin-jobs.component.ts index f2a85d766..a4297239a 100644 --- a/apps/client/src/app/components/admin-jobs/admin-jobs.component.ts +++ b/apps/client/src/app/components/admin-jobs/admin-jobs.component.ts @@ -46,6 +46,7 @@ import { removeCircleOutline, timeOutline } from 'ionicons/icons'; +import { get } from 'lodash'; import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; import { Subject } from 'rxjs'; import { takeUntil } from 'rxjs/operators'; @@ -59,8 +60,8 @@ import { takeUntil } from 'rxjs/operators'; MatButtonModule, MatMenuModule, MatSelectModule, - MatTableModule, MatSortModule, + MatTableModule, NgxSkeletonLoaderModule, ReactiveFormsModule ], @@ -202,12 +203,8 @@ export class GfAdminJobsComponent implements OnDestroy, OnInit { .subscribe(({ jobs }) => { this.dataSource = new MatTableDataSource(jobs); this.dataSource.sort = this.sort; - - if (this.sort) { - this.sort.active = 'created'; - this.sort.direction = 'desc'; - } - + this.dataSource.sortingDataAccessor = get; + this.isLoading = false; this.changeDetectorRef.markForCheck(); diff --git a/apps/client/src/app/components/admin-jobs/admin-jobs.html b/apps/client/src/app/components/admin-jobs/admin-jobs.html index ca17405a6..9eab8d065 100644 --- a/apps/client/src/app/components/admin-jobs/admin-jobs.html +++ b/apps/client/src/app/components/admin-jobs/admin-jobs.html @@ -16,7 +16,7 @@ -