Merge branch 'WorkflowChange' of github.com:Tria-plc/emaui into WorkflowChange

This commit is contained in:
Nati
2026-08-24 12:37:42 +00:00
5 changed files with 27 additions and 27 deletions

View File

@@ -67,7 +67,11 @@ const STATUS_TONE: Record<string, StatusTone> = {
PUBLISHED: 'success', PUBLISHED: 'success',
}; };
const FORM_LABEL: Record<string, string> = { ESSAY: "Essay", CHOICE: "Choice" }; const FORM_LABEL: Record<string, string> = {
ESSAY: "Essay",
CHOICE: "Choice",
BOTH: "Both",
};
const TYPE_LABEL: Record<string, string> = { WRITTEN: "Written", ORAL: "Oral" }; const TYPE_LABEL: Record<string, string> = { WRITTEN: "Written", ORAL: "Oral" };
const ADMIN_LABEL: Record<string, string> = { const ADMIN_LABEL: Record<string, string> = {
OFFLINE: "Offline", OFFLINE: "Offline",

View File

@@ -249,6 +249,7 @@ function ExamForm({
data={[ data={[
{ value: "ESSAY", label: t("exam.form.essay") }, { value: "ESSAY", label: t("exam.form.essay") },
{ value: "CHOICE", label: t("exam.form.choice") }, { value: "CHOICE", label: t("exam.form.choice") },
{ value: "BOTH", label: t("exam.form.both") },
]} ]}
value={form} value={form}
onChange={setForm} onChange={setForm}

View File

@@ -15,12 +15,7 @@ export type ExamAdministrationMethod = "OFFLINE" | "ONLINE";
export type ExamEvaluationMethod = "SUM" | "AVERAGE" | "PERCENTAGE"; export type ExamEvaluationMethod = "SUM" | "AVERAGE" | "PERCENTAGE";
export type ExamSelectionMethod = "MANUAL" | "RANDOM"; export type ExamSelectionMethod = "MANUAL" | "RANDOM";
export type ExamStatus = export type ExamStatus =
| "PENDING" "PENDING" | "ACTIVE" | "COMPLETED" | "CANCELLED" | "POSTPONED" | "PUBLISHED";
| "ACTIVE"
| "COMPLETED"
| "CANCELLED"
| "POSTPONED"
| "PUBLISHED";
/** Only populated when the exam is fetched with `?i=questions,questions.options`. */ /** Only populated when the exam is fetched with `?i=questions,questions.options`. */
export interface QuestionOptionBrief { export interface QuestionOptionBrief {
@@ -108,19 +103,14 @@ export interface RandomQuestionsPayload {
/** What the invigilator recorded on the day (US-EXAM-009). */ /** What the invigilator recorded on the day (US-EXAM-009). */
export type AttendanceStatus = export type AttendanceStatus =
| 'REGISTERED' "REGISTERED" | "PRESENT" | "ABSENT" | "LATE" | "WITHDRAWN" | "DISQUALIFIED";
| 'PRESENT'
| 'ABSENT'
| 'LATE'
| 'WITHDRAWN'
| 'DISQUALIFIED';
export interface ExamRegistration { export interface ExamRegistration {
id: string; id: string;
examId: string; examId: string;
profileId: string; profileId: string;
admissionNumber: string; admissionNumber: string;
kind: 'NEW' | 'RETAKE'; kind: "NEW" | "RETAKE";
attemptNumber: number; attemptNumber: number;
attendanceStatus: AttendanceStatus; attendanceStatus: AttendanceStatus;
attendanceRemark: string | null; attendanceRemark: string | null;
@@ -134,12 +124,14 @@ export interface ExamRegistration {
seafarerNumber: string | null; seafarerNumber: string | null;
}; };
/** The candidate's online sitting, when one has been started. */ /** The candidate's online sitting, when one has been started. */
attempt?: { id: string; status: 'IN_PROGRESS' | 'SUBMITTED' | 'EXPIRED' } | null; attempt?: {
id: string;
status: "IN_PROGRESS" | "SUBMITTED" | "EXPIRED";
} | null;
} }
export type RegradeOutcome = export type RegradeOutcome =
| { graded: true; resultId: string } { graded: true; resultId: string } | { graded: false; reason: string };
| { graded: false; reason: string };
export interface RecordAttendancePayload { export interface RecordAttendancePayload {
registrationId: string; registrationId: string;
@@ -148,17 +140,10 @@ export interface RecordAttendancePayload {
} }
export type ExamIncidentType = export type ExamIncidentType =
| 'MISCONDUCT' "MISCONDUCT" | "TECHNICAL_FAILURE" | "MEDICAL" | "ADMINISTRATIVE" | "OTHER";
| 'TECHNICAL_FAILURE'
| 'MEDICAL'
| 'ADMINISTRATIVE'
| 'OTHER';
export type ExamIncidentStatus = export type ExamIncidentStatus =
| 'OPEN' "OPEN" | "UNDER_REVIEW" | "RESOLVED" | "DISMISSED";
| 'UNDER_REVIEW'
| 'RESOLVED'
| 'DISMISSED';
export interface ExamIncident { export interface ExamIncident {
id: string; id: string;
@@ -183,6 +168,6 @@ export interface CreateIncidentPayload {
export interface ResolveIncidentPayload { export interface ResolveIncidentPayload {
incidentId: string; incidentId: string;
outcome: 'RESOLVED' | 'DISMISSED'; outcome: "RESOLVED" | "DISMISSED";
resolution: string; resolution: string;
} }

View File

@@ -257,6 +257,7 @@ export const am: Translations = {
oral: "ቃል", oral: "ቃል",
essay: "ኢሴይ", essay: "ኢሴይ",
choice: "ምርጫ", choice: "ምርጫ",
both: "ሁለቱም",
offline: "ከመስመር ውጪ", offline: "ከመስመር ውጪ",
online: "በመስመር", online: "በመስመር",
onlineChoiceOnlyHint: "የመስመር ላይ ፈተናዎች በራስ-ሰር ይመዘገባሉ፣ ይህም ለምርጫ ጥያቄዎች ብቻ ይሰራል።", onlineChoiceOnlyHint: "የመስመር ላይ ፈተናዎች በራስ-ሰር ይመዘገባሉ፣ ይህም ለምርጫ ጥያቄዎች ብቻ ይሰራል።",
@@ -309,6 +310,7 @@ export const am: Translations = {
formType: { formType: {
ESSAY: "ኢሴይ", ESSAY: "ኢሴይ",
CHOICE: "ምርጫ", CHOICE: "ምርጫ",
BOTH: "ሁለቱም",
}, },
admin: { admin: {
OFFLINE: "ከመስመር ውጪ", OFFLINE: "ከመስመር ውጪ",
@@ -1007,7 +1009,10 @@ export const am: Translations = {
requestAdjustment: "ማስተካከያ ጠይቅ", requestAdjustment: "ማስተካከያ ጠይቅ",
reject: "አትቀበል", reject: "አትቀበል",
scheduleExam: "የፈተና ቀጠሮ ስጥ", scheduleExam: "የፈተና ቀጠሮ ስጥ",
recordExamOutcome: "የፈተና ውጤት መዝግብ",
confirmPayment: "ክፍያ አረጋግጥ", confirmPayment: "ክፍያ አረጋግጥ",
scheduleIssuance: "የመረከቢያ ቀጠሮ ያዝ",
issueCertificate: "ሰርተፍኬት ስጥ",
print: "ሰነድ አትም", print: "ሰነድ አትም",
copyLink: "አገናኝ ቅዳ", copyLink: "አገናኝ ቅዳ",
downloadDocuments: "ሁሉንም ሰነዶች አውርድ", downloadDocuments: "ሁሉንም ሰነዶች አውርድ",

View File

@@ -256,6 +256,7 @@ export const en = {
oral: 'Oral', oral: 'Oral',
essay: 'Essay', essay: 'Essay',
choice: 'Choice', choice: 'Choice',
both: 'Both',
offline: 'Offline', offline: 'Offline',
online: 'Online', online: 'Online',
onlineChoiceOnlyHint: 'Online exams are graded automatically, which only works for multiple choice.', onlineChoiceOnlyHint: 'Online exams are graded automatically, which only works for multiple choice.',
@@ -307,6 +308,7 @@ export const en = {
formType: { formType: {
ESSAY: 'Essay', ESSAY: 'Essay',
CHOICE: 'Choice', CHOICE: 'Choice',
BOTH: 'Both',
}, },
admin: { admin: {
OFFLINE: 'Offline', OFFLINE: 'Offline',
@@ -1016,7 +1018,10 @@ export const en = {
requestAdjustment: 'Request adjustment', requestAdjustment: 'Request adjustment',
reject: 'Reject', reject: 'Reject',
scheduleExam: 'Schedule exam', scheduleExam: 'Schedule exam',
recordExamOutcome: 'Record exam outcome',
confirmPayment: 'Confirm payment', confirmPayment: 'Confirm payment',
scheduleIssuance: 'Schedule pickup',
issueCertificate: 'Issue certificate',
print: 'Print dossier', print: 'Print dossier',
copyLink: 'Copy link', copyLink: 'Copy link',
downloadDocuments: 'Download all documents', downloadDocuments: 'Download all documents',