Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion frontend/src/components/AttendanceWeekInfo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const AttendanceWeekInfo = ({ week, classes }) => {
<p className="weekInfo">{week}주차</p>
<div className="coin_img_container">
{classes.map((cls, idx) => {
console.log(`week ${week}, idx ${idx}, image:`, cls.image);
console.log(`week ${week}, idx ${idx}, image:`, cls.image);
return <img key={idx} src={cls.image} alt={`${idx + 1}번째 수업`} />;
})}
</div>
Expand Down
10 changes: 6 additions & 4 deletions frontend/src/pages/generation/Attendance.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,8 @@ const Attendance = () => {
weekSlotMap.set(week, [...existing, ...presentSlots]);
});

console.log("주차별 출석 (weekSlotMap):", weekSlotMap);

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

Expand Down Expand Up @@ -204,7 +207,6 @@ const Attendance = () => {

const res = await api.post(
"/attendance/mark",

{
userId,
code: attendanceCode[0],
Expand Down