2.5 KiB
2.5 KiB
Management Change Users Employee Code Review
1. Summary
Enhanced the Users Management table to include an Employee Code column, aligned the single search box with server-side employee-code/name/email searching, and adjusted mobile visibility so the employee code remains visible while less important content is reduced on smaller screens.
2. Files Changed
src/types/data-table.tssrc/components/ui/table/data-table.tsxsrc/features/users/server/user-data.tssrc/features/users/components/users-table/index.tsxsrc/features/users/components/user-listing.tsxsrc/features/users/components/users-table/columns.tsxdocs/management-change-users-employee-code-review.md
3. Table Changes
- Added
employee_codeas the first visible data column. - Display label is
รหัสพนักงาน. - Missing employee codes render as
-. - Removed the organizer column from this table so the primary user-management fields match the requested order more closely.
- Kept row actions at the far right.
4. Search Changes
- Updated the single search box placeholder to
ค้นหาด้วยรหัสพนักงาน ชื่อ หรืออีเมล... - Search now runs server-side against:
- employee code
- name
- Removed unrelated search matching on username, department, and position for this listing.
- Aligned the search query parameter between the table toolbar and the server-prefetch path.
5. Sorting Changes
- Sorting remains enabled for:
employee_codefull_name
- Server-side sort mapping was narrowed to the supported fields for this change.
6. Responsive Changes
- Employee Code remains visible on mobile.
- Email is hidden inside the name cell on smaller breakpoints.
- Position and Role columns are hidden on mobile via responsive table-cell classes.
- The existing responsive table container behavior remains intact, so the table still scrolls inside its own area without pushing the full page width.
7. Manual Test Checklist
- Employee Code column appears.
- Employee Code sorting works.
- Search by Employee Code works.
- Search by Name works.
- Search by Email works.
- Placeholder updated.
- Missing employee code displays
-. - Mobile layout works structurally.
- Table does not overflow.
8. Known Limitations
- Visual breakpoint QA should still be checked in-browser for the final mobile/tablet polish.
- The table still includes the action column on the right because it remains necessary for user management operations.