Repository navigation
Feature/t150 export receipt details UI - #40
25ThienNgoc wants to merge 3 commits into
Conversation
|
Warning Review limit reached
Next review available in: 35 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?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 reviews. How do review 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 refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThêm luồng phiếu xuất chờ duyệt gồm service mock, danh sách phân trang, xem chi tiết, cảnh báo vượt tồn, phân quyền route và thay thế placeholder bằng component chi tiết. ChangesPhiếu xuất chờ duyệt
Estimated code review effort: 4 (Complex) | ~45 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 `@src/router/index.js`:
- Around line 67-70: Giữ giới hạn ADMIN/MANAGER trong canAccessRoute cho UX,
đồng thời khi tích hợp API thật ở T144 phải bổ sung kiểm tra authorization tương
ứng tại backend cho endpoint danh sách phiếu xuất chờ duyệt; frontend guard
không thay thế backend authorization.
In `@src/views/PendingExportApprovalsView.vue`:
- Around line 61-71: Guard both previousPage and nextPage with isLoading before
changing page or calling fetchPendingApprovals, so rapid clicks cannot start
overlapping requests. Preserve the existing hasPreviousPage and hasNextPage
checks and only proceed when no approval fetch is currently in progress.
🪄 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: 8f04259c-3605-4652-b5b4-e01ec8e39f6e
📒 Files selected for processing (7)
src/components/AppSidebar.vuesrc/components/DataTable.vuesrc/components/StockOutApprovalDetail.vuesrc/router/index.jssrc/services/stockOutApprovalService.jssrc/views/PendingExportApprovalsView.vuesrc/views/StockDocumentDetailView.vue
| function canAccessRoute(path, role) { | ||
| if (path === '/employees' || path === '/users') return role === 'ADMIN' | ||
| if (path === '/approvals') return role === 'ADMIN' || role === 'MANAGER' | ||
| if (path === '/approvals' || path === '/pending-export-approvals') return role === 'ADMIN' || role === 'MANAGER' | ||
| if (/^\/stock-(in|out)\/(create|[^/]+\/edit)$/.test(path)) return role === 'ADMIN' || role === 'EMPLOYEE' |
There was a problem hiding this comment.
🔒 Security & Privacy | 🔵 Trivial
Frontend guard chỉ hỗ trợ UX, không thay thế backend authorization
canAccessRoute giới hạn /pending-export-approvals cho ADMIN/MANAGER đúng, nhưng đây chỉ là guard frontend. Khi tích hợp API thật (T144), đảm bảo backend cũng kiểm tra quyền tương ứng cho endpoint danh sách phiếu xuất chờ duyệt.
As per path instructions: "Nhắc rõ frontend guard chỉ hỗ trợ UX, không thay thế authorization ở backend."
🤖 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 `@src/router/index.js` around lines 67 - 70, Giữ giới hạn ADMIN/MANAGER trong
canAccessRoute cho UX, đồng thời khi tích hợp API thật ở T144 phải bổ sung kiểm
tra authorization tương ứng tại backend cho endpoint danh sách phiếu xuất chờ
duyệt; frontend guard không thay thế backend authorization.
Source: Path instructions
check và merge code giúp tui
Summary by CodeRabbit