diff --git a/src/controllers/ProfileController.ts b/src/controllers/ProfileController.ts index 96ff31f0..5fc6129b 100644 --- a/src/controllers/ProfileController.ts +++ b/src/controllers/ProfileController.ts @@ -1631,6 +1631,7 @@ export class ProfileController extends Controller { profileId: profile.id, prefix: profile.prefix, rank: profile.rank, + isProbation: profile.isProbation, firstName: profile.firstName, lastName: profile.lastName, citizenId: profile.citizenId, diff --git a/src/controllers/ProfileEmployeeController.ts b/src/controllers/ProfileEmployeeController.ts index e2880e78..9f092b5d 100644 --- a/src/controllers/ProfileEmployeeController.ts +++ b/src/controllers/ProfileEmployeeController.ts @@ -809,6 +809,20 @@ export class ProfileEmployeeController extends Controller { return new HttpSuccess(historyProfile); } + /** + * API ออกคำสั่งลูกจ้าง + * + * @summary ORG_038 - ออกคำสั่งลูกจ้าง (ADMIN) # + * + */ + @Get("report") + async getReport(@Request() request: RequestWithUser) { + const profiles = await this.profileRepo.find({ + where: { statusTemp: "REPORT", employeeClass: "TEMP" }, + }); + return new HttpSuccess(profiles); + } + /** * API รายละเอียดรายการทะเบียนประวัติ * @@ -2853,20 +2867,6 @@ export class ProfileEmployeeController extends Controller { return new HttpSuccess(); } - /** - * API ออกคำสั่งลูกจ้าง - * - * @summary ORG_038 - ออกคำสั่งลูกจ้าง (ADMIN) # - * - */ - @Get("report") - async getReport(@Request() request: RequestWithUser) { - const profiles = await this.profileRepo.find({ - where: { statusTemp: "REPORT", employeeClass: "TEMP" }, - }); - return new HttpSuccess(profiles); - } - /** * API ออกคำสั่งลูกจ้าง * @@ -2957,38 +2957,38 @@ export class ProfileEmployeeController extends Controller { break; case "firstname": - [findProfile, total] = await this.profileRepo.findAndCount({ - where: { - keycloak: IsNull(), - firstName: Like(`%${body.keyword}%`), - }, - relations: ["posType", "posLevel", "current_holders", "profileSalarys"], - skip, - take, - }); + [findProfile, total] = await this.profileRepo.findAndCount({ + where: { + keycloak: IsNull(), + firstName: Like(`%${body.keyword}%`), + }, + relations: ["posType", "posLevel", "current_holders", "profileSalarys"], + skip, + take, + }); break; case "lastname": - [findProfile, total] = await this.profileRepo.findAndCount({ - where: { - keycloak: IsNull(), - lastName: Like(`%${body.keyword}%`), - }, - relations: ["posType", "posLevel", "current_holders", "profileSalarys"], - skip, - take, - }); + [findProfile, total] = await this.profileRepo.findAndCount({ + where: { + keycloak: IsNull(), + lastName: Like(`%${body.keyword}%`), + }, + relations: ["posType", "posLevel", "current_holders", "profileSalarys"], + skip, + take, + }); break; default: - [findProfile, total] = await this.profileRepo.findAndCount({ - where: { - keycloak: IsNull(), - }, - relations: ["posType", "posLevel", "current_holders", "profileSalarys"], - skip, - take, - }); + [findProfile, total] = await this.profileRepo.findAndCount({ + where: { + keycloak: IsNull(), + }, + relations: ["posType", "posLevel", "current_holders", "profileSalarys"], + skip, + take, + }); break; }