mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-28 18:20:59 +00:00
fix(exam): gate Take Exam on confirmed attendance
The registrations table mirrored the server's old attendance deny-list — ABSENT/WITHDRAWN/DISQUALIFIED — so the default REGISTERED fell through and "Take exam" appeared before any invigilator had confirmed the candidate was there. It is an allow-list now, PRESENT and LATE only, matching ExamAttemptService.MAY_SIT. A blocked candidate gets a reason rather than an empty cell: "Awaiting attendance" with a tooltip while nobody has called the register, "Not sitting" once attendance was taken and they are not. useExamAttempt does the same for the direct-link path, and translates attendance_not_confirmed / candidate_not_present instead of showing a raw error key on a Start button that cannot work. The server refuses either way — this only makes the refusal legible. ScheduleExamModal no longer promises an admission number: scheduling makes a sitting available, and the candidate registers for it themselves.
This commit is contained in:
@@ -22,6 +22,9 @@ interface Props {
|
||||
* of a per-candidate appointment. Scoped to sittings whose certification
|
||||
* matches this application's rank, so a Chief Mate candidate cannot be seated
|
||||
* into an OOW Deck sitting by accident.
|
||||
*
|
||||
* Scheduling makes the sitting available; it does not register the candidate.
|
||||
* That is their own act, from the portal's Register button.
|
||||
*/
|
||||
export function ScheduleExamModal({
|
||||
opened,
|
||||
@@ -61,7 +64,7 @@ export function ScheduleExamModal({
|
||||
<Text size="sm" c="dimmed">
|
||||
{t('review.scheduleExam.intro', {
|
||||
defaultValue:
|
||||
'Assign {{applicant}} to a scheduled sitting. They will be notified with the date and their admission number.',
|
||||
'Make a sitting available to {{applicant}}. They register for it themselves from the portal.',
|
||||
applicant: applicantName,
|
||||
})}
|
||||
</Text>
|
||||
@@ -89,7 +92,7 @@ export function ScheduleExamModal({
|
||||
<Text size="xs" c="dimmed">
|
||||
{t(
|
||||
'review.scheduleExam.admissionHint',
|
||||
'An admission number is issued automatically when the candidate is seated.',
|
||||
'Scheduling does not seat the candidate. They must register for the sitting from the portal, and the admission number is issued then.',
|
||||
)}
|
||||
</Text>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user