Skip to content

Commit 6a1dfe3

Browse files
authored
Merge pull request #278 from pirogramming/frontend_km
[fix]: console log 수정 및 weekly count 현황 확인 console 추가
2 parents a7bd176 + 59c01e5 commit 6a1dfe3

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

frontend/src/components/AttendanceWeekInfo.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const AttendanceWeekInfo = ({ week, classes }) => {
77
<p className="weekInfo">{week}주차</p>
88
<div className="coin_img_container">
99
{classes.map((cls, idx) => {
10-
console.log(`week ${week}, idx ${idx}, image:`, cls.image);
10+
console.log(`week ${week}, idx ${idx}, image:`, cls.image);
1111
return <img key={idx} src={cls.image} alt={`${idx + 1}번째 수업`} />;
1212
})}
1313
</div>

frontend/src/pages/generation/Attendance.jsx

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ const Attendance = () => {
6565
weekSlotMap.set(week, [...existing, ...presentSlots]);
6666
});
6767

68+
console.log("주차별 출석 (weekSlotMap):", weekSlotMap);
69+
6870
return Array.from({ length: 5 }, (_, i) => {
6971
const week = i + 1;
7072
const all9 = weekSlotMap.get(week) || []; // 총 9개의 출석 슬롯 (3번의 출석체크*주차당 3번의 세션)
@@ -95,6 +97,7 @@ const Attendance = () => {
9597
withCredentials: true, // 세션 기반 인증 요청처리
9698
});
9799
const rawData = res.data.data;
100+
console.log("출석 rawData:", rawData);
98101
const weekly = processWeeklyAttendance(rawData);
99102
setAttendanceData(weekly);
100103
} catch (error) {
@@ -160,11 +163,11 @@ const Attendance = () => {
160163
// 매 분마다 현재 날짜를 확인해서 달라졌으면 상태 업데이트
161164
const dateCheckInterval = setInterval(() => {
162165
const todayStr = new Date().toLocaleDateString("sv-SE"); // → KST(한국 시간 기준)
163-
console.log("dateCheckInterval 실행됨 / 현재 시간:", new Date());
166+
console.log("dateCheckInterval 실행 시간:", new Date());
164167
console.log(
165-
"currentDateRef:",
168+
"현재 로드해오는 시간:",
166169
currentDateRef.current,
167-
"| todayStr:",
170+
"| 현재 날짜:",
168171
todayStr
169172
);
170173

@@ -204,7 +207,6 @@ const Attendance = () => {
204207

205208
const res = await api.post(
206209
"/attendance/mark",
207-
208210
{
209211
userId,
210212
code: attendanceCode[0],

0 commit comments

Comments
 (0)