From 573ff17581c62fa3c42a4a2841ce62570606b5ae Mon Sep 17 00:00:00 2001 From: PhuocNTB Date: Mon, 6 Jul 2026 10:29:08 +0700 Subject: [PATCH] fix t --- .../src/components/ExamRoomWorkspace.tsx | 1 + .../src/components/WorkspaceSeatingChart.tsx | 32 +++++++++++++++++-- 2 files changed, 31 insertions(+), 2 deletions(-) diff --git a/management/src/components/ExamRoomWorkspace.tsx b/management/src/components/ExamRoomWorkspace.tsx index 88ac911..4ee6947 100644 --- a/management/src/components/ExamRoomWorkspace.tsx +++ b/management/src/components/ExamRoomWorkspace.tsx @@ -924,6 +924,7 @@ export const ExamRoomWorkspace: React.FC = ({ examId, onBack }) => { fullName: s.fullName, studentCode: s.studentCode, avatar: s.avatar, + paperTitle: s.paperTitle, }))} onlineIds={onlineIds} onStudentClick={(rkId) => { diff --git a/management/src/components/WorkspaceSeatingChart.tsx b/management/src/components/WorkspaceSeatingChart.tsx index bac4888..e3cd364 100644 --- a/management/src/components/WorkspaceSeatingChart.tsx +++ b/management/src/components/WorkspaceSeatingChart.tsx @@ -9,6 +9,7 @@ interface WorkspaceSeatingChartProps { fullName: string; studentCode: string; avatar?: string; + paperTitle?: string; }[]; onlineIds: number[]; onStudentClick?: (studentRkId: number) => void; @@ -70,6 +71,11 @@ export const WorkspaceSeatingChart: React.FC = ({ ); }, [students, listSearchQuery]); + // Check if any student has an assigned exam paper + const hasPaperColumn = useMemo(() => { + return students.some((s) => s.paperTitle); + }, [students]); + // Load templates and layout useEffect(() => { // Load templates @@ -397,6 +403,26 @@ export const WorkspaceSeatingChart: React.FC = ({ {student.studentCode} + {student.paperTitle && ( + + 📄 {student.paperTitle} + + )} ) : (
@@ -658,6 +684,7 @@ export const WorkspaceSeatingChart: React.FC = ({ Sinh viên Mã SV + {hasPaperColumn && Gói đề} Vị trí chỗ ngồi Trạng thái Thao tác @@ -676,6 +703,7 @@ export const WorkspaceSeatingChart: React.FC = ({
{s.studentCode} + {hasPaperColumn && {s.paperTitle || '—'}} {seatLabel} @@ -772,8 +800,8 @@ export const WorkspaceSeatingChart: React.FC = ({ {s.fullName} - - {s.studentCode} + + {s.studentCode} {s.paperTitle && ` · 📄 ${s.paperTitle}`}