This commit is contained in:
Adisak 2025-10-24 10:18:12 +07:00
parent e6329e7922
commit 94ea64247f

View file

@ -2115,22 +2115,22 @@ export class EmployeeTempPositionController extends Controller {
if (!dataMaster) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลตำแหน่งนี้");
}
if (dataMaster.current_holderId != null) {
const profile = await this.profileRepository.findOne({
where: {
id: dataMaster.current_holderId,
},
});
const _null: any = null;
if (profile != null) {
profile.posLevelId = _null;
profile.posTypeId = _null;
profile.position = _null;
profile.employeeOc = _null;
profile.positionEmployeePositionId = _null;
await this.profileRepository.save(profile);
}
}
// if (dataMaster.current_holderId != null) {
// const profile = await this.profileRepository.findOne({
// where: {
// id: dataMaster.current_holderId,
// },
// });
// const _null: any = null;
// if (profile != null) {
// profile.posLevelId = _null;
// profile.posTypeId = _null;
// profile.position = _null;
// profile.employeeOc = _null;
// profile.positionEmployeePositionId = _null;
// await this.profileRepository.save(profile);
// }
// }
await this.employeeTempPosMasterRepository.update(id, {
isSit: false,