Skip to content

Feature/t228 welcome modal onboarding - #67

Merged
ThienlocTran merged 12 commits into
devfrom
feature/T228-welcome-modal-onboarding
Aug 4, 2026
Merged

ThienlocTran merged 12 commits into
devfrom
feature/T228-welcome-modal-onboarding

Conversation

@25ThienNgoc

@25ThienNgoc 25ThienNgoc commented Aug 1, 2026 •

Copy link
Copy Markdown
Collaborator

check giúp tui

Summary by CodeRabbit

  • Tính năng mới

    • Thêm cửa sổ chào mừng, chỉ hiển thị một lần cho người dùng chưa xác nhận.
    • Bổ sung mục Hồ sơ và trang hiển thị thông tin cá nhân, vai trò, trạng thái tài khoản.
    • Dashboard hiển thị dữ liệu tổng quan, biểu đồ và KPI theo quyền truy cập.
  • Cải tiến

    • Điều chỉnh nội dung sản phẩm, kho, tồn kho, cảnh báo và phê duyệt theo quyền.
    • Bổ sung trạng thái tải, lỗi, thử lại và dữ liệu trống.
    • Cải thiện cách hiển thị loại phiếu trong danh sách phê duyệt.
    • Tăng cường xử lý phiên đăng nhập hết hạn và truy cập không được cấp quyền.

@coderabbitai

coderabbitai Bot commented Aug 1, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 7611e3e7-1252-4514-b12b-2466d66d75d0

📥 Commits

Reviewing files that changed from the base of the PR and between 90e25dc and c74e611.

📒 Files selected for processing (1)
  • src/components/WelcomeModal.vue

📝 Walkthrough

Walkthrough

PR thêm trang hồ sơ, dịch vụ hồ sơ và điều hướng mới. PR thêm modal chào mừng có trạng thái lưu trữ. PR mở rộng dashboard với dữ liệu tổng quan, biểu đồ và kiểm tra quyền. PR sửa hiển thị loại phiếu trong màn hình phê duyệt.

Changes

Hồ sơ và chào mừng

Layer / File(s) Summary
Luồng hồ sơ người dùng
src/services/profileService.js, src/router/index.js, src/components/AppSidebar.vue, src/views/ProfileView.vue
Thêm route /profile, dịch vụ tải và chuẩn hóa hồ sơ qua nhiều endpoint. Trang hồ sơ hiển thị trạng thái tải, lỗi, rỗng và dữ liệu tài khoản.
Modal chào mừng trong app shell
src/components/WelcomeModal.vue, src/App.vue
Thêm modal hỗ trợ nút, backdrop và Escape. App lưu trạng thái đã xem trong localStorage và mở modal theo layout.

Dashboard theo quyền

Layer / File(s) Summary
Dịch vụ dashboard và chặn request theo quyền
src/services/dashboardService.js, src/services/productService.js, src/services/warehouseService.js
Thêm API tổng quan dashboard. Request sản phẩm và kho trả về dữ liệu rỗng khi người dùng không có quyền.
Tải và render dashboard theo quyền
src/views/DashboardView.vue
Dashboard dùng Promise.allSettled, lọc KPI theo quyền và hiển thị biểu đồ với trạng thái tải, lỗi, rỗng và làm mới.

Hiển thị phê duyệt

Layer / File(s) Summary
Hiển thị loại phiếu theo bản ghi
src/views/ApprovalsView.vue
Bảng và modal chi tiết dùng loại phiếu của bản ghi đang xử lý. Nhãn đối tác đổi giữa “Khách hàng” và “Nhà cung cấp”.

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

Possibly related PRs

Suggested reviewers: thienloctran

🚥 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 đề nêu rõ thay đổi chính về modal chào mừng và onboarding, phù hợp với mục tiêu của pull request.
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/T228-welcome-modal-onboarding

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: 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/App.vue`:
- Around line 2-30: Update App.vue to watch isAuthLayout and run
shouldShowWelcomeModal() when the value transitions from true to false, so users
redirected from the auth layout receive onboarding. Preserve the existing
localStorage check and closeWelcomeModal behavior, and avoid opening the modal
while the route remains in the auth layout.

In `@src/components/WelcomeModal.vue`:
- Around line 40-45: Cập nhật WelcomeModal để quản lý focus khi mở và đóng: lưu
phần tử đang focus, chuyển focus vào dialog hoặc nút đầu tiên, giới hạn điều
hướng Tab trong modal để không chạm tới AppSidebar/AppTopbar phía sau, rồi khôi
phục focus đã lưu khi đóng. Gắn logic vào các hook hoặc hàm mở/đóng hiện có của
WelcomeModal, giữ nguyên hành vi modal ngoài việc bổ sung quản lý focus.

In `@src/views/DashboardView.vue`:
- Line 767: Update the chart render condition in the DashboardView template to
use the top-level dashboardOverview value directly, replacing
dashboardOverview.value with dashboardOverview. Preserve the existing v-else-if
rendering behavior for valid API responses.
🪄 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: c5459e1f-b010-46be-b86c-ca51be29d2a6

📥 Commits

Reviewing files that changed from the base of the PR and between 7b51677 and ae127eb.

📒 Files selected for processing (11)
  • src/App.vue
  • src/components/AppSidebar.vue
  • src/components/WelcomeModal.vue
  • src/router/index.js
  • src/services/dashboardService.js
  • src/services/productService.js
  • src/services/profileService.js
  • src/services/warehouseService.js
  • src/views/ApprovalsView.vue
  • src/views/DashboardView.vue
  • src/views/ProfileView.vue

Comment thread src/App.vue Outdated
Comment thread src/components/WelcomeModal.vue
Comment thread src/views/DashboardView.vue Outdated

@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: 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/components/WelcomeModal.vue`:
- Around line 65-71: Thêm thuộc tính tabindex="-1" vào phần tử div dialog được
tham chiếu bởi dialogRef trong WelcomeModal.vue để lời gọi
dialogRef.value.focus() trong enforceFocus có thể đặt lại focus vào modal khi
focus thoát ra ngoài. Giữ nguyên logic xử lý focus hiện tại.
🪄 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: e05aef5b-9491-4aa4-85d2-0071a8384665

📥 Commits

Reviewing files that changed from the base of the PR and between ae127eb and 90e25dc.

📒 Files selected for processing (3)
  • src/App.vue
  • src/components/WelcomeModal.vue
  • src/views/DashboardView.vue

Comment thread src/components/WelcomeModal.vue
</Teleport>
</template>

<style scoped>

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Nên tách css ra file riêng rồi gọi qua thui cho nó nhẹ class

@ThienlocTran
ThienlocTran merged commit 36bb254 into dev Aug 4, 2026
1 check passed
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.

2 participants