merge
This commit is contained in:
parent
e2332d49df
commit
6de0acd9df
1 changed files with 7 additions and 5 deletions
|
|
@ -1179,10 +1179,10 @@ export class PositionController extends Controller {
|
|||
posMaster.createdAt = new Date();
|
||||
posMaster.lastUpdatedAt = new Date();
|
||||
const saved = await this.posMasterRepository.save(posMaster, { data: request });
|
||||
|
||||
|
||||
// รอบสอง set ancestorDNA = id ที่เพิ่งได้มา
|
||||
if (chkRevision?.orgRevisionIsCurrent) {
|
||||
saved.ancestorDNA = saved.id; //โครงสร้างปัจจุบันเอาตัวเองเป็น dna
|
||||
saved.ancestorDNA = saved.id; //โครงสร้างปัจจุบันเอาตัวเองเป็น dna
|
||||
await this.posMasterRepository.save(saved, { data: request });
|
||||
}
|
||||
|
||||
|
|
@ -3691,7 +3691,7 @@ export class PositionController extends Controller {
|
|||
if (!dataMaster) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลตำแหน่งนี้");
|
||||
}
|
||||
|
||||
|
||||
if (dataMaster.orgRevision.orgRevisionIsCurrent) {
|
||||
await CreatePosMasterHistoryOfficer(dataMaster.id, request);
|
||||
}
|
||||
|
|
@ -3706,13 +3706,15 @@ export class PositionController extends Controller {
|
|||
current_holderId: null,
|
||||
statusReport: "PENDING",
|
||||
});
|
||||
|
||||
|
||||
dataMaster.positions.forEach(async (position) => {
|
||||
await this.positionRepository.update(position.id, {
|
||||
positionIsSelected: false,
|
||||
});
|
||||
});
|
||||
|
||||
if (dataMaster.orgRevision.orgRevisionIsCurrent) {
|
||||
await CreatePosMasterHistoryOfficer(dataMaster.id, request);
|
||||
}
|
||||
// //เช็คถ้า revision ปัจจุบันให้ปั๊มที่ profile
|
||||
// const chkRevision = await this.orgRevisionRepository.findOne({
|
||||
// where: { id: dataMaster.orgRevisionId },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue