mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-26 19:12:50 +00:00
feat(certificates): enhance eligibility checks for CoC/CoP application with tooltips and alerts
This commit is contained in:
@@ -91,6 +91,13 @@ export interface ProfileMeResponse {
|
||||
* `usePermissions()`.
|
||||
*/
|
||||
permissions?: string[];
|
||||
/**
|
||||
* Whether the profile can apply for a CoC/CoP right now: seafarer
|
||||
* registration approved, plus a verified sea service record and a
|
||||
* verified medical certificate. Computed server-side so the "Apply"
|
||||
* button and the API's own eligibility check can never disagree.
|
||||
*/
|
||||
eligibleForCoc: boolean;
|
||||
}
|
||||
|
||||
const profileApi = baseApi
|
||||
@@ -167,6 +174,7 @@ export function useCurrentProfile() {
|
||||
refetch,
|
||||
completeness: data?.completeness ?? 0,
|
||||
missing,
|
||||
eligibleForCoc: data?.eligibleForCoc ?? false,
|
||||
/**
|
||||
* True when nothing the requirement asks for is still blank. Unknown
|
||||
* profile (still loading) reads as not-ready, so a caller never submits
|
||||
|
||||
Reference in New Issue
Block a user