diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index cb8d16da..477e886e 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -4686,6 +4686,7 @@ export class CommandController extends Controller { }[]; }, ) { + let _reqBody: any[] = []; const roleKeycloak = await this.roleKeycloakRepo.findOne({ where: { name: Like("USER") }, }); @@ -4854,13 +4855,28 @@ export class CommandController extends Controller { profile.dateAppoint = new Date(); profile.amount = item.amount == null ? _null : item.amount; profile.amountSpecial = item.amountSpecial == null ? _null : item.amountSpecial; - + _reqBody.push({ + profileId: profile.id, + prefix: profile.prefix, + firstName: profile.firstName, + lastName: profile.lastName, + citizenId: profile.citizenId, + root: posMaster.orgRoot.orgRootName, + rootId: posMaster.orgRootId, + rootShortName: posMaster.orgRoot.orgRootShortName + }); await this.profileEmployeeRepository.save(profile); await this.employeePositionRepository.save(positionNew); } }), ); - + await new CallAPI() + .PostData(req, + "/placement/appointment/employee-appoint-21/report/excecute", { profileEmps: _reqBody } + ) + .catch((error) => { + throw new Error("Failed. Cannot update status. ", error); + }); return new HttpSuccess(); }