Repository navigation
Feature/t226 inventory dashboard charts - #65
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughPR thêm API tổng quan, biểu đồ ApexCharts và các trạng thái tải, lỗi, rỗng cho dashboard. Giao diện phê duyệt lấy loại phiếu và nhãn đối tác từ từng bản ghi. ChangesDashboard và dịch vụ API
Giao diện phê duyệt
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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: 3
🤖 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/services/dashboardService.js`:
- Around line 4-7: Update the axios configuration in dashboardClient to include
the project-standard request timeout, ensuring stalled dashboard requests reject
and reach the existing catch/fallback flow. Keep the current baseURL and headers
unchanged, and reuse the established timeout configuration symbol or convention
if one exists.
In `@src/views/DashboardView.vue`:
- Around line 48-55: Update the chartSeries computed value in DashboardView.vue
to include totalStock only when the user has /inventory permission,
pendingApprovalsTotal only when they have /approvals or
/pending-export-approvals permission, and inventoryAlerts only when they have
/alerts permission. Preserve the corresponding labels and alignment for included
metrics, and render the chart’s empty state when no permitted metrics remain,
ensuring ADMIN/MANAGER/EMPLOYEE visibility matches the existing permission
checks.
- Around line 40-55: Update pendingApprovalsTotal so it safely handles a missing
pendingTasks object, not just a missing dashboardOverview value. Use optional
access or an equivalent fallback for both importReceipts and exportReceipts
while preserving the existing zero defaults; keep chartSeries unchanged.
🪄 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: fff01e2d-084c-4f99-b93e-f4992bbabf4b
📒 Files selected for processing (3)
src/services/dashboardService.jssrc/views/ApprovalsView.vuesrc/views/DashboardView.vue
…and safe pendingTasks fallback
check giúp tui
Summary by CodeRabbit
Tính năng mới
Cải tiến