feat(LicenseQueuePage): update sorting logic to prioritize claimedAt for "mine" view

This commit is contained in:
estifanos
2026-08-05 12:44:22 +00:00
parent cc70e271d2
commit a02cee1a78
2 changed files with 8 additions and 3 deletions

View File

@@ -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,

View File

@@ -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 {