ข้อมูลลูกจ้างชั่วคราว ById

This commit is contained in:
Bright 2024-06-10 10:43:19 +07:00
parent b0cec06828
commit 288bdb2dff

View file

@ -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
*