mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-09-07 22:25:43 +00:00
Add support for "BOTH" exam form type and update translations
This commit is contained in:
@@ -67,7 +67,11 @@ const STATUS_TONE: Record<string, StatusTone> = {
|
||||
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 ADMIN_LABEL: Record<string, string> = {
|
||||
OFFLINE: "Offline",
|
||||
|
||||
@@ -249,6 +249,7 @@ function ExamForm({
|
||||
data={[
|
||||
{ value: "ESSAY", label: t("exam.form.essay") },
|
||||
{ value: "CHOICE", label: t("exam.form.choice") },
|
||||
{ value: "BOTH", label: t("exam.form.both") },
|
||||
]}
|
||||
value={form}
|
||||
onChange={setForm}
|
||||
|
||||
@@ -3,6 +3,8 @@ import type { EstimatedTime } from "../../question/types/question";
|
||||
import type { QuestionForm } from "../../question/types/question";
|
||||
export type { QuestionForm };
|
||||
|
||||
export type ExamForm = QuestionForm | "BOTH";
|
||||
|
||||
export type ExamType = "WRITTEN" | "ORAL";
|
||||
export type ExamAdministrationMethod = "OFFLINE" | "ONLINE";
|
||||
export type ExamEvaluationMethod = "SUM" | "AVERAGE" | "PERCENTAGE";
|
||||
@@ -39,7 +41,7 @@ export interface Exam {
|
||||
date: string;
|
||||
givenTime: EstimatedTime | null;
|
||||
type: ExamType;
|
||||
form: QuestionForm;
|
||||
form: ExamForm;
|
||||
venue: string;
|
||||
administrationMethod: ExamAdministrationMethod;
|
||||
evaluationMethod: ExamEvaluationMethod;
|
||||
@@ -63,7 +65,7 @@ export interface CreateExamPayload {
|
||||
date: string;
|
||||
givenTime: EstimatedTime;
|
||||
type: ExamType;
|
||||
form: QuestionForm;
|
||||
form: ExamForm;
|
||||
venue: string;
|
||||
administrationMethod: ExamAdministrationMethod;
|
||||
evaluationMethod: ExamEvaluationMethod;
|
||||
@@ -79,7 +81,7 @@ export interface UpdateExamPayload {
|
||||
date?: string;
|
||||
givenTime?: EstimatedTime;
|
||||
type?: ExamType;
|
||||
form?: QuestionForm;
|
||||
form?: ExamForm;
|
||||
venue?: string;
|
||||
administrationMethod?: ExamAdministrationMethod;
|
||||
evaluationMethod?: ExamEvaluationMethod;
|
||||
|
||||
Reference in New Issue
Block a user