Commit Graph

153 Commits

Author SHA1 Message Date
mihretue
4edce751ee feat(exam): candidate exam-taking experience (Phase 4)
New portal feature apps/portal/src/app/features/exam-attempt/, following
the repo's existing folder convention (pages/<Page>/index.tsx, components/,
types/, hooks/ — matches the payments feature's hooks/ precedent):

- types/exam-attempt.ts — response/local-state shapes
- hooks/useExamAttempt.ts — all API orchestration: load (registration +
  attempt), start/resume, per-question autosave (immediate on MCQ select,
  debounced+flushed-on-navigation for essay text), local countdown seeded
  from the server's serverTime/remainingSeconds, submit, and resync from
  the server whenever a write is refused as expired/already-submitted
- components/ExamInstructions, ExamTimer, ExamQuestionNav,
  ExamQuestionDisplay, ExamCompletion — one concern per file, not a single
  page dump
- pages/ExamAttemptPage — thin view layer over the hook

Flow: /exams (existing) gets a 'Take exam' action on eligible registration
rows → /exams/:examId/take, which shows instructions before an attempt
exists, the live exam screen while IN_PROGRESS, and a no-score completion
screen once SUBMITTED/EXPIRED (never fabricates a result — grading
doesn't exist yet).

Security note: RequirePermission on the route and disabled inputs after
local timeout are UI conveniences only. Every save/submit is independently
re-checked by the backend's ownership + applyExpiry() on each call: a
client that skipped the UI entirely and hit the API directly would be
bound by exactly the same rules.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-14 09:17:09 +00:00
Nati
6852fc86c6 feat: implement permission-based access control across various pages and components
- Added RequirePermission component to manage access based on user permissions.
- Integrated permission checks in MySeaRecordsPage, SeafarerRegistrationPage, VesselRegistrationPage, WaiverPage, and PortalLayout.
- Updated router to enforce permissions for specific routes.
- Introduced PORTAL_PERMISSIONS and LICENSE_PERMISSIONS constants for consistent permission management.
- Enhanced usePermissions hook to fetch permissions from the server and determine access rights.
- Refactored UI components to conditionally render based on user permissions, improving security and user experience.
2026-08-13 12:58:11 +00:00
Nati
220ed2d018 Merge branch 'dev' of github.com:Tria-plc/emaui into Refactor
Resolved by unifying on the lib/data AdvancedTable (PR #10) as the canonical
table component: kept its API plus teammate i18n/feature work, kept the
folder-per-table structure (index.tsx + columns.tsx + actions.tsx) across all
27 tables, removed the parallel lib/table implementation, and fixed
pre-existing compile breaks in ExamDetailPage/QuestionAssigner/RecordResultModal.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-13 11:31:27 +00:00
Nati
2af9e60800 feat(vessel-registration): add vessel registration page with incident reporting and certificate download functionality
feat(waiver): implement waiver page with application tracking and letter download feature

feat(ui): introduce AdvancedTable component for enhanced table functionality across the application

chore: update package-lock.json to remove unnecessary dependencies
2026-08-13 09:11:50 +00:00
estifanos
31c52c02e0 feat: introduce useLocalized hook for bilingual value retrieval.(localization round 2)
- Added useLocalized hook to provide a stable function for retrieving bilingual values based on the current language.
- Updated various components across the portal and backoffice to utilize the new useLocalized hook for consistent bilingual label rendering.
- Refactored localized function in licensing.helpers to handle empty Amharic strings correctly.
- Enhanced localization handling in LicenseApplicationPage, ProfilePage, and other components to ensure proper language switching.
2026-08-12 11:31:20 +00:00
estifanos
7242f8425a feat: add internationalization support for WaiverPage with translations for English and Amharic 2026-08-12 11:04:47 +00:00
estifanos
9897a9bf78 feat: implement date display utility across various pages
- Added `useDateDisplayer` hook and `dateDisplayer` function to format dates consistently based on the user's language.
- Updated multiple components and pages in both backoffice and portal applications to utilize the new date display functionality, ensuring proper formatting for dates in lists, tables, and detail views.
- Introduced Ethiopian date formatting for Amharic language support.
- Refactored date handling in components such as ExamAppealsPage, ResultPage, SeafarerRegistryPage, and others to improve localization and user experience.
2026-08-12 10:22:39 +00:00
estifanos
d0bbfe30d1 feat: update MyApplicationsPage with AdvancedTable and add translations for table headers 2026-08-12 07:45:00 +00:00
estifanos
5aea4b1c9f feat: enhance MyApplicationsPage with segmented tabs and improved styling
- Added a new CSS module for MyApplicationsPage to style the segmented tab bar and clickable tiles.
- Implemented tab navigation for applications, licences, and apply sections, improving user experience.
- Introduced filtering options for applications, including search, status, and date range.
- Enhanced the display of application and licence information with new components and improved layout.
- Updated translations for the new features in both Amharic and English.
2026-08-12 07:37:53 +00:00
estifanos
0633ecc165 feat: implement applicant name fallback logic in licensing helpers and update MyApplicationsPage 2026-08-12 07:18:43 +00:00
estifanos
829dfed999 feat: add search and filter functionality to MyApplicationsPage 2026-08-12 07:15:21 +00:00
estifanos
7c3a25245f UI fixes 2026-08-11 11:48:09 +00:00
estifanos
d7ecc86177 fix: restore vessel transfer logic and update vessel selection component(uncommenting) 2026-08-11 11:10:14 +00:00
estifanos
deb650f22f fix: update DocumentSlots component to include optional mode and use requirement.id as key 2026-08-11 10:35:49 +00:00
estifanos
63ef5d8a49 fix: update sorting of required documents in DocumentSlots component. Revert 2026-08-11 10:23:53 +00:00
estifanos
3b63721268 fix: sort required document requirements by sortOrder in DocumentSlots component 2026-08-11 10:09:51 +00:00
estifanos
f388a63361 fix: update key prop in DocumentSlots component to use requirement.id 2026-08-11 10:04:19 +00:00
estifanos
41a5e96d6b feat: integrate AmharicDatePicker for date input in ConfigDrivenSection 2026-08-11 09:59:17 +00:00
estifanos
f0a933e1af feat: enhance EndorsementPage with eligibility checks and application management 2026-08-11 09:51:45 +00:00
estifanos
5c2d4e6b9e feat: update vessel ownership transfer routes and navigation for consistency 2026-08-11 08:23:00 +00:00
estifanos
2bb5c1cbfb feat: modify vessel transfer logic for testing purposes 2026-08-11 08:02:20 +00:00
estifanos
c538d0b8a2 feat: add VesselTransferPage for managing vessel ownership transfers 2026-08-11 07:57:12 +00:00
estifanos
4c30bdf803 feat: add onVesselSelected callback to ConfigDrivenSection for handling vessel selection 2026-08-11 07:54:06 +00:00
estifanos
8446b28549 feat: replace vessel selection with text input for testing purposes in ConfigDrivenSection 2026-08-11 07:39:13 +00:00
estifanos
0e8a82c518 feat: add vessel selection support in LicenseApplicationPage and ConfigDrivenSection 2026-08-11 07:36:48 +00:00
estifanos
948b68c7c0 feat: update vessel registration features and remove OwnershipTransferPage 2026-08-11 07:30:09 +00:00
estifanos
19afcc3403 feat: add nationality support with demonym in CountrySelect and related components 2026-08-10 12:28:31 +00:00
estifanos
849915d5db fixes 2026-08-10 12:21:05 +00:00
estifanos
2495cd4cb8 fixes 2026-08-10 12:19:04 +00:00
estifanos
47884831b2 feat: enhance nationality and national ID prefill logic in LicenseApplicationPage 2026-08-10 12:14:27 +00:00
estifanos
50aeaf4fa3 fix 2026-08-10 12:10:44 +00:00
estifanos
3b1630bf9a prefill 2026-08-10 12:06:45 +00:00
Estifo77
4fc73b0567 feat(i18n): update medical verification label to include sea service verification
fix(layouts): import baseApi in BackofficeLayout and PortalLayout for API state management

refactor(auth): remove clearCurrentProfile call on logout and improve cookie removal logic

chore(auth-storage): enhance cookie management with secure and sameSite attributes, and streamline cleanup process
2026-08-10 14:42:21 +03:00
Estifo77
1a0da134a5 Refactor MySeaRecordsPage to use AmharicDatePicker and update styles for better UX 2026-08-10 14:18:09 +03:00
Estifo77
c822e99052 Add AttachmentsModal and refactor MedicalVerificationPage with AdvancedTable integration 2026-08-10 13:06:54 +03:00
Estifo77
5701385b37 Revert "Replace TextInput with AmharicDatePicker for date fields in SeaServiceTab and MedicalTab"
This reverts commit 34ae207834.
2026-08-10 11:51:35 +03:00
estifanos
34ae207834 Replace TextInput with AmharicDatePicker for date fields in SeaServiceTab and MedicalTab 2026-08-10 08:25:37 +00:00
estifanos
fc28ef9960 Refactor SeaServiceTab and MedicalTab to use AdvancedTable for improved data handling and pagination 2026-08-10 08:21:53 +00:00
estifanos
02681fe9be Add maxDepth prop to LocationPicker and update AddressFormContent to limit cascading levels 2026-08-08 09:09:08 +00:00
estifanos
78e37bb90f Refactor LocationPicker to remove unused translation for sub-location and adjust level rendering logic 2026-08-08 09:06:12 +00:00
estifanos
cfc9bc1a93 fixes 2026-08-08 09:01:35 +00:00
estifanos
acca2eb097 fixes 2026-08-08 08:59:48 +00:00
Estifo77
afaea36ce2 Refactor address handling in ProfilePage and AddressFormContent to improve name parsing and address payload structure 2026-08-08 11:58:08 +03:00
estifanos
fbf948b3d3 Implement seafarer profile requirement gate to ensure complete profile before registration 2026-08-08 08:35:40 +00:00
Estifo77
1116e57a8d Refactor ProfilePage to remove unused API calls and optimize user data handling 2026-08-08 11:13:03 +03:00
Estifo77
938bc94ce0 Update ProfilePage to handle user updates more reliably and prevent race conditions 2026-08-08 11:00:33 +03:00
estifanos
fdcdd9fd13 Enhance AddressFormContent with additional ID types and update ProfilePage to optimize user profile update handling 2026-08-08 07:55:07 +00:00
estifanos
56de3727fa Refactor AddressFormContent and ProfilePage to integrate CountrySelect for nationality selection and update address payload handling 2026-08-08 07:40:33 +00:00
estifanos
451e9a7f35 Update AddressFormContent and ProfilePage to lock primary phone and email fields as account details 2026-08-08 07:36:04 +00:00
estifanos
85c9930363 Add address management features and improve validation
- Implement saveMyAddress mutation for updating user addresses.
- Enhance address validation schema with additional fields.
- Add error handling for location loading in LocationPicker.
- Update translations for loading errors in English and Amharic.
- Introduce phone number validation for Ethiopian formats.
- Refactor AddressFormContent to accommodate new address structure.
2026-08-08 07:32:33 +00:00