feat(api): 최소 인원 조건 API 구현 - #84
Conversation
|
Warning Review limit reached
More reviews will be available in 56 minutes and 29 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (15)
Walkthrough
Changes최소 인력 규칙 API
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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: 2
🤖 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 `@apps/api/src/modules/staffing-rules/staffing-rules.service.ts`:
- Around line 17-26: The HH:mm ↔ Date conversion helpers are duplicated in
staffing-rules.service and organization.service, so extract the shared logic
into a common utility (for example a time helper under a shared utils path) and
reuse it from both places. Move the existing timeStringToDate and
dateToTimeString behavior into the shared module, then update
staffing-rules.service and organization.service to import the same helper
symbols instead of keeping local copies.
- Around line 69-77: `createMinimumStaffingRuleUpdateData` in
`staffing-rules.service.ts` allows partial PATCH updates to change `endsNextDay`
without rechecking the existing `startTime`/`endTime` range, so invalid time
combinations can be persisted. Fix this by having the update flow load the
current rule values, merge them with the incoming
`UpdateMinimumStaffingRuleRequest`, and run the same staffing-rule time-range
validation before saving; alternatively, update
`addMinimumStaffingRuleTimeRangeIssues` to validate in partial-update contexts
using existing values. Make sure the `endsNextDay`-only path is covered so
`startTime < endTime` cannot be stored with `endsNextDay = true`.
🪄 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: b69b7fef-bfb7-4a89-9292-2db5038180d3
📒 Files selected for processing (4)
apps/api/src/modules/staffing-rules/staffing-rules.handlers.tsapps/api/src/modules/staffing-rules/staffing-rules.service.tsapps/api/src/routes/index.tsapps/api/src/routes/staffing-rules.routes.ts
|
CodeRabbit 리뷰 반영 사항입니다.
|
…nto feature/78-staffing-rules-api
|
추가 반영 사항입니다.
검증 완료:
|
개요
최소 인원 조건 관리 화면에서 사용할 staffing-rules API를 구현합니다.
Closes #78
변경 사항
변경 유형
feat— 새로운 기능fix— 버그 수정refactor— 리팩터링 (기능 변경 없음)test— 테스트 코드perf— 성능 개선docs— 문서 수정chore— 빌드·설정 변경영향 범위
web—apps/webapi—apps/apidb—packages/databaseshared—packages/sharedrepo— 루트 설정·CI/CD·문서테스트 방법
pnpm format:checkpnpm --filter @fragment/shared buildpnpm --filter @fragment/database db:generatepnpm --filter @fragment/database buildpnpm --filter @fragment/web lintpnpm --filter @fragment/web typecheckpnpm --filter @fragment/web testpnpm --filter @fragment/api lintpnpm --filter @fragment/api typecheckpnpm --filter @fragment/api test체크리스트
packages/shared) 업데이트 (타입 변경 시)스크린샷 / 영상
API 변경만 있어 없음
리뷰 포인트
docs/API.md와 기존 shared schema의 필드명 기준을 그대로 따르는지