Skip to content

Commit d9cff08

Browse files
authored
Merge pull request #96 from CSID-DGU/frontend/feature/add-exam
FE: [fix] 디버깅 코드 삭제 및 UI 수정
2 parents bd22eaf + 827ecff commit d9cff08

File tree

6 files changed

+31
-20
lines changed

6 files changed

+31
-20
lines changed

src/frontend/eyesee-admin/src/app/dashboard/[examId]/[userId]/page.tsx

+5-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ const UserDetailPage = () => {
2525
<>
2626
{userDetailData ? (
2727
<div className="flex w-screen h-screen bg-[#0E1D3C]">
28-
<TimeLine timeLineData={userDetailData} setVideoNum={setVideoNum} />
28+
<div className="w-[30vw]">
29+
<TimeLine timeLineData={userDetailData} setVideoNum={setVideoNum} />
30+
</div>
2931
<div className="grow text-white p-10">
3032
<TestInfo
3133
examName={userDetailData.examName}
@@ -46,12 +48,12 @@ const UserDetailPage = () => {
4648
: 0
4749
}
4850
/>
49-
<div className="flex gap-5 py-5">
51+
<div className="w-[70vw] flex gap-5 py-5 overflow-x-auto">
5052
{userDetailData.cheatingVideos.map((video, index) => (
5153
<div
5254
key={index}
5355
onClick={() => setVideoNum(index)}
54-
className="h-28 max-w-48 rounded-sm overflow-hidden"
56+
className="h-28 w-48 rounded-sm overflow-hidden shrink-0"
5557
>
5658
<video src={video.filepath} />
5759
</div>

src/frontend/eyesee-admin/src/components/dashBoard/DashBoardSection.tsx

+8-3
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,14 @@ const DashBoardSection = ({
5050
{children}
5151
</TestInfo>
5252
<div className="flex items-center w-full justify-end gap-5 mb-5">
53-
<GridIcon onClick={() => setTableModalOpen(true)} />
54-
<PeopleIcon onClick={() => setCodeModalOpen(true)} />
53+
<GridIcon
54+
className="cursor-pointer"
55+
onClick={() => setTableModalOpen(true)}
56+
/>
57+
<PeopleIcon
58+
className="cursor-pointer"
59+
onClick={() => setCodeModalOpen(true)}
60+
/>
5561
<RowMoreIcon />
5662
</div>
5763
<div
@@ -63,7 +69,6 @@ const DashBoardSection = ({
6369
{sesstionData.user.map((user) => (
6470
<div key={user.userId} className="flex justify-center">
6571
<DashBoardCard
66-
key={user.userId}
6772
user={user}
6873
exam={{
6974
name: sesstionData.examName,

src/frontend/eyesee-admin/src/components/dashBoard/UserSection.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const UserSection = ({ sessionData }: UserSectionProps) => {
1919
return (
2020
<div className="w-[342px] py-8 px-2.5">
2121
<div className="text-[#999] text-[20px] font-bold mb-12">
22-
<span onClick={handleClick} className="pl-3 pr-5">
22+
<span onClick={handleClick} className="pl-3 pr-5 cursor-pointer">
2323
2424
</span>
2525
{sessionData.examName}

src/frontend/eyesee-admin/src/components/report/ReportSection.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ const ReportSection = ({ reportData }: ReportSectionType) => {
6363
<div>부정행위 유형별 통계</div>
6464
<div className="flex flex-col gap-2">
6565
{Object.entries(reportData.cheatingTypeStatistics).map(
66-
([type, count]) => (
67-
<span key={type} className="border-b border-gray-500 px-3">
66+
([type, count], index) => (
67+
<span key={index} className="border-b border-gray-500 px-3">
6868
{type}: {count}
6969
</span>
7070
)

src/frontend/eyesee-admin/src/components/userDetail/TimeLine.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ const TimeLine = ({ timeLineData, setVideoNum }: TimeLineProps) => {
1919
return (
2020
<div className="py-8 px-2.5 w-[342px] h-screen overflow-scroll bg-white">
2121
<div className="text-[#0E1D3C] text-[20px] font-bold mb-12">
22-
<span onClick={handleClick} className="pl-3 pr-5">
22+
<span onClick={handleClick} className="pl-3 pr-5 cursor-pointer">
2323
2424
</span>
2525
{timeLineData.userName}님 Time Line
2626
</div>
2727
<div className="flex flex-col gap-16 border-l-2 border-l-[#0E1D3C] min-h-[80vh] ml-12">
2828
{timeLineData.cheatingStatistics.map((cheating, index) => (
2929
<div
30-
key={cheating.cheatingStatisticsId}
30+
key={index}
3131
onClick={() => setVideoNum(index)}
3232
className="relative flex items-center gap-10 cursor-pointer"
3333
style={{ left: -9 }}

src/frontend/eyesee-user/src/app/exam-room/page.tsx

+13-9
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,12 @@ const RealTimeVideoPage = () => {
105105
console.error("부정행위 시작 시간이 없습니다.");
106106
return;
107107
}
108+
// const endTime = new Date().toISOString();
109+
const now = new Date();
110+
const offset = 9 * 60 * 60 * 1000; // 한국 시간은 UTC+9
111+
const kstTime = new Date(now.getTime() + offset);
112+
const endTime = kstTime.toISOString().replace("Z", "+09:00");
108113

109-
const endTime = new Date().toISOString();
110114
const result = await videoPost(
111115
Number(userId),
112116
cheatingStartTimeRef.current,
@@ -157,14 +161,14 @@ const RealTimeVideoPage = () => {
157161
uploadVideo(file);
158162

159163
// 로컬 다운로드 (테스트용)
160-
const url = URL.createObjectURL(blob);
161-
const a = document.createElement("a");
162-
a.href = url;
163-
a.download = `cheating_${new Date().toISOString()}.mov`;
164-
a.click();
165-
166-
console.log(`비디오 크기: ${blob.size / 1024} KB`);
167-
console.log("부정행위 비디오 저장 완료");
164+
// const url = URL.createObjectURL(blob);
165+
// const a = document.createElement("a");
166+
// a.href = url;
167+
// a.download = `cheating_${new Date().toISOString()}.mov`;
168+
// a.click();
169+
170+
// console.log(`비디오 크기: ${blob.size / 1024} KB`);
171+
// console.log("부정행위 비디오 저장 완료");
168172
}
169173
};
170174

0 commit comments

Comments
 (0)