Skip to content

Feature/t150 export receipt details UI - #40

Closed
25ThienNgoc wants to merge 3 commits into
mainfrom
feature/T150-Export-Receipt-Details-UI
Closed

25ThienNgoc wants to merge 3 commits into
mainfrom
feature/T150-Export-Receipt-Details-UI

Conversation

@25ThienNgoc

@25ThienNgoc 25ThienNgoc commented Jul 11, 2026 •

Copy link
Copy Markdown
Collaborator

check và merge code giúp tui

Summary by CodeRabbit

  • Tính năng mới
    • Thêm màn hình quản lý phiếu xuất chờ duyệt, hỗ trợ phân trang và xem nhanh chi tiết.
    • Bổ sung xem chi tiết phiếu xuất, trạng thái tải/lỗi, cảnh báo sản phẩm vượt tồn và thao tác duyệt hoặc từ chối.
    • Cho phép nhấp vào từng dòng dữ liệu để mở chi tiết.
    • Giới hạn quyền truy cập và thao tác duyệt cho vai trò quản trị hoặc quản lý.
  • Cải tiến giao diện
    • Bổ sung hiển thị trạng thái, phân trang, hiệu ứng hàng có thể nhấp và giao diện responsive.

@coderabbitai

coderabbitai Bot commented Jul 11, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@25ThienNgoc, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 35 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

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 configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: fbf7ccad-a3c0-465f-aef9-3ed3d26c39ac

📥 Commits

Reviewing files that changed from the base of the PR and between e14c68f and db957e5.

📒 Files selected for processing (3)
  • src/components/StockOutApprovalDetail.vue
  • src/views/PendingExportApprovalsView.vue
  • src/views/StockDocumentDetailView.vue
📝 Walkthrough

Walkthrough

Thê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.

Changes

Phiếu xuất chờ duyệt

Layer / File(s) Summary
Service dữ liệu duyệt phiếu
src/services/stockOutApprovalService.js
Thêm dữ liệu mock cùng API lấy danh sách phân trang và chi tiết phiếu xuất.
Danh sách và tương tác bảng
src/components/DataTable.vue, src/views/PendingExportApprovalsView.vue
Hiển thị danh sách, phân trang, trạng thái tải/lỗi, chi tiết nhanh và sự kiện chọn hàng.
Chi tiết phiếu và cảnh báo tồn kho
src/components/StockOutApprovalDetail.vue
Hiển thị thông tin phiếu, sản phẩm vượt tồn và quyền thao tác duyệt/từ chối theo role.
Route và tích hợp màn hình
src/router/index.js, src/views/StockDocumentDetailView.vue, src/components/AppSidebar.vue
Thêm route được giới hạn cho ADMIN/MANAGER, tích hợp component chi tiết và cập nhật cách trình bày sidebar.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Tiêu đề đúng chủ đề UI chi tiết phiếu xuất, phù hợp với thay đổi về màn hình, route và service liên quan.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/T150-Export-Receipt-Details-UI

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between c99a015 and e14c68f.

📒 Files selected for processing (7)
  • src/components/AppSidebar.vue
  • src/components/DataTable.vue
  • src/components/StockOutApprovalDetail.vue
  • src/router/index.js
  • src/services/stockOutApprovalService.js
  • src/views/PendingExportApprovalsView.vue
  • src/views/StockDocumentDetailView.vue

Comment thread src/router/index.js
Comment on lines 67 to 70
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'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔒 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

Comment thread src/views/PendingExportApprovalsView.vue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant