feat: 캘린더 supabase 연동 및 일정 수정 기능 추가 - #59
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthrough캘린더 mock·Zustand 기반 데이터를 제거하고 Supabase 조회·생성·수정·삭제 API와 React Query 훅을 연결했습니다. 이벤트 매핑 및 시간 처리를 추가했으며, CalendarView에 편집·오류·로딩·재시도·제출 상태를 반영했습니다. Changes캘린더 실데이터 연동
Estimated code review effort: 3 (Moderate) | ~30 minutes Sequence Diagram(s)sequenceDiagram
actor User
participant CalendarView
participant ReactQuery
participant CalendarAPI
participant Supabase
User->>CalendarView: 이벤트 조회 또는 CRUD 동작
CalendarView->>ReactQuery: query/mutation 실행
ReactQuery->>CalendarAPI: workspaceId와 이벤트 데이터 전달
CalendarAPI->>Supabase: calendar_events 조회/삽입/수정/삭제
Supabase-->>CalendarAPI: 결과 반환
CalendarAPI-->>ReactQuery: 데이터 또는 오류 반환
ReactQuery-->>CalendarView: 상태 갱신 및 query 무효화
CalendarView-->>User: 이벤트 목록과 상태 UI 표시
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@src/features/manage-calendar/ui/CalendarView.tsx`:
- Around line 326-335: Update the delete button handler in CalendarView to call
deleteCalendarEventMutation.mutate instead of mutateAsync, since the result is
not awaited and no rejection is caught; preserve the existing calendarEvent.id
argument and submission behavior.
🪄 Autofix (Beta)
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: ASSERTIVE
Plan: Pro Plus
Run ID: 0f7e013b-2578-4d03-aff8-6f9b63e23b37
📒 Files selected for processing (13)
src/entities/calendar-event/api/create-calendar-event.tssrc/entities/calendar-event/api/delete-calendar-event.tssrc/entities/calendar-event/api/get-calendar-events-by-workspace-id.tssrc/entities/calendar-event/api/update-calendar-event.tssrc/entities/calendar-event/api/use-calendar-events-by-workspace-id.tssrc/entities/calendar-event/api/use-create-calendar-event.tssrc/entities/calendar-event/api/use-delete-calendar-event.tssrc/entities/calendar-event/api/use-update-calendar-event.tssrc/entities/calendar-event/index.tssrc/entities/calendar-event/model/calendar-event.mapper.tssrc/entities/calendar-event/model/mock-calendar-events-by-workspace.tssrc/features/manage-calendar/model/use-calendar-events-store.tssrc/features/manage-calendar/ui/CalendarView.tsx
💤 Files with no reviewable changes (2)
- src/entities/calendar-event/model/mock-calendar-events-by-workspace.ts
- src/features/manage-calendar/model/use-calendar-events-store.ts
seongjinss555
left a comment
There was a problem hiding this comment.
리뷰 남겨두었습니다. 고생하셨습니다~
| createdBy: '', | ||
| }); | ||
|
|
||
| const { error } = await supabase |
There was a problem hiding this comment.
수정 대상이 0건인 경우에도 error가 null일 수 있어 성공으로 오인될 수 있습니다. update 결과를 반환받아 실제 수정 여부를 확인하고, 대상이 없으면 별도 에러를 반환하도록 보완하면 좋겠습니다.
There was a problem hiding this comment.
수정 후 select('id') 결과를 확인하도록 변경했습니다 !
Pull Request
작업 내용
time picker로 변경하고, 화면 표시는오전/오후형식으로 정리했습니다.작업 결과
HH:mm)으로 저장되고, UI에서는 읽기 쉬운 형식으로 표시됩니다.변경 사항
Added
calendar_events조회 APIChanged
type="time"으로 변경Fixed
실행화면
테스트
리뷰 체크리스트
feature/*->develop, 배포 시develop또는release/*->main)Type/#issue-number/description형식을 따릅니다.console.log, 주석, 임시 코드를 제거했습니다.리뷰 요청사항
calendar_events테이블에time,color전용 컬럼이 아직 없어 현재는description메타데이터로 저장하고 있습니다. 추후 스키마 분리 방향이 괜찮은지 같이 봐주시면 좋겠습니다.관련 이슈
Closes #55
Summary by CodeRabbit
time형식으로 변경해 입력 안정성을 높였습니다.