diff --git a/src/controllers/ProfileEmployeeController.ts b/src/controllers/ProfileEmployeeController.ts index b716b39a..d5367569 100644 --- a/src/controllers/ProfileEmployeeController.ts +++ b/src/controllers/ProfileEmployeeController.ts @@ -2541,6 +2541,36 @@ export class ProfileEmployeeController extends Controller { return new HttpSuccess(); } + /** + * API ข้อมูลลูกจ้างชั่วคราว + * + * @summary ข้อมูลลูกจ้างชั่วคราว (ADMIN) + * + * @param {string} profileEmployeeId profileEmployeeId ทะเบียนประวัติลูกจ้างชั่วคราว + */ + @Get("information/{profileEmployeeId}") + async getInformationById(@Path() profileEmployeeId: string) { + const profileInformation = await this.profileRepo.findOne({ + where: { id: profileEmployeeId } + }); + if (!profileInformation) throw new HttpError(HttpStatus.NOT_FOUND, "ไม่พบข้อมูล"); + + const mapData = { + id: profileInformation.id, + positionEmployeeGroupId: profileInformation.positionEmployeeGroupId, + positionEmployeeLineId: profileInformation.positionEmployeeLineId, + positionEmployeePositionId: profileInformation.positionEmployeePositionId, + employeeOc: profileInformation.employeeOc, + employeeTypeIndividual: profileInformation.employeeTypeIndividual, + employeeWage: profileInformation.employeeWage, + employeeMoneyIncrease: profileInformation.employeeMoneyIncrease, + employeeMoneyAllowance: profileInformation.employeeMoneyAllowance, + employeeMoneyEmployee: profileInformation.employeeMoneyEmployee, + employeeMoneyEmployer: profileInformation.employeeMoneyEmployer, + }; + return new HttpSuccess(mapData); + } + /** * API ประวัติการแก้ไขข้อมูลลูกจ้างชั่วคราว *