Commit Graph

12 Commits

Author SHA1 Message Date
nati14575
ff47c7b0aa Add support for "BOTH" exam form type and update translations 2026-08-24 12:13:18 +03:00
Nati
e82714ba1f Enhance exam selection by displaying certification rank in options and remove admission number input from scheduling modal 2026-08-22 06:11:02 +00:00
Nati
21ffca9094 Merge branch 'WorkflowChange' of github.com:Tria-plc/emaui into WorkflowChange 2026-08-21 18:20:02 +00:00
Fistum
62492e957b backoffice 2026-08-21 13:09:40 +00:00
mihretue
cb3f945a2a fix(exam): cap cutting point input at 100 for Percentage evaluation
Matches the new backend rule. Field caps at 100 and shows a hint the
moment Percentage is selected, instead of letting you type 150 and only
finding out later.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-18 12:02:45 +00:00
mihretue
ae3af7777e fix(exam,result,question): kebab-icon action menus, status change as a picker
Two follow-ups on the dropdown-actions pass:
- All four action menus (exams, results, questions, candidates panel) now
  trigger off a plain three-dot icon button instead of a text 'Actions'
  button with a chevron.
- Exam status change no longer lists all six statuses flat in the dropdown
  (bad UX, looked like six always-visible options). 'Status' is now one
  menu item that opens a small picker modal (current status + a Select +
  Update) rather than the full edit form.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-18 11:46:16 +00:00
mihretue
f0443b84b1 fix(exam): lock the exam form to CHOICE when administration is Online
Matches the new backend rule (online_exam_requires_choice_form) — picking
Online in the exam form now auto-sets Form to Choice and disables that
field with an explanatory hint, instead of letting the user pick Essay
and only finding out at save time.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-17 17:20:16 +00:00
mihretue
8239d7ebe2 feat(exam,result): quick status action, per-row publish
Two UX gaps found in testing:

- Exams list: changing status (e.g. PENDING -> ACTIVE) required opening the
  full Edit modal for a one-field change. Added a status menu (teal toggle
  icon) directly in the row actions, calling PUT /exams/:id with just
  {status} — the backend DTO was already PartialType, nothing to change
  there.
- Exam Results: publishing required first picking the exam in a page-level
  filter to un-grey the header Publish button — not discoverable, and an
  extra step disconnected from the row you actually care about. Added a
  Publish action directly on any APPROVED result's row, confirm-gated since
  it publishes every approved result for that exam (not just the one row)
  and notifies every candidate. The header filter+button still works too,
  for publishing a batch at once.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-17 12:20:21 +00:00
mihretue
4f692c6bcf fix(exam): stop Create/Update Exam form from silently failing to submit
Three bugs compounded into a button that looked unwired:

- cuttingPoint carried a native HTML required attribute while sitting on
  the hidden Settings tab (Mantine keeps inactive tab panels mounted with
  display:none). The browser blocked form submission entirely, silently
  - no toast, no error, nothing. Replaced required with withAsterisk and
  moved validation into JS.
- Manual required-field validation never checked type/form/adminMethod/
  evalMethod/cuttingPoint at all, so even without the native block above
  a half-filled Settings tab would silently no-op. Validation now covers
  every required field on both tabs and switches to whichever tab has
  the problem.
- Filling only the English Direction field (leaving Amharic blank) passed
  frontend validation but the backend hard-rejects it, producing a 400
  with a confusing error. Frontend now requires both-or-neither, matching
  the same rule already applied to MCQ options.

Also translates the previously hardcoded validation message in both
locales.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-17 08:48:32 +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