Appearance
Account And Organization — Technical Map
Route / page map
| Surface | Main page / shell |
|---|---|
| System accounts | Users.tsx, UserCreate.tsx, UserDetail.tsx |
| Groups | Groups.tsx, GroupCreate.tsx |
| Branch | Branch.tsx, BranchCreate.tsx, BranchDetail.tsx |
| Department | Department.tsx, DepartmentDetail.tsx |
GraphQL / data model map
| Surface | Query / model chính |
|---|---|
| Accounts | GetAccountList, GetAccountsPagination, GetAccountByPk, UpdateAccount, CreateAccount, AdminChangePassword, AdminChangePin, OTP merge/forget-password actions trong account.graphql |
| Groups | GetGroups, GetAllGroupAndRoles, CreateGroup, UpdateGroups, DeleteGroups, CreateGroupMembers, DeleteGroupMembers, GetGroupMembers |
| Branch | branchGetPagination, branchGetByPk, branchCreate, BranchUpdate, deleteBranchWithWarehouse, GetBranchServiceConfig, InsertBranchServiceConfig |
| Department | departmentGetPagination, departmentGetByPk, departmentCreate, DepartmentUpdate, member/approver queries and mutations |
Boundary với module khác
| Module | Boundary kỹ thuật |
|---|---|
auth | Account creation/password/PIN/OTP merge flows là custom actions ngoài table CRUD thuần |
settings | ROUTE_BRANCH và ROUTE_DEPARTMENT dùng prefix /s/internal-settings/* |
ecommerce | Event handlers sync branch, department, branch_user, department_user, datasets tìm kiếm |
Rủi ro / Findings kỹ thuật
| Mức | Finding |
|---|---|
| Cao | GroupCreate.tsx chỉ gọi UpdateGroups; khi không có group_id, submit không tạo mới gì cả. |
| Cao | adminChangePassword và adminChangePin là action nhạy cảm; Hasura action permissions đang rộng theo role user, trong khi FE mới là nơi gắn gate IT. |
| Cao | ROUTE_USER_CREATE và ROUTE_GROUP_CREATE tồn tại ở constants/config nhưng route registration thực không tương ứng hoặc flow create đã bị comment khỏi list page. |
| Cao | module.ts có 2 entries cho [ROUTE_GROUP_EDIT] trong configs. |
| Trung bình | GroupCreate.tsx title dùng users.label.user_create và submitText là label.add, cho thấy copy-paste residue ở group flow. |
| Trung bình | useUserExporter.tsx map total_revenue từ row.revenue.total_sales, nên cột “Tổng thực thu” hiện đang trùng dữ liệu “Tổng doanh thu”. |