반응형, 출석현황 오류 해결 PR#170
Merged
Merged
Conversation
HTTPS!!!!
[Security] 백엔드 API 접근 제어 강화
[Fix] 대댓글 작성 시 부모 댓글 검증 로직 보강
[Fix] QuestionLike, UnderstandingResponse 유니크 제약 마이그레이션 추가
[Refactor] 질문 목록 조회 시 좋아요 여부 N+1 쿼리 개선
feat: 에러메세지 띄우기
[Feat] 피로체크, 커리큘럼, 로그인, 헤더, 온보딩 반응형 구현
[Feat/164] 나의 전체 출석현황(코인) 수정 PR
feat: 하루 상세 출석 & 전체 출석 프론트 수정
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Collaborator
|
디밸롭에서 잘 되면 머지해주세영 |
There was a problem hiding this comment.
Pull request overview
프론트엔드 전반의 반응형 레이아웃을 개선하고, 출석 현황(특히 “나의 전체 출석 현황”) 데이터 구조를 주차/요일 단위로 정리해 UI에서 일관되게 보여주도록 수정하며, 백엔드에서는 운영진 전용 API 인가 강화 및 질문 좋아요/이해도 응답의 중복 방지를 위한 DB/조회 최적화를 포함하는 PR입니다.
Changes:
- 프론트: PIROCHECK/출석/과제/커리큘럼/헤더/로그인/온보딩 페이지 반응형 대응 및 일부 UX 개선(헤더 햄버거, 모달 닫기 버튼 등)
- 출석: “오늘 상세 출석 현황” 자동 조회 + “전체 출석 현황”을 주차→요일→차시 구조로 병합 렌더링
- 백엔드:
/api/admin/**운영진 권한 적용, CORS/Security 설정 보완, 질문 목록 좋아요 여부 배치 조회(N+1 완화), 좋아요/이해도응답 유니크 제약 추가
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| frontend/vercel.json | 프론트 /api/* 프록시 대상 도메인 변경 |
| frontend/src/pages/pirocheck/students/StudentList.module.css | 학생 목록 UI 반응형(폭/box-sizing 등) 개선 |
| frontend/src/pages/pirocheck/students/StudentDetail.module.css | 학생 상세 카드/입력/버튼 반응형 개선 |
| frontend/src/pages/pirocheck/students/StudentDetail.js | weekData.days null-safe 처리 |
| frontend/src/pages/pirocheck/PIroCheckMain.module.css | 메뉴 버튼 모바일 대응 |
| frontend/src/pages/pirocheck/deposit/Deposit.module.css | 보증금 화면 반응형 및 레이아웃 보강 |
| frontend/src/pages/pirocheck/attendance/Attendance.module.css | 출석 화면 반응형 및 관리자 메시지 스타일 추가 |
| frontend/src/pages/pirocheck/attendance/Attendance.js | 관리자 출석코드 생성/멤버 출석현황(주차/요일) 렌더 로직 변경 |
| frontend/src/pages/pirocheck/assignment/Assignment.module.css | 모달/텍스트/반응형 개선 및 닫기 버튼 스타일 추가 |
| frontend/src/pages/pirocheck/assignment/Assignment.js | 모달 닫기 버튼 추가, ADMIN 액션 위치 조정, 수정 시 로컬 state 갱신 |
| frontend/src/pages/OnboardingPage.module.css | 온보딩 모바일 폰트/레이아웃 조정 |
| frontend/src/pages/login/LoginPage.module.css | 로그인 타이틀 클릭 UX 및 모바일 폼 대응 |
| frontend/src/pages/login/LoginPage.js | 엔터키 로그인, 타이틀 클릭 시 홈 이동 |
| frontend/src/pages/curriculum/CurriculumPage.module.css | 커리큘럼 카드/폼 반응형 및 overflow 처리 개선 |
| frontend/src/pages/curriculum/CurriculumPage.js | sessionDate 기반 요일 계산 및 운영진 카드 기본 접힘 |
| frontend/src/components/Header.module.css | 헤더 햄버거/드로어/오버레이 반응형 UI 추가 |
| frontend/src/components/Header.js | 햄버거 메뉴 토글, 오버레이/드로어, body scroll lock 추가 |
| backend/src/main/resources/db/migration/V6__add_unique_constraints_like_and_understanding_response.sql | 좋아요/이해도 응답 중복 방지 유니크 제약 추가 |
| backend/src/main/java/com/example/Piroin/project/global/config/SecurityConfig.java | /api/admin/** 등 ADMIN 인가 강화 + cors 적용 |
| backend/src/main/java/com/example/Piroin/project/global/config/CorsConfig.java | CORS 허용 범위/메서드/헤더 설정 확장 |
| backend/src/main/java/com/example/Piroin/project/domain/question/service/QuestionService.java | 대댓글 제약 강화 + 좋아요 여부 배치 조회로 목록 N+1 완화 |
| backend/src/main/java/com/example/Piroin/project/domain/question/repository/QuestionLikeRepository.java | 좋아요한 질문 id 목록 배치 조회 쿼리 추가 |
| backend/src/main/java/com/example/Piroin/project/domain/curriculum/repository/CurriculumRepository.java | sessionDate 기반 존재/조회 메서드 추가 |
| backend/src/main/java/com/example/Piroin/project/domain/curriculum/exception/code/CurriculumErrorCode.java | 출석 불가 날짜 에러코드 추가 |
| backend/src/main/java/com/example/Piroin/project/domain/attendance/service/AttendanceService.java | 출석코드 생성 시 커리큘럼 날짜 검증 + 전체 출석현황 주차/요일 구조로 변경 |
| backend/src/main/java/com/example/Piroin/project/domain/attendance/repository/AttendanceRepository.java | (주석/정리) 일부 선언 변경 |
| backend/src/main/java/com/example/Piroin/project/domain/attendance/dto/AttendanceStatusRes.java | 응답 DTO를 “주차별/요일별” 구조로 변경 |
| backend/src/main/java/com/example/Piroin/project/domain/attendance/dto/AttendanceResDTO.java | 빈 DTO 파일 삭제 |
| backend/src/main/java/com/example/Piroin/project/domain/attendance/dto/AttendanceReqDTO.java | 빈 DTO 파일 삭제 |
| backend/src/main/java/com/example/Piroin/project/domain/attendance/dto/AttendanceDayStatusRes.java | 요일별 출석 상태 DTO 신규 추가 |
Comments suppressed due to low confidence (1)
backend/src/main/java/com/example/Piroin/project/domain/attendance/service/AttendanceService.java:71
activeCodes를 만료 처리하는 for-loop가 2번 존재해서, 같은 코드에 대해expire()가 중복 호출되고 이후 보증금 재계산 루프도 중복 실행됩니다. 의도는 만료+재계산을 한 번만 수행하는 것으로 보이므로 첫 번째 만료 루프를 제거하고 하나의 루프로 합쳐주세요.
// 1-3) 기존 활성화된 코드들 만료 처리
List<AttendanceCode> activeCodes = attendanceCodeRepository.findByIsExpiredFalse();
for (AttendanceCode activeCode : activeCodes) {
activeCode.expire();
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+260
to
+265
| StudySession studySession = | ||
| curriculumRepository | ||
| .findFirstBySessionDate(date) | ||
| .orElseThrow(() -> | ||
| new RuntimeException("세션이 존재하지 않습니다.") | ||
| ); |
Comment on lines
48
to
+58
| const handleGenerate = async () => { | ||
| const res = await authFetch('/api/admin/attendance/start', { method: 'POST' }); | ||
| const data = await res.json(); | ||
| setCode(data.code); | ||
| setHasCode(true); | ||
| if (data.isSuccess) { | ||
| setCode(data.result.code); | ||
| setHasCode(true); | ||
| setMessage(''); | ||
| } else { | ||
| setMessage(data.message); | ||
| } |
Comment on lines
+23
to
24
| // 쿠키/인증 정보 포함 요청 허용 | ||
| config.setAllowCredentials(true); |
Comment on lines
+1
to
+9
| -- QuestionLike: 같은 유저가 같은 질문에 좋아요를 중복으로 누르는 것을 DB 레벨에서 차단 | ||
| ALTER TABLE question_like | ||
| ADD CONSTRAINT uq_question_like_question_user | ||
| UNIQUE (question_id, user_id); | ||
|
|
||
| -- UnderstandingResponse: 같은 유저가 같은 이해도 체크에 중복 응답하는 것을 DB 레벨에서 차단 | ||
| ALTER TABLE understanding_response | ||
| ADD CONSTRAINT uq_understanding_response_check_user | ||
| UNIQUE (check_id, user_id); No newline at end of file |
| return ( | ||
| <div className={styles.modalOverlay}> | ||
| <div className={styles.modal}> | ||
| <button className={styles.modalCloseBtn} onClick={onClose}>✕</button> |
| return ( | ||
| <div className={styles.container}> | ||
| <h1 className={styles.title}>PIROIN</h1> | ||
| <h1 className={styles.title} onClick={() => navigate('/')}>PIROIN</h1> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#️⃣연관된 이슈
📝작업 내용
위와 같은 내용들을 구현하여 main에 머지하려 합니다.
스크린샷 (선택)
💬리뷰 요구사항(선택)