Skip to content

Employee And Staff — Technical Map

Route / page map

SurfaceMain page / shell
Employee listEmployees.tsx
Employee create/edit modalEmployeeProfileCreate.tsx
Employee detail shellEmployeeProfileDetail.tsx
Detail tabsEmployeeProfileInfo, EmployeeProfilePersonalDevices, EmployeeProfileCommission, EmployeeProfileTourIncome, EmployeeProfileRevenue, EmployeeProfileLogin, EmployeeProfileFeedback, EmployeeProfileStatistic, EmployeeProfileTimekeepingHistory, EmployeeProfileViolationRecord, EmployeeIntroduce
Staff-style listReportStaff query lives in account.graphql, but report surface thực nằm ở module report

GraphQL / data model map

SurfaceQuery / model chính
Employee baseGetEmployeeProfilePagination, GetEmployeeProfileByPk, UpdateEmployeeProfile, leaveEmployeeOff, AccountActivity trong employee_profile.graphql
Employee feedbackGetProjectTasksByUser, GetEmployeeFeedbackStats, GetEmployeeFeedbackRanks, rating charts trong employee_feedback.graphql
Referral introducedGetBranchUsersReferralSummary, GetBranchUsersReferralSummaryAggregate, GetReferredCustomer, GetOrder
Devices / authGetDeviceUser, UpdateDeviceUser, AddDeviceUser, password/PIN/account helpers trong account.graphql
Revenue / commission shelldữ liệu được mount từ tab components, nhưng source thật nằm ngoài user module

Boundary với module khác

ModuleBoundary kỹ thuật
ecommerceRevenue/referral/order-related reads
walletCommission/payment related reads
timekeepingTimekeeping history tabs
reportMột số staff/performance lenses thực ra có report song song ở module report

Rủi ro / Findings kỹ thuật

MứcFinding
CaoTrong EmployeeProfileDetail.tsx, tab personal-devices đang dùng to: ROUTE_EMPLOYEE_DETAIL thay vì ROUTE_EMPLOYEE_DETAIL_PERSONAL_DEVICES.
CaoROUTE_EMPLOYEE_INTRODUCED được đăng ký 2 lần: một route standalone và một child dưới employee detail.
Trung bìnhEmployeeProfileRevenue.tsxEmployeeProfileTourIncome.tsx reuse globalStore.userBehavior của report routes, nên filter có thể bleed giữa employee workspace và report standalone.
Trung bìnhCopy text/label trong shell detail còn drift: Biên bản bi phạm, giới thiệu viết thường.
Trung bìnhEmployees.tsx pha hai mode tương tác khác nhau: list page mở modal edit, nhưng detail lại chạy bằng route shell riêng.