mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-09-07 10:45:45 +00:00
Merge pull request #56 from Tria-plc/fix/coc-exam-workflow-defects
Fix/coc exam workflow defects
This commit is contained in:
@@ -114,7 +114,7 @@ const STATUS_COLOR: Record<string, string> = {
|
|||||||
* keys because this page states its statuses the same way.
|
* keys because this page states its statuses the same way.
|
||||||
*/
|
*/
|
||||||
const EXAM_STAGE_LABELS: Record<string, string> = {
|
const EXAM_STAGE_LABELS: Record<string, string> = {
|
||||||
ELIGIBLE_TO_REGISTER: 'Eligible — Register for a Sitting',
|
EXAM_PAID: 'Exam Paid',
|
||||||
REGISTERED: 'Exam Scheduled',
|
REGISTERED: 'Exam Scheduled',
|
||||||
ATTENDANCE_CONFIRMED: 'Exam Attendance Confirmed',
|
ATTENDANCE_CONFIRMED: 'Exam Attendance Confirmed',
|
||||||
SITTING: 'Exam In Progress',
|
SITTING: 'Exam In Progress',
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ describe('examStageFor', () => {
|
|||||||
expect(examStageFor({ status: 'CERTIFICATE_ISSUED' })).toBeNull();
|
expect(examStageFor({ status: 'CERTIFICATE_ISSUED' })).toBeNull();
|
||||||
});
|
});
|
||||||
|
|
||||||
it('reads a paid application as eligible to register, not as waiting', () => {
|
it('reads a paid application as Exam Paid, not as awaiting a date', () => {
|
||||||
expect(examStageFor({ status: 'EXAM_PAID' })).toBe('ELIGIBLE_TO_REGISTER');
|
expect(examStageFor({ status: 'EXAM_PAID' })).toBe('EXAM_PAID');
|
||||||
});
|
});
|
||||||
|
|
||||||
it('reports a registration whose attendance has not been taken', () => {
|
it('reports a registration whose attendance has not been taken', () => {
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ import type { MyRegistration } from '../exams/pages/ExamsPage';
|
|||||||
* already recorded — this only names what the records add up to.
|
* already recorded — this only names what the records add up to.
|
||||||
*/
|
*/
|
||||||
export type ExamStage =
|
export type ExamStage =
|
||||||
| 'ELIGIBLE_TO_REGISTER'
|
| 'EXAM_PAID'
|
||||||
| 'REGISTERED'
|
| 'REGISTERED'
|
||||||
| 'ATTENDANCE_CONFIRMED'
|
| 'ATTENDANCE_CONFIRMED'
|
||||||
| 'SITTING'
|
| 'SITTING'
|
||||||
@@ -41,9 +41,11 @@ export function examStageFor(
|
|||||||
if (app.status === 'EXAM_PASSED') return 'PASSED';
|
if (app.status === 'EXAM_PASSED') return 'PASSED';
|
||||||
if (app.status === 'EXAM_FAILED') return 'FAILED';
|
if (app.status === 'EXAM_FAILED') return 'FAILED';
|
||||||
|
|
||||||
// EXAM_PAID is "prerequisites done, sitting not yet chosen": the fee has
|
// The fee has cleared and nothing is left but for the candidate to pick a
|
||||||
// cleared and nothing is left but for the candidate to pick a session.
|
// session. Named after the status rather than after what the candidate
|
||||||
if (app.status === 'EXAM_PAID') return 'ELIGIBLE_TO_REGISTER';
|
// should do next: "Eligible to Register" read as a status of its own and
|
||||||
|
// said less than the plain one.
|
||||||
|
if (app.status === 'EXAM_PAID') return 'EXAM_PAID';
|
||||||
|
|
||||||
if (app.status !== 'EXAM_SCHEDULED') return null;
|
if (app.status !== 'EXAM_SCHEDULED') return null;
|
||||||
|
|
||||||
|
|||||||
@@ -244,7 +244,7 @@ export const am: Translations = {
|
|||||||
empty: 'እስካሁን ምንም ፍቃድ አልተሰጥዎትም። ማመልከቻ ከተፈቀደና ከተከፈለ በኋላ እዚህ ይታያል።',
|
empty: 'እስካሁን ምንም ፍቃድ አልተሰጥዎትም። ማመልከቻ ከተፈቀደና ከተከፈለ በኋላ እዚህ ይታያል።',
|
||||||
},
|
},
|
||||||
examStage: {
|
examStage: {
|
||||||
ELIGIBLE_TO_REGISTER: "ብቁ ነዎት — ለፈተና ይመዝገቡ",
|
EXAM_PAID: "የፈተና ክፍያ ተከፍሏል",
|
||||||
REGISTERED: "የፈተና ቀን፦ {{date}}",
|
REGISTERED: "የፈተና ቀን፦ {{date}}",
|
||||||
ATTENDANCE_CONFIRMED: "መገኘት ተረጋግጧል",
|
ATTENDANCE_CONFIRMED: "መገኘት ተረጋግጧል",
|
||||||
SITTING: "ፈተና በመካሄድ ላይ",
|
SITTING: "ፈተና በመካሄድ ላይ",
|
||||||
|
|||||||
@@ -249,7 +249,7 @@ export const en = {
|
|||||||
* from the application status alone — see exam-stage.ts.
|
* from the application status alone — see exam-stage.ts.
|
||||||
*/
|
*/
|
||||||
examStage: {
|
examStage: {
|
||||||
ELIGIBLE_TO_REGISTER: 'Eligible — register for a sitting',
|
EXAM_PAID: 'Exam Paid',
|
||||||
REGISTERED: 'Exam scheduled: {{date}}',
|
REGISTERED: 'Exam scheduled: {{date}}',
|
||||||
ATTENDANCE_CONFIRMED: 'Attendance confirmed',
|
ATTENDANCE_CONFIRMED: 'Attendance confirmed',
|
||||||
SITTING: 'Exam in progress',
|
SITTING: 'Exam in progress',
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ export const STATUS_LABELS: Record<LicenseStatus, string> = {
|
|||||||
EXAM_PAYMENT_PENDING: 'Exam Fee Due',
|
EXAM_PAYMENT_PENDING: 'Exam Fee Due',
|
||||||
// Nobody assigns a date any more — the fee clearing is what makes the
|
// Nobody assigns a date any more — the fee clearing is what makes the
|
||||||
// candidate eligible to register for a published sitting themselves.
|
// candidate eligible to register for a published sitting themselves.
|
||||||
EXAM_PAID: 'Eligible to Register',
|
EXAM_PAID: 'Exam Paid',
|
||||||
EXAM_SCHEDULED: 'Exam Scheduled',
|
EXAM_SCHEDULED: 'Exam Scheduled',
|
||||||
EXAM_PASSED: 'Exam Passed',
|
EXAM_PASSED: 'Exam Passed',
|
||||||
EXAM_FAILED: 'Exam Not Passed',
|
EXAM_FAILED: 'Exam Not Passed',
|
||||||
|
|||||||
Reference in New Issue
Block a user