- Created error context markdown files for failed tests in seafarer registration, detailing validation errors related to profile details.
- Added binary files (PNG, ZIP, WEBM) for test results, including snapshots and traces for debugging purposes.
- Updated test cases to include new error context and media files for better analysis of failures.
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>
/seafarer-registration had a page of its own that wrote the profile directly
and created no application at all. A "submitted" registration was therefore
never reviewed, never approved and never numbered — there was nothing for an
officer to open. The shared wizard, the review queue and the approval side
effects all already existed; only the route pointed away from them.
The page is deleted rather than repaired. It was a second wizard maintained
alongside the config-driven one, and the seed already describes every step it
was hand-rolling — including the physical characteristics and medical details
added this release, which it would not have known about. /seafarer-registration
now redirects, so navigation, deep links and the profile gate keep working.
Also adds Configuration -> Number Formats, for the shape of generated seafarer,
seaman book and BTC numbers. The sample is rendered by the server rather than
formatted here, so the preview cannot drift from what an approval will actually
generate, and asking for one never consumes a number.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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>
Two fixes surfaced by actual candidate-flow testing:
- Portal 'My registrations' always showed 'Take exam' regardless of whether
the candidate had already finished — clicking it just hit
attempt_already_submitted server-side. The registrations/mine response
now carries the attempt's status; the row shows a Completed/Time expired
badge once finished, or 'Resume exam' while still in progress, and only
invites a fresh start when there's genuinely nothing yet.
- Backoffice candidates panel: a Regrade button next to a SUBMITTED/EXPIRED
sitting, calling the new POST /exam-attempts/:id/regrade — the officer's
path to the same staff-triggered regrade, no SQL needed.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Print showed blank A/B/C/D fill-in lines for every CHOICE question instead
of the real options — the detail page never fetched option data at all
(GET /exams/:id?i=questions, no nested options), and the print template
hardcoded the blanks regardless. Now requests
?i=questions,questions.options and prints the real option text, falling
back to blank lines only when a question genuinely has none on record.
Also fixed the print-time cutting-point guard: it compared raw point sum
to cutting point regardless of evaluationMethod, wrongly blocking valid
low-point-sum PERCENTAGE papers from printing. Now branches the same way
RecordResultModal's grading preview already does, and surfaces the
matching backend validation error (paper_cannot_reach_cutting_point) added
server-side for the same reason.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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>
Options editor used a single toggle-based bilingual field (BilingualInput)
that swapped English/Amharic in place via a tiny, easy-to-miss button.
Authors were filling English only and never noticing Amharic was empty.
- QuestionOptionsEditor: show separate always-visible English/Amharic
TextInputs per option instead of the toggle field.
- BilingualInput (shared): for other callers still using the toggle,
add a tooltip and a red dot indicator when the hidden language is
empty, so the gap is visible without switching.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The approved single-page register -- with the detail modal that shows a
seafarer's full standing -- had been replaced by a three-file grid that
carried no profile view. That is why the seafarer profile appeared
missing from the backoffice entirely.
Restores his page and points it at /seafarer-registry. The list is
served whole and filtered in the browser: the filters are instant facets
over a page-sized list, and a round trip per keystroke would make the
search feel slower than the data it searches.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
/seafarer-registration was wrapped in RequireSeafarerProfile, which sends
an applicant with an incomplete profile to /profile first. That gate
belongs to the replacement design, where registration is filled in from
the profile. Mengestab's approved wizard asks for those same personal,
identity and contact details itself across its four steps, so the gate
bounced the applicant out before they ever saw the form -- which is why
the approved UI looked missing rather than merely unreachable.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Both listed hardcoded samples -- a CoC application permanently awaiting
examination, an endorsement from Greece. They now show the seafarer's
own certificates and applications.
Status badges are keyed by the workflow's own values rather than display
strings, so a status the map has not seen falls back to grey instead of
rendering colourless, and the label is derived from the status itself
rather than stored beside it where the two can disagree.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
These three carried hardcoded sample data -- a certificate expiring in
2026, a fully-ticked training list, an eligibility checklist that always
passed. They now read the portal endpoints and show the seafarer's own
record.
Expiry is taken from the server rather than recomputed in the browser:
it is the same figure the eligibility gate uses, and a client clock that
is wrong or in another timezone would otherwise show a seafarer a
different number than the officer sees. Eligibility likewise -- the
screen asks whether it may apply rather than deciding for itself, so it
cannot offer a button the API then refuses.
The seaman-book stepper is derived from the application's status instead
of a stored timeline, because the status is what the workflow actually
moves; a second record of the same journey would only drift out of step.
Status colours are keyed by the workflow's own values, so an unmapped
status falls back to grey rather than vanishing.
/medical and /basic-safety-training had no route at all -- both silently
fell through to the dashboard, which is why the pages looked unreachable
rather than merely unwired.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Restores three pages the current router imports that Mengestab's branch
never had -- MySeaRecordsPage, VesselTransferPage,
VesselRegistrationStatusPage -- from history, along with the vessel
mock module the status page reads.
Also fixes a dead comparison in VesselRegistrationPage: the block only
renders while a registration is *not* approved, so the nested
`status === 'Approved'` inside it is provably false and TypeScript
refuses it. Rendering behaviour is unchanged.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Copied verbatim from the pre-override branch so the approved screens are
recoverable at this exact commit before any wiring changes them.
Brings back the richer flows the client signed off: a four-step seafarer
registration wizard with bilingual inputs and an Ethiopic date picker,
the vessel-owner portal (its own register/login/dashboard), ownership
transfer, and the seaman book, certificate, medical and endorsement
screens.
Six of these pages already call an API; ten are mockups carrying
hardcoded data. Both are committed as-is here -- the wiring that follows
is a separate commit so the diff shows exactly what changed from what
the client approved.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Seafarer and vessel registration were filtered out of the operations
step by `requiresOperatorMode !== false`, so someone registering as a
seafarer or vessel owner landed on an onboarding screen that did not
describe them. Both now appear, grouped apart from the company modes:
declaring "I am a seafarer" is a different kind of statement from "my
company forwards freight".
The designer's preview was gated on the Handlebars source alone, which a
canvas layout does not have until the server compiles it on save -- so
the button was dead for exactly the designs the canvas exists for.
Editing looked broken rather than deliberately read-only: every seeded
template is PUBLISHED, and a published design is immutable because
certificates were issued from it. Says so, and offers the new-version
action that is the way forward.
Reviewing officers saw company, capital and staff tabs on seafarer
certificate applications, because PRESENTATION is keyed by the generic
licence keys and the fifty-odd rank-specific CoC/CoP keys fell through
to the company default. Matched by prefix instead, so a certificate
configured tomorrow gets the right presentation without a code change.
Seaman book and BTC are wired to the newly seeded licence types and no
longer marked "soon".
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
- Implemented ExamStageActions component to manage actions related to exam booking and payment based on application status.
- Added mock-base-query for development, providing a partial mock backend for various API endpoints.
- Introduced mock-data for simulating responses in the mock-base-query, covering profiles, vessels, applications, licenses, exams, and notifications.