mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-09-07 23:35:43 +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,
|
licenseTypeId: pinnedTypeId ?? urlFilter.licenseTypeId,
|
||||||
// No explicit sort in the URL or view → newest submissions first, so
|
// No explicit sort in the URL or view → newest submissions first, so
|
||||||
// the queue opens showing what most needs attention rather than
|
// the queue opens showing what most needs attention rather than
|
||||||
// whatever order the backend happens to return.
|
// whatever order the backend happens to return. "Mine" sorts by
|
||||||
sortBy: urlFilter.sortBy ?? "submittedAt",
|
// 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",
|
sortDir: urlFilter.sortDir ?? "DESC",
|
||||||
take: PAGE_SIZE,
|
take: PAGE_SIZE,
|
||||||
skip: (page - 1) * PAGE_SIZE,
|
skip: (page - 1) * PAGE_SIZE,
|
||||||
|
|||||||
@@ -306,7 +306,8 @@ export type QueueSortField =
|
|||||||
| 'applicationNumber'
|
| 'applicationNumber'
|
||||||
| 'companyName'
|
| 'companyName'
|
||||||
| 'status'
|
| 'status'
|
||||||
| 'dueAt';
|
| 'dueAt'
|
||||||
|
| 'claimedAt';
|
||||||
|
|
||||||
/** Row counts behind the queue's saved-view tabs. */
|
/** Row counts behind the queue's saved-view tabs. */
|
||||||
export interface QueueCounts {
|
export interface QueueCounts {
|
||||||
|
|||||||
Reference in New Issue
Block a user