mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-26 13:02:50 +00:00
fixes on backoffice for endorcement
This commit is contained in:
@@ -358,6 +358,18 @@ export function resolveActions(ctx: ResolveContext): ResolvedAction[] {
|
|||||||
if (action.id === 'schedule-inspection' && ctx.hasPendingInspection) return [];
|
if (action.id === 'schedule-inspection' && ctx.hasPendingInspection) return [];
|
||||||
if (action.id === 'record-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 => ({
|
const disabled = (reason: string): ResolvedAction => ({
|
||||||
...action,
|
...action,
|
||||||
enabled: false,
|
enabled: false,
|
||||||
|
|||||||
@@ -85,7 +85,13 @@ export const DEFAULT_VIEW: SavedViewId = 'unassigned';
|
|||||||
* even though the family kind is DOCUMENT because the certificate they produce
|
* even though the family kind is DOCUMENT because the certificate they produce
|
||||||
* is a document rather than a licence.
|
* 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?
|
* Does this queue have an unclaimed pool to triage?
|
||||||
|
|||||||
Reference in New Issue
Block a user