From fe6c92674badf0443415c3d0a4dd8b61ab6dfcd0 Mon Sep 17 00:00:00 2001 From: AnandaTon Date: Tue, 21 May 2024 18:17:47 +0700 Subject: [PATCH] Update DevelopmentController.ts --- src/controllers/DevelopmentController.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/controllers/DevelopmentController.ts b/src/controllers/DevelopmentController.ts index 3a18860..e4c765f 100644 --- a/src/controllers/DevelopmentController.ts +++ b/src/controllers/DevelopmentController.ts @@ -1661,14 +1661,13 @@ export class DevelopmentController extends Controller { @Request() request: { user: Record }, ) { 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,