diff --git a/apps/backoffice/src/app/features/license-review/pages/LicenseQueuePage.tsx b/apps/backoffice/src/app/features/license-review/pages/LicenseQueuePage.tsx index 6fe342639..f32d9ac4d 100644 --- a/apps/backoffice/src/app/features/license-review/pages/LicenseQueuePage.tsx +++ b/apps/backoffice/src/app/features/license-review/pages/LicenseQueuePage.tsx @@ -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, diff --git a/libs/api/src/lib/features/licensing/licensing.types.ts b/libs/api/src/lib/features/licensing/licensing.types.ts index c325fee17..651c52a09 100644 --- a/libs/api/src/lib/features/licensing/licensing.types.ts +++ b/libs/api/src/lib/features/licensing/licensing.types.ts @@ -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 {