[FIX] 개최자 대시보드 운영 통계 복원 및 부스 신청 설비 조건 통합 - #54
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Walkthrough부스 신청 설비 조건을 전기·급수·배수·인터넷으로 확장했습니다. 신청 시 행사 일치 검증을 추가했습니다. 관리자 대시보드에는 행사·부스 통계와 시간대 차트를 추가했습니다. Changes부스 신청 설비 조건과 검증
관리자 통계 대시보드
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant OrganizerAdmin
participant statisticsApi
participant HourlyBarChart
OrganizerAdmin->>statisticsApi: 행사 요약 및 인기 부스 통계 조회
statisticsApi-->>OrganizerAdmin: 행사 통계 반환
OrganizerAdmin->>statisticsApi: 선택 부스의 시간대 및 전날 통계 조회
statisticsApi-->>OrganizerAdmin: 부스 통계 반환
OrganizerAdmin->>HourlyBarChart: 시간대별 통계 데이터 전달
HourlyBarChart-->>OrganizerAdmin: 예약·QR 방문·노쇼 차트 렌더링
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (3)
FE/src/pages/OrganizerAdmin.jsx (1)
308-311: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win날짜 변경 시 전날 통계를 다시 요청하지 마세요.
getPreviousDayStatistics(statBoothId)는hourlyDate를 사용하지 않습니다. 현재 날짜를 변경할 때마다 전날 통계 요청도 반복됩니다.시간대 통계와 전날 통계 조회를 분리하세요. 전날 통계는
statBoothId가 변경될 때만 조회하세요.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@FE/src/pages/OrganizerAdmin.jsx` around lines 308 - 311, 분리하여 날짜 변경 시 전날 통계가 재요청되지 않도록 수정하세요. OrganizerAdmin의 통계 조회 흐름에서 hourlyDate에 의존하는 getHourlyStatistics(statBoothId, hourlyDate)는 날짜 변경 시 실행하고, getPreviousDayStatistics(statBoothId)는 statBoothId 변경 시에만 실행되도록 각각의 effect 또는 조회 경로를 구성하세요.Source: Path instructions
FE/src/pages/BoothApply.jsx (2)
31-39: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win
FACILITY_OPTIONS를 설비 처리의 단일 소스로 사용해주세요.현재 배열은 체크박스와 아이콘 렌더링에 사용됩니다. 그러나
matchesFacility,emptyForm의 초기값,handleSubmit의 payload는 설비 키를 별도로 나열합니다. 새 설비를 추가하면 UI에는 표시되지만 필터 또는 payload에서 누락될 수 있습니다.
matchesFacility는FACILITY_OPTIONS.every(({ key, availableKey }) => ...)로 계산하세요. 초기값과 payload도 같은 배열에서 생성하면 확장 시 누락을 방지할 수 있습니다.수정 방향
const matchesFacility = (booth, values) => booth.status === "AVAILABLE" && - (!values.electricityRequired || booth.electricityAvailable) && - (!values.waterRequired || booth.waterAvailable) && - (!values.drainageRequired || booth.drainageAvailable) && - (!values.internetRequired || booth.internetAvailable); + FACILITY_OPTIONS.every( + ({ key, availableKey }) => !values[key] || booth[availableKey] + );
emptyForm과 제출 payload의 설비 필드도FACILITY_OPTIONS에서 생성하세요.PR 목표의 설비 옵션 일원화 요구를 기준으로 확인했습니다.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@FE/src/pages/BoothApply.jsx` around lines 31 - 39, FACILITY_OPTIONS를 설비 처리의 단일 소스로 사용하도록 matchesFacility의 조건을 FACILITY_OPTIONS.every(({ key, availableKey }) => ...) 기반으로 변경하세요. emptyForm 초기값과 handleSubmit payload의 설비 필드도 FACILITY_OPTIONS를 순회해 생성하고, 기존 개별 키 나열을 제거해 새 설비 추가 시 체크박스·필터·제출값이 함께 확장되도록 하세요.
176-193: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win설비 조합과 선택 해제 동작을 회귀 테스트로 고정해주세요.
다음 경우를 테스트하세요.
- 각 설비 요청과 제공 여부가 일치하는 경우
- 하나 이상의 설비가 부족한 경우
AVAILABLE이 아닌 부스인 경우- 선택한 부스가 새 설비 요청으로 부적격해지는 경우
- 선택한 부스를 다시 클릭해 선택 해제하는 경우
이 테스트가 있으면 설비 옵션을 추가하거나 조건식을 변경할 때 필터와 선택 상태의 회귀를 빠르게 확인할 수 있습니다.
PR 목표의 설비 조건 선택 흐름 변경을 기준으로 테스트 보강을 권장합니다.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@FE/src/pages/BoothApply.jsx` around lines 176 - 193, BoothApply의 설비 조건 및 선택 상태 흐름에 대한 회귀 테스트를 추가하세요. matchesFacility와 부스 필터링 로직이 각 설비 요청과 제공 여부 일치, 설비 부족, AVAILABLE이 아닌 부스 제외를 올바르게 처리하는지 검증하고, setField로 새 설비 요청이 현재 선택 부스를 부적격하게 만들 때 선택이 해제되는지 확인하세요. 또한 toggleBooth에서 선택된 부스를 다시 클릭하면 null로 해제되는 동작을 테스트하세요.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@FE/src/pages/BoothApply.jsx`:
- Around line 152-161: 신청 처리 서버 로직에서 부스의 AVAILABLE 상태와 설비 조건 검증에 행사 소속 검증을
추가하세요. recruitment.getEventId()와 booth.getEventId()를 비교해 불일치하면 신청을 거부하고, 부스를
APPLICATION_PENDING으로 변경하기 전에 이 검증이 수행되도록 하세요. 클라이언트의 matchesFacility 또는
isEligible 검증만으로 대체하지 말고 서버에서 강제하세요.
In `@FE/src/pages/OrganizerAdmin.jsx`:
- Around line 682-697: In the statistics controls near statBoothId and
hourlyDate, add unique ids to the booth select and date input, then add
associated labels using matching htmlFor values. Use sr-only for the labels if
needed to preserve the existing visual layout.
- Around line 851-870: Update the hourly chart rendering in the hours.map block
so each hour’s reservationCount, qrScanCount, and noShowCount is available
without relying on mouse hover. Make each hour item keyboard- and
touch-accessible with appropriate focus semantics, and add an accessible table
or visually hidden list exposing the same values to screen readers while
preserving the existing visual bars and tooltip.
- Around line 313-317: 분리된 시간대 통계와 전날 통계의 오류 상태를 각각 처리하도록 해당 통계 로딩 흐름을 수정하세요.
hourlyResult 실패 시 빈 데이터로 정상 상태를 표시하지 말고 시간대 패널에만 오류를 표시하며, prevResult 실패 시 전날 통계
패널에만 오류를 표시하세요. 한 요청이 성공한 경우 해당 패널의 데이터와 표시 상태는 유지하고, 공유 오류 상태에 단순히 &&를 ||로 바꾸지
마세요.
---
Nitpick comments:
In `@FE/src/pages/BoothApply.jsx`:
- Around line 31-39: FACILITY_OPTIONS를 설비 처리의 단일 소스로 사용하도록 matchesFacility의 조건을
FACILITY_OPTIONS.every(({ key, availableKey }) => ...) 기반으로 변경하세요. emptyForm
초기값과 handleSubmit payload의 설비 필드도 FACILITY_OPTIONS를 순회해 생성하고, 기존 개별 키 나열을 제거해 새
설비 추가 시 체크박스·필터·제출값이 함께 확장되도록 하세요.
- Around line 176-193: BoothApply의 설비 조건 및 선택 상태 흐름에 대한 회귀 테스트를 추가하세요.
matchesFacility와 부스 필터링 로직이 각 설비 요청과 제공 여부 일치, 설비 부족, AVAILABLE이 아닌 부스 제외를 올바르게
처리하는지 검증하고, setField로 새 설비 요청이 현재 선택 부스를 부적격하게 만들 때 선택이 해제되는지 확인하세요. 또한
toggleBooth에서 선택된 부스를 다시 클릭하면 null로 해제되는 동작을 테스트하세요.
In `@FE/src/pages/OrganizerAdmin.jsx`:
- Around line 308-311: 분리하여 날짜 변경 시 전날 통계가 재요청되지 않도록 수정하세요. OrganizerAdmin의 통계
조회 흐름에서 hourlyDate에 의존하는 getHourlyStatistics(statBoothId, hourlyDate)는 날짜 변경 시
실행하고, getPreviousDayStatistics(statBoothId)는 statBoothId 변경 시에만 실행되도록 각각의 effect
또는 조회 경로를 구성하세요.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 168758d3-2716-46a3-926f-1e9df0a2b5d4
📒 Files selected for processing (2)
FE/src/pages/BoothApply.jsxFE/src/pages/OrganizerAdmin.jsx
작업 배경
dev브랜치 머지 과정에서 개최자센터 대시보드의 STAT-API 통계 화면이 누락되어 복원합니다.또한 부스 신청 페이지에서 설비 조건 입력이 좌·우로 중복되어 있어 하나로 통합합니다.
변경 내용
1. 개최자 대시보드 운영 통계 복원 (
OrganizerAdmin.jsx)머지 과정에서 사라진 통계 섹션 3개를 복원했습니다.
설계 판단
overview.boothSummaries를 재사용해 추가 API 호출을 없앴습니다.Promise.allSettled를 사용해 통계 하나가 실패해도 나머지는 정상 표시됩니다. (팀원의 대시보드 로딩 패턴과 동일)statBoothId를 초기화해 이전 행사 부스 ID로 조회되는 것을 방지했습니다.2. 부스 신청 설비 조건 통합 (
BoothApply.jsx)좌측 "설비 조건 필터"(전기·급수)와 우측 신청서 "설비 요청 사항"(전기·급수·배수·인터넷)이 중복이었고 항목 수도 달랐습니다.
FACILITY_OPTIONS상수로 체크박스·부스 아이콘·필터 조건을 일원화toggleBooth)변경 파일
FE/src/pages/OrganizerAdmin.jsx
FE/src/pages/BoothApply.jsx
테스트
Summary by CodeRabbit
새로운 기능
개선 사항
버그 수정