diff --git a/apps/backoffice/src/app/features/license-review/config/actions.ts b/apps/backoffice/src/app/features/license-review/config/actions.ts index 2ce63ea65..6a5bf7118 100644 --- a/apps/backoffice/src/app/features/license-review/config/actions.ts +++ b/apps/backoffice/src/app/features/license-review/config/actions.ts @@ -358,6 +358,18 @@ export function resolveActions(ctx: ResolveContext): ResolvedAction[] { if (action.id === 'schedule-inspection' && ctx.hasPendingInspection) return []; if (action.id === 'record-inspection' && !ctx.hasPendingInspection) return []; + // The transition table doesn't know which types need an inspection, so + // `availableEvents` lists approve-documents at UNDER_EVALUATION even for + // types without one — where the server refuses it + // (`inspection_not_required_use_final_approve`). Final Approve is the + // real action there; don't render its dead twin. + if ( + action.id === 'approve-documents' && + !app.licenseType?.inspectionRequired + ) { + return []; + } + const disabled = (reason: string): ResolvedAction => ({ ...action, enabled: false, diff --git a/apps/backoffice/src/app/features/license-review/queue-views.ts b/apps/backoffice/src/app/features/license-review/queue-views.ts index 6b167779b..42e9d0eb3 100644 --- a/apps/backoffice/src/app/features/license-review/queue-views.ts +++ b/apps/backoffice/src/app/features/license-review/queue-views.ts @@ -85,7 +85,13 @@ export const DEFAULT_VIEW: SavedViewId = 'unassigned'; * even though the family kind is DOCUMENT because the certificate they produce * is a document rather than a licence. */ -const CLAIMABLE_NON_LOGISTICS = new Set(['VESSEL_REGISTRATION']); +const CLAIMABLE_NON_LOGISTICS = new Set([ + 'VESSEL_REGISTRATION', + // Endorsements run the standard claim-first workflow: applications arrive + // unassigned and an officer claims them, even though the family kind is + // CERTIFICATE. + 'ENDORSEMENT_SEAFARER', +]); /** * Does this queue have an unclaimed pool to triage?