From ff47c7b0aacb44f1283f805f8850c710c55687d7 Mon Sep 17 00:00:00 2001 From: nati14575 Date: Mon, 24 Aug 2026 12:13:18 +0300 Subject: [PATCH] Add support for "BOTH" exam form type and update translations --- .../src/app/features/exam/pages/ExamDetailPage.tsx | 6 +++++- .../src/app/features/exam/pages/ExamPage/index.tsx | 1 + apps/backoffice/src/app/features/exam/types/exam.ts | 8 +++++--- apps/backoffice/src/app/i18n/locales/am.ts | 5 +++++ apps/backoffice/src/app/i18n/locales/en.ts | 5 +++++ 5 files changed, 21 insertions(+), 4 deletions(-) diff --git a/apps/backoffice/src/app/features/exam/pages/ExamDetailPage.tsx b/apps/backoffice/src/app/features/exam/pages/ExamDetailPage.tsx index e77e95b85..8e9037840 100644 --- a/apps/backoffice/src/app/features/exam/pages/ExamDetailPage.tsx +++ b/apps/backoffice/src/app/features/exam/pages/ExamDetailPage.tsx @@ -67,7 +67,11 @@ const STATUS_TONE: Record = { PUBLISHED: 'success', }; -const FORM_LABEL: Record = { ESSAY: "Essay", CHOICE: "Choice" }; +const FORM_LABEL: Record = { + ESSAY: "Essay", + CHOICE: "Choice", + BOTH: "Both", +}; const TYPE_LABEL: Record = { WRITTEN: "Written", ORAL: "Oral" }; const ADMIN_LABEL: Record = { OFFLINE: "Offline", diff --git a/apps/backoffice/src/app/features/exam/pages/ExamPage/index.tsx b/apps/backoffice/src/app/features/exam/pages/ExamPage/index.tsx index b515509d8..034d203ae 100644 --- a/apps/backoffice/src/app/features/exam/pages/ExamPage/index.tsx +++ b/apps/backoffice/src/app/features/exam/pages/ExamPage/index.tsx @@ -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} diff --git a/apps/backoffice/src/app/features/exam/types/exam.ts b/apps/backoffice/src/app/features/exam/types/exam.ts index 1c25cfd7d..28752ae64 100644 --- a/apps/backoffice/src/app/features/exam/types/exam.ts +++ b/apps/backoffice/src/app/features/exam/types/exam.ts @@ -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; diff --git a/apps/backoffice/src/app/i18n/locales/am.ts b/apps/backoffice/src/app/i18n/locales/am.ts index bfce3c867..458b638e6 100644 --- a/apps/backoffice/src/app/i18n/locales/am.ts +++ b/apps/backoffice/src/app/i18n/locales/am.ts @@ -257,6 +257,7 @@ export const am: Translations = { oral: "ቃል", essay: "ኢሴይ", choice: "ምርጫ", + both: "ሁለቱም", offline: "ከመስመር ውጪ", online: "በመስመር", onlineChoiceOnlyHint: "የመስመር ላይ ፈተናዎች በራስ-ሰር ይመዘገባሉ፣ ይህም ለምርጫ ጥያቄዎች ብቻ ይሰራል።", @@ -309,6 +310,7 @@ export const am: Translations = { formType: { ESSAY: "ኢሴይ", CHOICE: "ምርጫ", + BOTH: "ሁለቱም", }, admin: { OFFLINE: "ከመስመር ውጪ", @@ -1007,7 +1009,10 @@ export const am: Translations = { requestAdjustment: "ማስተካከያ ጠይቅ", reject: "አትቀበል", scheduleExam: "የፈተና ቀጠሮ ስጥ", + recordExamOutcome: "የፈተና ውጤት መዝግብ", confirmPayment: "ክፍያ አረጋግጥ", + scheduleIssuance: "የመረከቢያ ቀጠሮ ያዝ", + issueCertificate: "ሰርተፍኬት ስጥ", print: "ሰነድ አትም", copyLink: "አገናኝ ቅዳ", downloadDocuments: "ሁሉንም ሰነዶች አውርድ", diff --git a/apps/backoffice/src/app/i18n/locales/en.ts b/apps/backoffice/src/app/i18n/locales/en.ts index aefe6267b..73a9d96d7 100644 --- a/apps/backoffice/src/app/i18n/locales/en.ts +++ b/apps/backoffice/src/app/i18n/locales/en.ts @@ -256,6 +256,7 @@ export const en = { oral: 'Oral', essay: 'Essay', choice: 'Choice', + both: 'Both', offline: 'Offline', online: 'Online', onlineChoiceOnlyHint: 'Online exams are graded automatically, which only works for multiple choice.', @@ -307,6 +308,7 @@ export const en = { formType: { ESSAY: 'Essay', CHOICE: 'Choice', + BOTH: 'Both', }, admin: { OFFLINE: 'Offline', @@ -1016,7 +1018,10 @@ export const en = { requestAdjustment: 'Request adjustment', reject: 'Reject', scheduleExam: 'Schedule exam', + recordExamOutcome: 'Record exam outcome', confirmPayment: 'Confirm payment', + scheduleIssuance: 'Schedule pickup', + issueCertificate: 'Issue certificate', print: 'Print dossier', copyLink: 'Copy link', downloadDocuments: 'Download all documents',