Commit Graph

561 Commits

Author SHA1 Message Date
mihretue
5ad43ba760 fix(exam): step the exam form instead of validating hidden tabs
Submitting from Basic Info complained that required fields on the Settings
tab were empty — a correct error the user could not act on, since Settings
had not been shown yet.

The primary action now reads "Next" while Basic Info is open and validates
only that tab before moving on; Create/Update appears on Settings, the final
step, alongside a Back button. Submit still checks both tabs, since the tab
headers stay clickable and a user can reach Settings without going through
Next.
2026-08-26 06:24:49 +00:00
mihretue
b49de1c1a8 fix(exam): guard question assignment once the paper is locked
The detail page fired assign/draw requests blind and surfaced the raw
backend key to the user — a locked paper showed up as the literal string
"paper_locked_after_registration" in a toast.

Manage Questions is now disabled once any candidate has registered, with a
tooltip and badge explaining why; both the manual assign and the random draw
live behind that modal, so one guard covers the same ground the backend's
assertPaperEditable does. The empty-paper alert now explains the deadlock
instead of telling the user to click a button that will fail, and both
error handlers translate paper_locked_after_registration in case someone
registers while the modal is open.

Registrations come from the query ExamCandidatesPanel already runs on this
page, so RTK Query serves it from cache rather than issuing a second request.
2026-08-24 14:04:24 +00:00
mihretue
34208ed0d6 feat(exam): show candidate answers + prefill auto-scores in RecordResultModal
Wires useGetGradingSheetQuery into the grading modal: a new 'Candidate's
Answer' column shows the selected option or essay text per question, and
whichever CHOICE scores auto-grading could already compute get prefilled
into the score inputs (tagged 'Auto-graded', still editable — the examiner
can override). Grading a mixed or ESSAY paper no longer means guessing at
what was answered or re-deriving the CHOICE portion by eye.

Degrades to blank inputs exactly as before for an OFFLINE candidate or one
who hasn't sat an online attempt (gradingSheet returns empty answers for
those, not an error).
2026-08-24 13:02:08 +00:00
mihretue
e0ed10b823 Merge remote-tracking branch 'origin/dev' into feature/exam-attempt-domain
# Conflicts:
#	apps/backoffice/src/app/features/exam/pages/ExamDetailPage.tsx
2026-08-24 12:59:11 +00:00
mihretue
35961ec809 feat(exam): let ONLINE exams take ESSAY/BOTH form, add grading-sheet API
Frontend half of the backend change: ExamPage no longer disables the
form Select or force-resets it to CHOICE when administrationMethod is
ONLINE (backend's assertOnlineIsChoiceOnly is gone, matching gate
removed here). Also wires up GET .../grading-sheet as
useGetGradingSheetQuery — RecordResultModal wiring (show candidate
answers, prefill auto-computed CHOICE scores) is next.
2026-08-24 12:57:37 +00:00
Nati Nigussie
60c93453a7 Merge pull request #27 from Tria-plc/WorkflowChange
Workflow change
2026-08-24 15:39:28 +03:00
Nati
4a3ad7c2e6 Merge branch 'WorkflowChange' of github.com:Tria-plc/emaui into WorkflowChange 2026-08-24 12:37:42 +00:00
Nati
294a8ded6c Refactor exam form handling to support mixed paper types and update related interfaces 2026-08-24 12:37:06 +00:00
mihretue
9f8f29d614 fix(exam): stop hiding non-CHOICE questions from OFFLINE assignment picker
eligibleQuestions filtered by q.form === exam.form, which matched the
backend's own restriction (assertUsable) only for ONLINE exams. Once
exam.form gained the "BOTH" value for OFFLINE mixed papers, no question
ever has form "BOTH", so the picker silently emptied out or, for a
plain CHOICE-form exam, looked CHOICE-only regardless of administration
method. Now mirrors the backend: CHOICE-only gate applies only when
administrationMethod is ONLINE.
2026-08-24 11:30:56 +00:00
mihretue
97ebff3b21 Merge remote-tracking branch 'origin/dev' into feature/exam-attempt-domain 2026-08-24 11:25:31 +00:00
Nati Nigussie
d03164f639 Merge pull request #26 from Tria-plc/WorkflowChange
Workflow change
2026-08-24 12:17:08 +03:00
nati14575
ff47c7b0aa Add support for "BOTH" exam form type and update translations 2026-08-24 12:13:18 +03:00
Nati
895690de80 Fix for rank selection 2026-08-24 08:20:13 +00:00
Nati
a84177cf12 Fix 2026-08-24 07:49:10 +00:00
Nati
302c0242dd Add rank selection and condition handling to certificate designer and requirements 2026-08-24 07:39:24 +00:00
Nati
1af7e90c21 Merge branch 'WorkflowChange' of github.com:Tria-plc/emaui into WorkflowChange 2026-08-24 06:13:50 +00:00
Nati
f973bff641 Add Rank and Department management to ConfigurationPage with new RankDepartmentTab 2026-08-24 06:13:43 +00:00
nati14575
ef45360fa7 Fix BASE_API_URL to use the correct default port for local development 2026-08-22 09:13:15 +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
c3977897b7 Add rankKey support to certification forms and exams
- Introduced rankKey field in Certification interface and payloads.
- Updated CertificationForm to handle rankKey input.
- Enhanced ScheduleExamModal to filter exams based on rank.
- Added getEligibleExams API query to fetch exams relevant to the application's rank.
- Updated related components and types to accommodate new rankKey functionality.
2026-08-21 19:10:01 +00:00
Nati
21ffca9094 Merge branch 'WorkflowChange' of github.com:Tria-plc/emaui into WorkflowChange 2026-08-21 18:20:02 +00:00
Nati
9f4954b5e8 UI 2026-08-21 18:17:52 +00:00
Nati Nigussie
584dc458b8 Merge pull request #20 from Tria-plc/feature/exam-attempt-domain
Feature/exam attempt domain
2026-08-21 21:08:13 +03:00
nati14575
53b8993c72 Merge branch 'WorkflowChange' of https://github.com/Tria-plc/emaui into feature/exam-attempt-domain 2026-08-21 21:04:34 +03:00
Nati
56cb22c7bd Merge branch 'ui_ux' of github.com:Tria-plc/emaui into WorkflowChange 2026-08-21 17:36:09 +00:00
Fistum
81d3ebdcd9 feat(dashboard): enhance dashboard with stat tiles for better data visualization 2026-08-21 13:33:07 +00:00
Fistum
62492e957b backoffice 2026-08-21 13:09:40 +00:00
Fistum
6b5b99f42d ui chnages 2026-08-21 11:16:22 +00:00
fitse-yotor
8f6ebdafb1 feat(a11y): add skip link for improved navigation accessibility 2026-08-21 12:34:00 +03:00
fitse-yotor
e74ef1c672 fix(i18n): render Amharic in an Ethiopic font
Both themes set `fontFamily: Inter`, and Inter carries no Ge'ez glyphs. So
every Amharic string in a bilingual system — 45-73 KB of locale data per app —
has been rendering in whatever font the OS happened to substitute: different on
Windows, macOS and Android, and matching neither the design nor each other.

