refactor: enhance license configuration with per-type renewal windows, inspection requirements, and issuance policies

This commit is contained in:
estifanos
2026-09-07 08:59:21 +00:00
parent 10440238d1
commit a67a29ae79
22 changed files with 449 additions and 88 deletions

View File

@@ -292,7 +292,9 @@ export const licensingApi = baseApi
/**
* Opens or closes a type to new applications. Applications already in
* flight hold the type by id and keep running; only the portal
* catalogue changes.
* catalogue changes. Closing also notifies every holder, applicant and
* drafter of the type, and freezes their drafts — server-side, so the
* same happens whichever client flips it.
*/
updateLicenseStatus: builder.mutation<
LicenseType,

View File

@@ -39,6 +39,17 @@ export interface SeafarerDocument {
issuedAt: string | null;
rejectionReason: string | null;
createdAt: string;
/**
* Policy from the document's licence-type row, as configured on the
* backoffice Behaviour tab. Present on `/seafarer-documents/mine` so the
* portal shows the pickup step only for a type that has one, and offers
* Renew / Replace only inside the configured window — the same flags
* `/licenses/mine` carries for licences. Absent on older servers.
*/
requiresIssuanceScheduling?: boolean;
daysUntilExpiry?: number | null;
renewable?: boolean;
reissuable?: boolean;
}
export interface SeafarerDocumentApplicant {