diff --git a/src/controllers/ProfileEmployeeController.ts b/src/controllers/ProfileEmployeeController.ts index a0ee00a5..3ef3ca29 100644 --- a/src/controllers/ProfileEmployeeController.ts +++ b/src/controllers/ProfileEmployeeController.ts @@ -1616,16 +1616,16 @@ export class ProfileEmployeeController extends Controller { ) .andWhere( isProbation != undefined && isProbation != null - ? `profile.isProbation = ${isProbation}` + ? `profileEmployee.isProbation = ${isProbation}` : "1=1", ) .andWhere( isRetire != undefined && isRetire != null ? isRetire == false - ? `profile.dateLeave IS NULL` + ? `profileEmployee.dateLeave IS NULL` : isRetire == true && retireType != undefined && retireType != null - ? `profile.dateLeave IS NOT NULL AND profile.leaveType = '${retireType}'` - : `profile.dateLeave IS NOT NULL` + ? `profileEmployee.dateLeave IS NOT NULL AND profileEmployee.leaveType = '${retireType}'` + : `profileEmployee.dateLeave IS NOT NULL` : "1=1" ) .andWhere("profileEmployee.employeeClass LIKE :type", {