mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-26 19:12:50 +00:00
feat(LicenseQueuePage): update sorting logic to prioritize claimedAt for "mine" view
This commit is contained in:
@@ -138,8 +138,12 @@ export function LicenseQueuePage() {
|
||||
licenseTypeId: pinnedTypeId ?? urlFilter.licenseTypeId,
|
||||
// No explicit sort in the URL or view → newest submissions first, so
|
||||
// the queue opens showing what most needs attention rather than
|
||||
// whatever order the backend happens to return.
|
||||
sortBy: urlFilter.sortBy ?? "submittedAt",
|
||||
// whatever order the backend happens to return. "Mine" sorts by
|
||||
// claimedAt instead — officers care when they picked it up, not when
|
||||
// it was originally submitted.
|
||||
sortBy:
|
||||
urlFilter.sortBy ??
|
||||
(activeView.id === "mine" ? "claimedAt" : "submittedAt"),
|
||||
sortDir: urlFilter.sortDir ?? "DESC",
|
||||
take: PAGE_SIZE,
|
||||
skip: (page - 1) * PAGE_SIZE,
|
||||
|
||||
@@ -306,7 +306,8 @@ export type QueueSortField =
|
||||
| 'applicationNumber'
|
||||
| 'companyName'
|
||||
| 'status'
|
||||
| 'dueAt';
|
||||
| 'dueAt'
|
||||
| 'claimedAt';
|
||||
|
||||
/** Row counts behind the queue's saved-view tabs. */
|
||||
export interface QueueCounts {
|
||||
|
||||
Reference in New Issue
Block a user