From 5a6a3579d1bdcbb4b16afc6dc603b7410027a12d Mon Sep 17 00:00:00 2001 From: estifanos Date: Mon, 7 Sep 2026 09:16:26 +0000 Subject: [PATCH] refactor: simplify assignment logic and remove bulk claim functionality from license queue page --- .../pages/LicenseQueuePage/index.tsx | 32 ++++--------------- 1 file changed, 7 insertions(+), 25 deletions(-) diff --git a/apps/backoffice/src/app/features/license-review/pages/LicenseQueuePage/index.tsx b/apps/backoffice/src/app/features/license-review/pages/LicenseQueuePage/index.tsx index bbdace8e0..a55c2c8fc 100644 --- a/apps/backoffice/src/app/features/license-review/pages/LicenseQueuePage/index.tsx +++ b/apps/backoffice/src/app/features/license-review/pages/LicenseQueuePage/index.tsx @@ -55,7 +55,6 @@ import { AmharicDatePicker, type AdvancedColumn, } from "@ema-platform/ui"; -import { LICENSE_PERMISSIONS, RequirePermission } from "@ema-platform/auth"; import { DEFAULT_VIEW, SAVED_VIEWS, @@ -404,13 +403,11 @@ export function LicenseQueuePage() { // "c" now opens the assign dialog on an undispatched row. Kept on the // same key: it is still "do the queue's primary action to this row", // and rebinding a shortcut officers have in their fingers costs more - // than the name mismatch. - if (isLogistics !== false && cursorRow && cursorRow.assignedOfficerId === null) - setAssignTarget(cursorRow); - // Only unclaimed rows on a claimable queue can be claimed; pressing c - // elsewhere is a no-op rather than an error the officer has to read. + // than the name mismatch. Only undispatched rows on a queue with an + // unclaimed pool qualify; pressing c elsewhere is a no-op rather than + // an error the officer has to read. if (claimable && cursorRow && cursorRow.assignedOfficerId === null) - handleClaim(cursorRow.id); + setAssignTarget(cursorRow); }, onEscape: () => setSelected([]), onHelp: () => setHelpOpen(true), @@ -475,12 +472,10 @@ export function LicenseQueuePage() { assigning, onAssign: setAssignTarget, onOpen: (id) => navigate(`/licence-review/${id}`), - // Non-logistics applications aren't dispatched off a shared queue (see - // `savedViewsForFamily`) — every row opens straight to Review. - assignable: isLogistics !== false, // Applications with no unclaimed pool (see `hasUnclaimedPool`) are - // never claimed — every row opens straight to Review. - claimable, + // never dispatched off a shared queue — every row opens straight to + // Review. + assignable: claimable, }), ], [ @@ -774,19 +769,6 @@ export function LicenseQueuePage() { > {t("queue.export", "Export CSV")} - {claimable && ( - - - - )}