fixes on backoffice for endorcement

This commit is contained in:
estifanos
2026-08-26 12:12:30 +00:00
parent 32ac18adc2
commit f20ed670de
2 changed files with 19 additions and 1 deletions

View File

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

View File

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