Update DevelopmentController.ts
This commit is contained in:
parent
a428f59d9d
commit
fe6c92674b
1 changed files with 6 additions and 4 deletions
|
|
@ -1661,14 +1661,13 @@ export class DevelopmentController extends Controller {
|
|||
@Request() request: { user: Record<string, any> },
|
||||
) {
|
||||
const getDevelopment = await this.developmentHistoryRepository.find({
|
||||
where: { developmentId: id, isDone: false, type: "OFFICER" },
|
||||
where: { developmentId: id, isDone: false },
|
||||
relations: ["development"],
|
||||
});
|
||||
await Promise.all(
|
||||
getDevelopment.map(async (x) => {
|
||||
const _data = Object.assign(new DevelopmentHistory(), x);
|
||||
|
||||
if (x.type === "OFFICER") {
|
||||
if (x.type == "OFFICER") {
|
||||
await new CallAPI()
|
||||
.PostData(request, "org/profile/training", {
|
||||
profileId: x.profileId,
|
||||
|
|
@ -1690,7 +1689,10 @@ export class DevelopmentController extends Controller {
|
|||
.catch((x) => {
|
||||
_data.isDone = false;
|
||||
});
|
||||
} else if (x.type === "EMPLOYEE") {
|
||||
} else if (x.type == "EMPLOYEE") {
|
||||
console.log(
|
||||
"000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
|
||||
);
|
||||
await new CallAPI()
|
||||
.PostData(request, "org/profile-employee/training", {
|
||||
profileEmployeeId: x.profileId,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue