diff --git a/src/identity-and-account/employees/services/employees-get.service.ts b/src/identity-and-account/employees/services/employees-get.service.ts index 01890e2..3143273 100644 --- a/src/identity-and-account/employees/services/employees-get.service.ts +++ b/src/identity-and-account/employees/services/employees-get.service.ts @@ -40,6 +40,10 @@ export class EmployeesGetService { contracts: { select: { daily_expected_hours: true, + applicable_overtime: true, + on_call_allocation: true, + weekend_on_call_allocation: true, + phone_allocation: true, }, }, is_supervisor: true, @@ -63,6 +67,10 @@ export class EmployeesGetService { job_title: r.job_title ?? '', contract: { daily_expected_hours: r.contracts?.daily_expected_hours ?? 24, + applicable_overtime: r.contracts?.applicable_overtime ?? [], + phone_allocation: Number(r.contracts?.phone_allocation), + on_call_allocation: Number(r.contracts?.on_call_allocation), + weekend_on_call_allocation: Number(r.contracts?.weekend_on_call_allocation), }, external_payroll_id: r.external_payroll_id, employee_full_name: `${r.user.first_name} ${r.user.last_name}`, diff --git a/src/identity-and-account/employees/services/employees-update.service.ts b/src/identity-and-account/employees/services/employees-update.service.ts index e1fce64..0c14505 100644 --- a/src/identity-and-account/employees/services/employees-update.service.ts +++ b/src/identity-and-account/employees/services/employees-update.service.ts @@ -106,6 +106,7 @@ export class EmployeesUpdateService { external_payroll_id: dto.external_payroll_id, contracts: { update: { + applicable_overtime: dto.contract.applicable_overtime, daily_expected_hours: dto.contract.daily_expected_hours, on_call_allocation: dto.contract.on_call_allocation, weekend_on_call_allocation: dto.contract.weekend_on_call_allocation, diff --git a/src/identity-and-account/http-rest-cli-test/employee-list.test.http b/src/identity-and-account/http-rest-cli-test/employee-list.test.http new file mode 100644 index 0000000..0873b78 --- /dev/null +++ b/src/identity-and-account/http-rest-cli-test/employee-list.test.http @@ -0,0 +1 @@ +GET http://localhost:3000/employees/employee-list \ No newline at end of file