feat(i18n): add biometric-related translations and update navigation permissions

This commit is contained in:
nati14575
2026-08-28 14:38:56 +03:00
parent 5006e4685b
commit a66eef352c
6 changed files with 20 additions and 2 deletions

View File

@@ -88,6 +88,8 @@ export const am: Translations = {
btcQueue: "የBTC ወረፋ", btcQueue: "የBTC ወረፋ",
cocQueue: "የCoC ወረፋ", cocQueue: "የCoC ወረፋ",
copQueue: "የCoP ወረፋ", copQueue: "የCoP ወረፋ",
endorsementCocQueue: "የCoC እውቅና ወረፋ",
endorsementGocQueue: "የGOC እውቅና ወረፋ",
endorsementQueue: "የማስተያየት ወረፋ", endorsementQueue: "የማስተያየት ወረፋ",
vesselRegistrations: "የመርከብ ምዝገባ", vesselRegistrations: "የመርከብ ምዝገባ",
// vesselRegistrationReport: 'የምዝገባ ሪፖርት', // vesselRegistrationReport: 'የምዝገባ ሪፖርት',

View File

@@ -88,6 +88,8 @@ export const en = {
postWaiverQueue: 'Post-Waiver Queue', postWaiverQueue: 'Post-Waiver Queue',
cocQueue: 'CoC Queue', cocQueue: 'CoC Queue',
copQueue: 'CoP Queue', copQueue: 'CoP Queue',
endorsementCocQueue: 'CoC Endorsement Queue',
endorsementGocQueue: 'GOC Endorsement Queue',
endorsementQueue: 'Endorsement Queue', endorsementQueue: 'Endorsement Queue',
vesselRegistrations: 'Vessel Registration', vesselRegistrations: 'Vessel Registration',
vesselTransfers: 'Vessel Ownership Transfer', vesselTransfers: 'Vessel Ownership Transfer',

View File

@@ -42,6 +42,12 @@ const APPLICATION_QUEUE = [P.VIEW_APPLICATION_QUEUE, P.VIEW_APPLICATIONS];
*/ */
const SEAFARER_QUEUE = [P.VIEW_SEAFARER_REGISTRY, ...APPLICATION_QUEUE]; const SEAFARER_QUEUE = [P.VIEW_SEAFARER_REGISTRY, ...APPLICATION_QUEUE];
const BIOMETRIC_ENROLLMENT = [
P.ENROLL_BIOMETRICS,
P.VIEW_BIOMETRICS,
P.VIEW_SEAFARER_REGISTRY,
];
/** /**
* The backoffice information architecture. * The backoffice information architecture.
* *
@@ -149,7 +155,7 @@ export const NAV_SECTIONS: NavSection[] = [
to: "/biometric-enrollment", to: "/biometric-enrollment",
label: "nav.biometricEnrollment", label: "nav.biometricEnrollment",
icon: IconFingerprint, icon: IconFingerprint,
permissions: [P.ENROLL_BIOMETRICS, P.VIEW_BIOMETRICS], permissions: BIOMETRIC_ENROLLMENT,
}, },
{ {
to: "/seafarer-registrations", to: "/seafarer-registrations",

View File

@@ -53,6 +53,12 @@ import { BiometricEnrollmentPage } from '../features/biometric-enrollment/pages/
/** Any-of gate shared by every licence-type queue and its review workspace. */ /** Any-of gate shared by every licence-type queue and its review workspace. */
const APPLICATION_QUEUE = [P.VIEW_APPLICATION_QUEUE, P.VIEW_APPLICATIONS]; const APPLICATION_QUEUE = [P.VIEW_APPLICATION_QUEUE, P.VIEW_APPLICATIONS];
const BIOMETRIC_ENROLLMENT = [
P.ENROLL_BIOMETRICS,
P.VIEW_BIOMETRICS,
P.VIEW_SEAFARER_REGISTRY,
];
/** Route gate: same keys as the route's nav item in nav-config.ts. */ /** Route gate: same keys as the route's nav item in nav-config.ts. */
const guard = (anyOf: string[], element: ReactNode) => ( const guard = (anyOf: string[], element: ReactNode) => (
<RequirePermission anyOf={anyOf}>{element}</RequirePermission> <RequirePermission anyOf={anyOf}>{element}</RequirePermission>
@@ -101,7 +107,7 @@ const router = createBrowserRouter([
{ path: 'sea-service-verification', element: guard([P.VERIFY_SEAFARER_RECORDS], <SeaServiceVerificationPage />) }, { path: 'sea-service-verification', element: guard([P.VERIFY_SEAFARER_RECORDS], <SeaServiceVerificationPage />) },
{ path: 'payment-config', element: guard([P.VIEW_PAYMENTS], <PaymentConfigPage />) }, { path: 'payment-config', element: guard([P.VIEW_PAYMENTS], <PaymentConfigPage />) },
{ path: 'seafarer-registry', element: guard([P.VIEW_SEAFARER_REGISTRY], <SeafarerRegistryPage />) }, { path: 'seafarer-registry', element: guard([P.VIEW_SEAFARER_REGISTRY], <SeafarerRegistryPage />) },
{ path: 'biometric-enrollment', element: guard([P.ENROLL_BIOMETRICS, P.VIEW_BIOMETRICS], <BiometricEnrollmentPage />) }, { path: 'biometric-enrollment', element: guard(BIOMETRIC_ENROLLMENT, <BiometricEnrollmentPage />) },
// Seafarer registration is not a licence: own queue, own review. // Seafarer registration is not a licence: own queue, own review.
{ path: 'seafarer-registrations', element: guard(APPLICATION_QUEUE, <SeafarerRegistrationQueuePage />) }, { path: 'seafarer-registrations', element: guard(APPLICATION_QUEUE, <SeafarerRegistrationQueuePage />) },
{ path: 'seafarer-registrations/:id', element: guard(APPLICATION_QUEUE, <SeafarerRegistrationReviewPage />) }, { path: 'seafarer-registrations/:id', element: guard(APPLICATION_QUEUE, <SeafarerRegistrationReviewPage />) },

View File

@@ -59,6 +59,7 @@ export const am: Translations = {
seaRecords: 'የባህር መዝገቦቼ', seaRecords: 'የባህር መዝገቦቼ',
seaService: 'የባህር አገልግሎት', seaService: 'የባህር አገልግሎት',
medical: 'የሕክምና የምስክር ወረቀት', medical: 'የሕክምና የምስክር ወረቀት',
biometrics: 'ባዮሜትሪክ',
myApplication: 'ማመልከቻዬ', myApplication: 'ማመልከቻዬ',
certificates: 'የምስክር ወረቀቶች', certificates: 'የምስክር ወረቀቶች',
seamanBook: 'የመርከበኛ መጽሐፍ እና BTC', seamanBook: 'የመርከበኛ መጽሐፍ እና BTC',

View File

@@ -49,6 +49,7 @@ export const en = {
seaRecords: 'My Sea Records', seaRecords: 'My Sea Records',
seaService: 'Sea Service', seaService: 'Sea Service',
medical: 'Medical Certificate', medical: 'Medical Certificate',
biometrics: 'Biometrics',
myApplication: 'My Application', myApplication: 'My Application',
vesselRegistration: 'Vessel Registration', vesselRegistration: 'Vessel Registration',
vesselRegistrationDashboard: 'Vessel Registration Dashboard', vesselRegistrationDashboard: 'Vessel Registration Dashboard',