Appearance
Employee And Staff — Business Rules
Tổng quan
Domain này là employee workspace của user module: danh sách nhân viên, modal create/edit, và hồ sơ chi tiết theo tab.
Nó không tự tính doanh thu, commission hay timekeeping; phần lớn chỉ hiển thị/aggregate dữ liệu từ domain khác.
Scope nghiệp vụ
| Nhóm | Vai trò | Ví dụ surface |
|---|---|---|
| Employee list | Danh sách, filter, mở modal edit | Employees.tsx, EmployeeTable |
| Employee create / edit | Tạo hoặc sửa hồ sơ cơ bản | EmployeeProfileCreate.tsx |
| Employee detail | Hồ sơ nhân viên theo tabs | EmployeeProfileDetail.tsx |
| Detail tabs | Information, devices, commission, tour income, revenue, login, feedback, statistic, timekeeping, violation, introduced | nested routes dưới ROUTE_EMPLOYEE_DETAIL |
Luồng chính
text
Employee list
-> filter / search / mở modal edit
-> mở detail route riêng
-> shell tabs hiển thị information / devices / commission / revenue / login / feedback / timekeeping / violation
-> mỗi tab đọc read models từ domain liên quanQuy tắc nghiệp vụ
| Mã | Quy tắc |
|---|---|
| BR-UES-001 | Employee list dùng modal EmployeeProfileCreate cho create/edit nhanh, nhưng detail vẫn là route riêng. |
| BR-UES-002 | Employee detail mặc định redirect về information. |
| BR-UES-003 | user module không sở hữu logic tính doanh thu, commission, tour income hay violation; nó chỉ làm workspace hiển thị. |
| BR-UES-004 | Toàn bộ employee routes hiện yêu cầu ITLeader hoặc ITStaff. |
Boundary
| Boundary | Ghi chú |
|---|---|
ecommerce | Revenue, referral summary, một phần employee-related read models |
wallet | Commission / payment-related reads |
timekeeping | Timekeeping history |
salary / settings | Violation, feedback/performance, phụ thuộc cấu hình tổ chức |
Rủi ro / Findings
| Mức | Finding |
|---|---|
| P1 | Employee workspace là shell tổng hợp; nhiều tab chỉ là facade của domain khác nên rất dễ drift nghĩa business. |
| P1 | personal-devices tab đang trỏ sai to, nên navigation tab có nguy cơ không đi đúng child route. |
| P1 | ROUTE_EMPLOYEE_INTRODUCED hiện được mount vừa như route standalone vừa như child tab, làm semantics của tab introduced không thật sự sạch. |
| P2 | Naming/copy text ở employee detail còn residue như Biên bản bi phạm, label giới thiệu viết thường. |