mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-26 19:12:50 +00:00
feat: Update permissions and labels for seafarer document review and navigation
This commit is contained in:
@@ -144,19 +144,19 @@ export function SeafarerDocumentReviewPage() {
|
|||||||
</div>
|
</div>
|
||||||
<Group gap="xs">
|
<Group gap="xs">
|
||||||
{(document.status === 'PAYMENT_PENDING' || document.status === 'PAID') && (
|
{(document.status === 'PAYMENT_PENDING' || document.status === 'PAID') && (
|
||||||
<RequirePermission anyOf={[LICENSE_PERMISSIONS.CONFIRM_PAYMENT]} hideOnly>
|
<RequirePermission anyOf={[LICENSE_PERMISSIONS.APPROVE_APPLICATION]} hideOnly>
|
||||||
<Button loading={confirming} onClick={() => run(() => confirmPayment(id).unwrap(), 'Payment confirmed')}>
|
<Button loading={confirming} onClick={() => run(() => confirmPayment(id).unwrap(), 'Payment confirmed')}>
|
||||||
Confirm payment
|
Confirm payment
|
||||||
</Button>
|
</Button>
|
||||||
</RequirePermission>
|
</RequirePermission>
|
||||||
)}
|
)}
|
||||||
{document.status === 'PAYMENT_CONFIRMED' && (
|
{document.status === 'PAYMENT_CONFIRMED' && (
|
||||||
<RequirePermission anyOf={[LICENSE_PERMISSIONS.SCHEDULE_ISSUANCE]} hideOnly>
|
<RequirePermission anyOf={[LICENSE_PERMISSIONS.APPROVE_APPLICATION]} hideOnly>
|
||||||
<Button onClick={() => setScheduleOpen(true)}>Schedule pickup</Button>
|
<Button onClick={() => setScheduleOpen(true)}>Schedule pickup</Button>
|
||||||
</RequirePermission>
|
</RequirePermission>
|
||||||
)}
|
)}
|
||||||
{(document.status === 'SCHEDULED' || document.status === 'PAYMENT_CONFIRMED') && (
|
{(document.status === 'SCHEDULED' || document.status === 'PAYMENT_CONFIRMED') && (
|
||||||
<RequirePermission anyOf={[LICENSE_PERMISSIONS.ISSUE_CERTIFICATE]} hideOnly>
|
<RequirePermission anyOf={[LICENSE_PERMISSIONS.APPROVE_APPLICATION]} hideOnly>
|
||||||
<Button color="teal" loading={issuing} onClick={() => run(() => issue(id).unwrap(), `${kindLabel} issued`)}>
|
<Button color="teal" loading={issuing} onClick={() => run(() => issue(id).unwrap(), `${kindLabel} issued`)}>
|
||||||
Issue
|
Issue
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ export const am: Translations = {
|
|||||||
seaRecords: 'የባህር መዝገቦቼ',
|
seaRecords: 'የባህር መዝገቦቼ',
|
||||||
myApplication: 'ማመልከቻዬ',
|
myApplication: 'ማመልከቻዬ',
|
||||||
certificates: 'የምስክር ወረቀቶች',
|
certificates: 'የምስክር ወረቀቶች',
|
||||||
seamanBook: 'የመርከበኛ መጽሐፍ',
|
seamanBook: 'የመርከበኛ መጽሐፍ እና BTC',
|
||||||
btc: 'መሠረታዊ ሥልጠና ምስክር ወረቀት',
|
btc: 'መሠረታዊ ሥልጠና ምስክር ወረቀት',
|
||||||
endorsements: 'ማረጋገጫዎች',
|
endorsements: 'ማረጋገጫዎች',
|
||||||
vesselRegistrations: 'የመርከብ ምዝገባ',
|
vesselRegistrations: 'የመርከብ ምዝገባ',
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ export const en = {
|
|||||||
mtoLicense: 'MTO License',
|
mtoLicense: 'MTO License',
|
||||||
waiver: 'Waiver',
|
waiver: 'Waiver',
|
||||||
certificates: 'Certificates',
|
certificates: 'Certificates',
|
||||||
seamanBook: 'Seaman Book',
|
seamanBook: 'SeamanBook and BTC',
|
||||||
btc: 'Basic Training Certificate',
|
btc: 'Basic Training Certificate',
|
||||||
endorsements: 'Endorsements',
|
endorsements: 'Endorsements',
|
||||||
vesselRegistrations: 'Vessel Registration',
|
vesselRegistrations: 'Vessel Registration',
|
||||||
|
|||||||
@@ -106,19 +106,13 @@ const NAV_SECTIONS: { label?: string; items: PortalNavItem[] }[] = [
|
|||||||
permissions: [P.VIEW_OWN_SEA_SERVICE, P.VIEW_OWN_MEDICAL],
|
permissions: [P.VIEW_OWN_SEA_SERVICE, P.VIEW_OWN_MEDICAL],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
// One page tracks both documents; the BTC needs no entry of its own.
|
||||||
to: "/seaman-book",
|
to: "/seaman-book",
|
||||||
label: "Seaman Book",
|
label: "SeamanBook and BTC",
|
||||||
i18nKey: "nav.seamanBook",
|
i18nKey: "nav.seamanBook",
|
||||||
icon: IconBook2,
|
icon: IconBook2,
|
||||||
permissions: [P.VIEW_OWN_SEA_SERVICE, P.VIEW_OWN_MEDICAL],
|
permissions: [P.VIEW_OWN_SEA_SERVICE, P.VIEW_OWN_MEDICAL],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
to: "/basic-training-certificate",
|
|
||||||
label: "Basic Training Certificate",
|
|
||||||
i18nKey: "nav.btc",
|
|
||||||
icon: IconShieldCheck,
|
|
||||||
permissions: [P.VIEW_OWN_CERTIFICATES],
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
to: "/certificates",
|
to: "/certificates",
|
||||||
label: "Certificates",
|
label: "Certificates",
|
||||||
@@ -197,7 +191,7 @@ const PAGE_META: Record<string, { i18nKey: string }> = {
|
|||||||
"/waiver": { i18nKey: "nav.waiver" },
|
"/waiver": { i18nKey: "nav.waiver" },
|
||||||
"/seafarer-registration": { i18nKey: "nav.seafarerRegistration" },
|
"/seafarer-registration": { i18nKey: "nav.seafarerRegistration" },
|
||||||
"/seafarer/records": { i18nKey: "nav.seaRecords" },
|
"/seafarer/records": { i18nKey: "nav.seaRecords" },
|
||||||
"/seaman-book": { i18nKey: "nav.myApplication" },
|
"/seaman-book": { i18nKey: "nav.seamanBook" },
|
||||||
"/basic-training-certificate": { i18nKey: "nav.btc" },
|
"/basic-training-certificate": { i18nKey: "nav.btc" },
|
||||||
"/certificates": { i18nKey: "nav.certificates" },
|
"/certificates": { i18nKey: "nav.certificates" },
|
||||||
"/exams": { i18nKey: "nav.exams" },
|
"/exams": { i18nKey: "nav.exams" },
|
||||||
|
|||||||
Reference in New Issue
Block a user