diff --git a/apps/backoffice/src/app/features/license-review/pages/LicenseQueuePage.tsx b/apps/backoffice/src/app/features/license-review/pages/LicenseQueuePage.tsx index 9e1266813..5b965d8a5 100644 --- a/apps/backoffice/src/app/features/license-review/pages/LicenseQueuePage.tsx +++ b/apps/backoffice/src/app/features/license-review/pages/LicenseQueuePage.tsx @@ -89,13 +89,20 @@ const ALL_STATUSES: LicenseStatus[] = [ "REJECTED", ]; -/** - * Seafarer registrations are person-centric — there is no `companyName`, so - * the queue's "company" column falls back to the applicant name captured in - * the registration form. - */ +/** Licence types with no `companyName` — the queue's "company" column falls + * back to the applicant name captured in the form instead. */ +const APPLICANT_NAME_TYPE_KEYS = [ + "SEAFARER_REGISTRATION", + "CERTIFICATE_OF_COMPETENCY", + "CERTIFICATE_OF_PROFICIENCY", + "VESSEL_REGISTRATION", + "VESSEL_OWNERSHIP_TRANSFER", +]; + function applicantOrCompanyName(app: LicenseApplication): string | undefined { - if (app.licenseType?.key !== "SEAFARER_REGISTRATION") return app.companyName ?? undefined; + if (!app.licenseType?.key || !APPLICANT_NAME_TYPE_KEYS.includes(app.licenseType.key)) { + return app.companyName ?? undefined; + } const applicantName = (app.formData?.account as Record | undefined) ?.applicantName; return typeof applicantName === "string" && applicantName ? applicantName : undefined; @@ -396,7 +403,7 @@ export function LicenseQueuePage() { }, { header: sortableHeader( - typeCode === "SEAFARER_REGISTRATION" + typeCode && APPLICANT_NAME_TYPE_KEYS.includes(typeCode) ? t("queue.applicant", "Applicant") : t("queue.company", "Company"), "companyName",