Noto Sans Ethiopic goes directly after Inter in one stack rather than being
swapped in under `[lang='am']`. Browsers fall back per glyph, not per element,
so a single stack renders Latin in Inter and Ge'ez in Noto automatically —
including within one string. That is the case that matters here: a registry is
full of mixed-script lines like an Amharic name beside a Latin IMO number, and
a language-scoped swap renders half of those in the wrong face.

Heading line-heights go up a step at the same time. Ge'ez has taller ascenders
and deeper descenders than Latin, so headings set to Inter's natural leading
clip once Ethiopic is actually being rendered. This was deliberately held back
from the theme refactor so that change could prove it altered nothing.

The gallery gains Ge'ez headings and a mixed-script line, so the baselines
cover the case rather than only Latin.

Follow-up: both fonts still load from Google Fonts via a render-blocking CSS
@import. Self-hosting with a subset and preload links is worth doing —
government networks frequently make fonts.googleapis.com slow or unreachable,
and silent Amharic fallback is precisely the failure this commit fixes.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 12:20:49 +03:00
Estifanos Terefe
c62b061958 Merge pull request #21 from Tria-plc/estif-branch-1
Estif branch 1
2026-08-21 12:17:43 +03:00
Estifo77
1e3cd9fa02 Merge branch 'WorkflowChange' of https://github.com/Tria-plc/emaui into estif-branch-1 2026-08-21 12:17:20 +03:00
fitse-yotor
b63e07305a feat(theme): add semantic tokens, focus ring, and reduced-motion support
Adds the layer feature code has been missing: tokens that name a role — page
surface, subtle border, danger — instead of a colour. Every one resolves to a
Mantine variable rather than a literal, so they follow the colour scheme for
free and cannot drift from the theme. A parallel palette of raw hexes would
have recreated exactly the problem this exists to fix.

Also closes three accessibility gaps that had no implementation anywhere in the
codebase: no :focus-visible rule, no screen-reader-only utility, and no global
prefers-reduced-motion handling.

The focus work found a real bug, and nearly introduced a worse one. Mantine
already rings its own controls, so the first attempt deferred to it with
`outline: none` on .mantine-focus-auto. That suppressed Mantine's ring without
replacing it, leaving portal buttons with no focus indicator at all — and it
only showed up in one app, because which rule won depended on stylesheet order.
The rules use identical values, so overlapping them is invisible and safe;
opting out is not. The focus test now asserts computed outline width and style,
not just pixels, since a screenshot alone would not have caught this.

`status-tone.ts` establishes the six-tone vocabulary that the 48 scattered
status→colour maps will eventually collapse onto. Nothing consumes it yet.

