refactor(ADMIN-207): alert 기능 수정 - #4
Conversation
|
Caution Review failedThe pull request is closed. Walkthroughreact-toastify를 도입해 전역 토스트 컨테이너를 추가하고, 기존 alert/confirm 사용처를 통일된 알림 유틸로 교체했습니다. QR 스캐너의 스캔 처리/쓰로틀/카메라 새로고침 흐름을 재구성했으며, 일부 API 에러 처리 메시지와 반환값 일관성을 보강했습니다. 스타일 소폭 수정이 포함됩니다. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor U as User
participant H as Header
participant A as alert.tsx (showCustomConfirm)
participant Auth as logout()
participant R as Router
U->>H: 로그아웃 버튼 클릭
H->>A: showCustomConfirm("로그아웃 하시겠습니까?")
A-->>H: Promise<boolean> (확인/취소)
alt 확인(true)
H->>Auth: logout()
Auth-->>H: Promise<boolean> (성공/실패)
alt 성공
H->>A: showSuccess("로그아웃 성공")
H->>R: navigate('/login')
else 실패
H->>A: showError("로그아웃 실패")
end
else 취소(false)
Note right of H: 동작 없음
end
sequenceDiagram
autonumber
participant Q as QRScanner
participant LS as localStorage
participant API1 as GetQRCode(uuid)
participant API2 as PostMemberActivities(activityId, memberId)
participant A as alert.tsx
Q->>Q: QR 인식 콜백(쓰로틀 검사)
Q->>LS: getItem('currentActivityId')
alt 활동 ID 없음
Q->>A: showError("활동 ID 없음")
Note right of Q: 조기 종료
else 활동 ID 있음
Q->>API1: 회원 조회(uuid)
alt 조회 성공
API1-->>Q: memberId
Q->>API2: 참석 등록(activityId, memberId)
alt 등록 성공
Q->>A: showSuccess("참석 등록 성공")
Note right of Q: 쓰로틀 해제 타이머
else 등록 실패
Q->>A: showError("참석 등록 실패")
end
else 조회 실패
Q->>A: showError("회원 조회 실패")
end
end
Q->>Q: 카메라 새로고침 버튼
Q->>Q: 기존 스캐너 stop/start 또는 재초기화
Q->>A: showSuccess("카메라 새로고침 완료")
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. 📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro Cache: Disabled due to data retention organization setting Knowledge Base: Disabled due to data retention organization setting ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (10)
✨ Finishing touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit