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) { if (!dataMaster) {
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลตำแหน่งนี้"); throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลตำแหน่งนี้");
} }
if (dataMaster.current_holderId != null) { // if (dataMaster.current_holderId != null) {
const profile = await this.profileRepository.findOne({ // const profile = await this.profileRepository.findOne({
where: { // where: {
id: dataMaster.current_holderId, // id: dataMaster.current_holderId,
}, // },
}); // });
const _null: any = null; // const _null: any = null;
if (profile != null) { // if (profile != null) {
profile.posLevelId = _null; // profile.posLevelId = _null;
profile.posTypeId = _null; // profile.posTypeId = _null;
profile.position = _null; // profile.position = _null;
profile.employeeOc = _null; // profile.employeeOc = _null;
profile.positionEmployeePositionId = _null; // profile.positionEmployeePositionId = _null;
await this.profileRepository.save(profile); // await this.profileRepository.save(profile);
} // }
} // }
await this.employeeTempPosMasterRepository.update(id, { await this.employeeTempPosMasterRepository.update(id, {
isSit: false, isSit: false,