Add API documentation for TrackGo HTTP API and enhance employee management features

- Created a new `api.md` file detailing the TrackGo HTTP API, including authentication, user management, and employee operations.
- Updated `Employee` type to simplify user relation handling by replacing `UserRelation` with a more concise structure.
- Enhanced filtering capabilities in employee queries to support an array of positions.
- Refactored employee-related services and repositories to accommodate the new position filtering logic.
- Added unit and e2e tests to validate the new API documentation and employee management functionalities.
This commit is contained in:
shancheas
2026-08-27 15:07:20 +07:00
parent 4c45a4371e
commit 627aeac4a0
13 changed files with 270 additions and 47 deletions
@@ -45,8 +45,6 @@ describe('EmployeesRepository', () => {
userId: null,
};
const joinedRow = { employee: row, user: null };
const createInput = {
code: 'EMP_01',
name: 'Ada Lovelace',
@@ -144,7 +142,7 @@ describe('EmployeesRepository', () => {
name: 'Ada',
code: 'EMP',
phone: '+628',
position: 'sales',
position: ['sales', 'driver'],
status: 'draft',
search: 'ada',
limit: 10,