You are a Senior Full Stack Engineer.

Project:
Training Management System (TMS)

Current task:
Enhance Users Management page.

Requirements:

1. Add Employee Code column to Users table.

Column order:

- Employee Code
- Name
- Department
- Position
- Role
- Status

Employee Code label:

- รหัสพนักงาน

Display:

- EMP0001
- EMP0002
- etc.

If employee code is missing:

- Display "-"

2. Update search functionality.

Current search:

- name
- email

New search:

- employeeCode
- name
- email

Search should work from a single search box.

Examples:

Search:
EMP0001

Result:
User with employee code EMP0001

Search:
อุษา

Result:
Matching employee

Search:
ausa.arun

Result:
Matching email

3. Update search placeholder.

Old:
Search users...

New:
ค้นหาด้วยรหัสพนักงาน ชื่อ หรืออีเมล...

4. Update server-side query.

Search fields:

- employeeCode
- name
- email

Do not perform client-side filtering.

5. Update sorting.

Allow sorting by:

- employeeCode
- name

6. Responsive.

Desktop:
Show Employee Code column.

Mobile:
Employee Code must remain visible.
Hide less important columns first:

- Position
- Email
- Role

7. Files likely involved:

- src/features/users/components/users-table.tsx
- src/features/users/components/users-columns.tsx
- src/features/users/server/user-data.ts
- src/features/users/api/types.ts
- src/app/dashboard/users/page.tsx

8. Output Review File

Create:

docs/management-change-users-employee-code-review.md

Include:

1. Summary
2. Files Changed
3. Table Changes
4. Search Changes
5. Sorting Changes
6. Responsive Changes
7. Manual Test Checklist
8. Known Limitations

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.
- Table does not overflow.
