Refactor: Admin 이벤트 보상 시스템 단순화 및 레거시 정리 (#319)#320
Conversation
- Notice 수동 입력 필드 제거, event DB 값 기반 자동 구성 - CS 이벤트 다중 지급 지원 (allowMultipleRewards) - CS 커스텀 이용권 선택 (customRewards DTO 추가) - 어드민 이벤트 드롭다운 기간 필터 제거 - CTA 자동 매핑 (보상 종류 기반) - POST /admin/api/tickets/grant API 제거 (CS 이벤트로 통합) - GET /admin/api/tickets/history API 제거 (ticket-grants로 통합) - Admin UI: 이용권 거래 내역 탭/이용권 지급 버튼 제거 - Admin UI: GrantEventRewardModal 리팩터링 - manual-reward-options에 userId 쿼리 추가 (isGranted 포함) - FEEDBACK/CS 이벤트 seed 마이그레이션 추가
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 풀 리퀘스트는 관리자 이벤트 보상 시스템의 전반적인 효율성과 사용성을 개선하는 데 중점을 둡니다. 불필요한 기능을 제거하고, 프로세스를 자동화하며, 사용자 인터페이스를 간소화하여 관리자가 보상을 보다 쉽고 정확하게 처리할 수 있도록 합니다. 특히 CS 이벤트에 대한 유연성을 높이고, 레거시 코드를 정리하여 시스템 유지보수성을 향상시켰습니다. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
- POST /admin/api/tickets/grant 제거 반영 - GET /admin/api/tickets/history 제거 반영 - GET /admin/api/events/manual-reward-options 문서 추가
There was a problem hiding this comment.
Code Review
This pull request significantly refactors the admin dashboard's reward granting system. The 'Ticket History' tab and its associated components, including ComingSoonTab and TicketHistoryTab, have been entirely removed from the UI and backend. The manual ticket granting modal (GrantTicketModal) has also been deleted, consolidating all reward issuance into the GrantEventRewardModal. This modal has been refactored to load event options internally, support custom reward quantities for Customer Service (CS) events, and dynamically generate notice previews and CTA links/texts based on the selected rewards. Backend changes reflect these UI updates by removing ticket granting DTOs and related facade methods, enhancing event reward DTOs with rewardConfig, allowMultipleRewards, and isGranted fields, and introducing a CustomRewardItemDTO for flexible reward definitions. The event service now includes methods to retrieve all manual reward events and check if a user has already been granted a specific event reward. Database migrations were added to seed 'FEEDBACK' and 'CS' events with manualRewardOnly and allowMultipleRewards configurations. Review comments highlighted the need for error handling when event options fail to load and suggested removing redundant descriptive text in the GrantEventRewardModal UI.
- Admin UI: 보상 안내 모달 체크박스 제거 → 항상 생성 - AdminGrantRewardReqDTO: createNotice 필드 제거 - buildNoticeFromEvent: createNotice 파라미터 제거
* Fix: 포트폴리오 내용 글자수 임시 변경 (#313) * Fix: rag 요청 실패 시 fallback 로직 추가 (#312) * fix: rag 생성 실패 시 fallback 코드 추가 - rag 생성 호출이 실패하면 상태를 failed로 바꾼다. * fix: AI 서버 스펙 변경에 맞춰 API 스펙 수정 및 엔티티 마이그레이션 - 누락된 failed enum을 추가 - 첨삭 총평 필드를 correction_item에서 제거하고 portfolio-correction에 추가 * feat: correctionStatus enum 상태 다양화 - rag가 실패한 경우와 첨삭이 실패한 경우를 분리하기 위해 enum 상태를 추가함. * refactor: try/catch 구문을 사용해 오류 처리 로직 개선 - async/await 비동기 오류 처리로 오류 처리 로직을 더 명확하고 읽기 쉽게 개선 * fix: createdAt 시간 오류 해결 (#315) * Fix: 인사이트로그 시간 에러 해결 (#317) - 채팅 멘션 주석처리 * Fix: 시간 UTC로 롤백 (#318) * Refactor: Admin 이벤트 보상 시스템 단순화 및 레거시 정리 (#319) (#320) * refactor: Admin 이벤트 보상 시스템 단순화 및 레거시 정리 (#319) - Notice 수동 입력 필드 제거, event DB 값 기반 자동 구성 - CS 이벤트 다중 지급 지원 (allowMultipleRewards) - CS 커스텀 이용권 선택 (customRewards DTO 추가) - 어드민 이벤트 드롭다운 기간 필터 제거 - CTA 자동 매핑 (보상 종류 기반) - POST /admin/api/tickets/grant API 제거 (CS 이벤트로 통합) - GET /admin/api/tickets/history API 제거 (ticket-grants로 통합) - Admin UI: 이용권 거래 내역 탭/이용권 지급 버튼 제거 - Admin UI: GrantEventRewardModal 리팩터링 - manual-reward-options에 userId 쿼리 추가 (isGranted 포함) - FEEDBACK/CS 이벤트 seed 마이그레이션 추가 * docs: API.md 제거된 엔드포인트 반영 (#319) - POST /admin/api/tickets/grant 제거 반영 - GET /admin/api/tickets/history 제거 반영 - GET /admin/api/events/manual-reward-options 문서 추가 * refactor: createNotice 체크박스 제거, 항상 notice 생성 (#319) - Admin UI: 보상 안내 모달 체크박스 제거 → 항상 생성 - AdminGrantRewardReqDTO: createNotice 필드 제거 - buildNoticeFromEvent: createNotice 파라미터 제거 * fix: 이벤트 옵션 로드 실패 시 에러 메시지 표시 (#319) --------- Co-authored-by: 김덕환 <sachi009955@gmail.com>
* Fix: 포트폴리오 내용 글자수 임시 변경 (#313) * Fix: rag 요청 실패 시 fallback 로직 추가 (#312) * fix: rag 생성 실패 시 fallback 코드 추가 - rag 생성 호출이 실패하면 상태를 failed로 바꾼다. * fix: AI 서버 스펙 변경에 맞춰 API 스펙 수정 및 엔티티 마이그레이션 - 누락된 failed enum을 추가 - 첨삭 총평 필드를 correction_item에서 제거하고 portfolio-correction에 추가 * feat: correctionStatus enum 상태 다양화 - rag가 실패한 경우와 첨삭이 실패한 경우를 분리하기 위해 enum 상태를 추가함. * refactor: try/catch 구문을 사용해 오류 처리 로직 개선 - async/await 비동기 오류 처리로 오류 처리 로직을 더 명확하고 읽기 쉽게 개선 * fix: createdAt 시간 오류 해결 (#315) * Fix: 인사이트로그 시간 에러 해결 (#317) - 채팅 멘션 주석처리 * Fix: 시간 UTC로 롤백 (#318) * Refactor: Admin 이벤트 보상 시스템 단순화 및 레거시 정리 (#319) (#320) * refactor: Admin 이벤트 보상 시스템 단순화 및 레거시 정리 (#319) - Notice 수동 입력 필드 제거, event DB 값 기반 자동 구성 - CS 이벤트 다중 지급 지원 (allowMultipleRewards) - CS 커스텀 이용권 선택 (customRewards DTO 추가) - 어드민 이벤트 드롭다운 기간 필터 제거 - CTA 자동 매핑 (보상 종류 기반) - POST /admin/api/tickets/grant API 제거 (CS 이벤트로 통합) - GET /admin/api/tickets/history API 제거 (ticket-grants로 통합) - Admin UI: 이용권 거래 내역 탭/이용권 지급 버튼 제거 - Admin UI: GrantEventRewardModal 리팩터링 - manual-reward-options에 userId 쿼리 추가 (isGranted 포함) - FEEDBACK/CS 이벤트 seed 마이그레이션 추가 * docs: API.md 제거된 엔드포인트 반영 (#319) - POST /admin/api/tickets/grant 제거 반영 - GET /admin/api/tickets/history 제거 반영 - GET /admin/api/events/manual-reward-options 문서 추가 * refactor: createNotice 체크박스 제거, 항상 notice 생성 (#319) - Admin UI: 보상 안내 모달 체크박스 제거 → 항상 생성 - AdminGrantRewardReqDTO: createNotice 필드 제거 - buildNoticeFromEvent: createNotice 파라미터 제거 * fix: 이벤트 옵션 로드 실패 시 에러 메시지 표시 (#319) --------- Co-authored-by: 강효인 <hyoin1704@gmail.com>
Summary
Admin 이벤트 보상 지급 시스템을 단순화하고, 불필요한 API와 레거시 코드를 제거합니다.
Changes
Backend (NestJS)
EventOpsConfig에allowMultipleRewards필드 추가 (CS 이벤트 다중 지급 지원)AdminGrantRewardReqDTO단순화: notice 수동 입력 필드 5개 제거(noticeTitle,noticeBody,noticeCtaText,noticeCtaLink,displayReason),customRewards추가/experience, 첨삭만 →/correction, 둘 다 →/experiencemanual-reward-optionsAPI에userId쿼리 파라미터 추가 (isGranted 포함)allowMultipleRewards시 중복 보상 검증 스킵, 커스텀 이용권 지원제거된 API
POST /admin/api/tickets/grant→ CS 이벤트로 통합GET /admin/api/tickets/history→GET /admin/api/ticket-grants로 통합Admin UI (admin-client/)
GrantEventRewardModal리팩터링:GrantTicketModal,TicketHistory.js파일 삭제DB
Type of Change
Target Environment
dev)Related Issues
Testing
/admin/dashboard)Checklist
docs/development/CODE_STYLE.md)docs/development/GIT_CONVENTIONS.md)docs/development/NAMING_CONVENTIONS.md)pnpm run build)Screenshots
N/A
Additional Notes
tickets/grant,tickets/history)를 사용하는 외부 클라이언트가 없는지 확인 필요ops_config에allowMultipleRewards: true가 마이그레이션에 포함되어 있음