No visual change: the 8 existing baselines pass unmodified.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 12:11:20 +03:00
fitse-yotor
3d0183f12c build: remove Tailwind, which was never actually running
Tailwind was configured but had no effect. There is no postcss config anywhere
in the repo, so the three `@tailwind` directives in the backoffice stylesheet
were never expanded — they passed through verbatim into the production CSS
bundle as invalid at-rules for browsers to discard. The portal's copy could not
even do that: nothing imports `apps/portal/src/styles.css`.

The utility classes visible in the built CSS come from the vendored
@tria-plc/iamui package, which ships its own pre-compiled stylesheet and
declares only React as a peer dependency. Removing Tailwind here does not
affect it.

`tailwind-merge` goes too — no file in apps/ or libs/ imports it. postcss and
autoprefixer stay; Vite uses them independently.

Also fixes a bug this uncovered. The orphaned portal stylesheet was not dead
code — it contained scrollbar theming the portal never received, so it has been
rendering raw OS scrollbars while the backoffice got themed ones. Those rules
move to portal.css, which actually loads. Deleting the file without reading it
would have silently kept that gap.

No visual change: all 8 baselines pass unmodified.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 11:51:14 +03:00
fitse-yotor
659e954306 refactor(theme): share one base theme between backoffice and portal
The two apps had drifted into unrelated themes. The portal's carried a full
type scale, radius scale, shadow ramp and component defaults; the backoffice's
had none of them — 55 lines defining two colour ramps and little else. With
nothing to inherit, its 23 features each invented their own sizing, which is
the real source of the inconsistency the UI reads with.

Promote the portal's structure to `libs/shared` as `baseTheme`, and reduce both
themes to what they should differ on: brand. The backoffice keeps #1e40af and
the portal keeps Coastal Modern — a distinct accent tells an officer which of
the two systems they are in, and the ramps are not interchangeable in contrast.

Both export names are preserved, so no consumer import changes.

Two properties are deliberately held back rather than shared:
- `colors.gray`: the portal's blue-tinted neutrals retint every dimmed label,
  neutral badge and table border. The backoffice adopts them as its own
  reviewed change, not as a side effect of sharing a base.
- `primaryShade.dark`: moves every filled control in dark mode; waits until
  dark mode is verified end to end.

Also fixes a live bug: PageLoader coloured its primary label `navy.9`, which is
defined in neither theme. Mantine drops unresolved colour keys silently, so the
label in a component used by 20 files had been rendering an inherited colour.

Adds a visual-regression harness to make all of this reviewable. It runs
against a static gallery route rather than real pages, so it needs no API,
database or auth — a theme diff cannot be masked by a migration or an expired
token. The portal is the control group: it is pixel-identical across all four
light/dark × desktop/tablet baselines, which is what makes the refactor
provably lossless.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 11:25:26 +03:00
Nati Nigussie
a88a069e3d Merge pull request #24 from Tria-plc/WorkflowChange
Fix
2026-08-21 11:04:00 +03:00
Nati Nigussie
8cb0da30b8 Merge branch 'dev' into WorkflowChange 2026-08-21 11:03:25 +03:00
nati14575
946e9a8659 Fix 2026-08-21 11:01:32 +03:00
Sennay
b227e0ec89 Create pnpm-workspace.yaml 2026-08-21 10:59:19 +03:00
Sennay
0c05876b2e Delete pnpm-workspace.yaml 2026-08-21 10:57:17 +03:00
Nati Nigussie
33ad3877c7 Merge pull request #23 from Tria-plc/WorkflowChange
Fix for build
2026-08-21 10:45:26 +03:00
nati14575
738b6dec4c Fix for build 2026-08-21 10:42:38 +03:00
estifanos
d4a5ba7673 UI fixes 2026-08-21 07:38:01 +00:00
Nati Nigussie
eb15dc8763 Merge pull request #22 from Tria-plc/WorkflowChange
Workflow change
2026-08-21 10:21:13 +03:00
estifanos
5e671b8ac0 fixes 2026-08-21 07:18:19 +00:00
Nati
cd524ff1cc Minor 2026-08-21 07:05:42 +00:00
mihretue
e94ecb3a71 Merge remote-tracking branch 'origin/WorkflowChange' into feature/exam-attempt-domain 2026-08-21 06:58:57 +00:00
Estifo77
3a8dcffdcb Merge branch 'estif-branch-1' of https://github.com/Tria-plc/emaui into estif-branch-1 2026-08-21 09:58:41 +03:00
Estifo77
7f360758dd Merge branch 'WorkflowChange' of https://github.com/Tria-plc/emaui into estif-branch-1 2026-08-21 09:58:34 +03:00
estifanos
84a1f7b47c feat: add minDate and maxDate constraints to AmharicDatePicker and restrict form inputs to prevent future and invalid dates 2026-08-21 06:57:19 +00:00