From 31a92cb422e3e013afc045d36ef75a7e47641824 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sedat=20=C3=96ZT=C3=9CRK?= <76204082+iamsedatozturk@users.noreply.github.com> Date: Fri, 17 Oct 2025 08:53:00 +0300 Subject: [PATCH] =?UTF-8?q?Question=20d=C3=BCzenlemeleri?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../services/{branch.ts => branch.service.ts} | 0 ui/src/services/tenant.service.ts | 2 ++ ui/src/views/branch/BranchSeed.tsx | 2 +- .../ExamCreator.tsx | 22 +++++++------------ .../ExamInterface/QuestionRenderer.tsx | 6 ++--- .../TestCreator.tsx | 0 ui/src/views/coordinator/Exams.tsx | 2 +- ui/src/views/coordinator/QuestionDialog.tsx | 10 ++++----- ui/src/views/coordinator/Tests.tsx | 2 +- 9 files changed, 21 insertions(+), 25 deletions(-) rename ui/src/services/{branch.ts => branch.service.ts} (100%) rename ui/src/views/coordinator/{AdminPanel => ExamInterface}/ExamCreator.tsx (97%) rename ui/src/views/coordinator/{AdminPanel => ExamInterface}/TestCreator.tsx (100%) diff --git a/ui/src/services/branch.ts b/ui/src/services/branch.service.ts similarity index 100% rename from ui/src/services/branch.ts rename to ui/src/services/branch.service.ts diff --git a/ui/src/services/tenant.service.ts b/ui/src/services/tenant.service.ts index 30903a0c..e8d8eca7 100644 --- a/ui/src/services/tenant.service.ts +++ b/ui/src/services/tenant.service.ts @@ -52,3 +52,5 @@ export const postSeedTenantData = (data: SeedTenantDataInput) => url: `/api/app/platform-tenant/seed-tenant-data`, data, }) + + \ No newline at end of file diff --git a/ui/src/views/branch/BranchSeed.tsx b/ui/src/views/branch/BranchSeed.tsx index b962ce9a..00995f42 100644 --- a/ui/src/views/branch/BranchSeed.tsx +++ b/ui/src/views/branch/BranchSeed.tsx @@ -3,7 +3,7 @@ import { Button } from '@/components/ui' import { Container } from '@/components/shared' import { Dialog, Notification, toast } from '@/components/ui' import type { BranchSeedResultDto } from '@/proxy/branch/seed' -import { runBranchSeed } from '@/services/branch' +import { runBranchSeed } from '@/services/branch.service' function BranchSeed({ open, diff --git a/ui/src/views/coordinator/AdminPanel/ExamCreator.tsx b/ui/src/views/coordinator/ExamInterface/ExamCreator.tsx similarity index 97% rename from ui/src/views/coordinator/AdminPanel/ExamCreator.tsx rename to ui/src/views/coordinator/ExamInterface/ExamCreator.tsx index 8bf0a750..f0dfc3c9 100644 --- a/ui/src/views/coordinator/AdminPanel/ExamCreator.tsx +++ b/ui/src/views/coordinator/ExamInterface/ExamCreator.tsx @@ -36,9 +36,8 @@ export const ExamCreator: React.FC = ({ const [selectedPool, setSelectedPool] = useState(""); const [questionFilters, setQuestionFilters] = useState({ - type: "", + questionType: "", difficulty: "", - tag: "", }); const handleInputChange = (field: string, value: any) => { @@ -52,9 +51,9 @@ export const ExamCreator: React.FC = ({ let questionsToAdd = pool.questions; // Apply filters - if (questionFilters.type) { + if (questionFilters.questionType) { questionsToAdd = questionsToAdd.filter( - (q) => q.type === questionFilters.type + (q) => q.questionType === questionFilters.questionType ); } if (questionFilters.difficulty) { @@ -62,12 +61,7 @@ export const ExamCreator: React.FC = ({ (q) => q.difficulty === questionFilters.difficulty ); } - if (questionFilters.tag) { - questionsToAdd = questionsToAdd.filter((q) => - q.tags.includes(questionFilters.tag) - ); - } - + // Add questions that aren't already selected const newQuestions = questionsToAdd.filter( (q) => !selectedQuestions.some((sq) => sq.id === q.id) @@ -371,11 +365,11 @@ export const ExamCreator: React.FC = ({ Question Type