feat(employee-list): added the new contract columns to the getEmployeeList route
This commit is contained in:
parent
3a65030764
commit
154c7063d8
|
|
@ -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}`,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
GET http://localhost:3000/employees/employee-list
|
||||
Loading…
Reference in New Issue
Block a user