From 0a6760a276e263f4974aa9a2674a71e858faecd8 Mon Sep 17 00:00:00 2001 From: Kittapath Date: Wed, 15 May 2024 09:31:02 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B8=AA=E0=B8=96?= =?UTF-8?q?=E0=B8=B2=E0=B8=99=E0=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../KpiUserEvaluationController.ts | 38 +++++++++---------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/src/controllers/KpiUserEvaluationController.ts b/src/controllers/KpiUserEvaluationController.ts index e4d7a6b..e9fb26b 100644 --- a/src/controllers/KpiUserEvaluationController.ts +++ b/src/controllers/KpiUserEvaluationController.ts @@ -723,30 +723,30 @@ export class KpiUserEvaluationController extends Controller { } else if (profileId == item.commanderHighId) { role = "COMMANDERHIGH"; } - if (requestBody.status.trim().toUpperCase() == "DONE") { - if (role == "EVALUATOR") { - if (item.evaluationStatus == "EVALUATING_EVALUATOR") { - if (item.commanderId == null || item.commanderId == "") { - item.evaluationStatus = "COMPLETE"; - } else { - item.evaluationStatus = "EVALUATING_COMMANDER"; - } - item.evaluationResults = requestBody.status.trim().toUpperCase(); + // if (requestBody.status.trim().toUpperCase() == "DONE") { + if (role == "EVALUATOR") { + if (item.evaluationStatus == "EVALUATING_EVALUATOR") { + if (item.commanderId == null || item.commanderId == "") { + item.evaluationStatus = "COMPLETE"; + } else { + item.evaluationStatus = "EVALUATING_COMMANDER"; } - } else if (role == "COMMANDER") { - if (item.evaluationStatus == "EVALUATING_COMMANDER") { - if (item.commanderHighId == null || item.commanderHighId == "") { - item.evaluationStatus = "COMPLETE"; - } else { - item.evaluationStatus = "EVALUATING_COMMANDER_HIGH"; - } + item.evaluationResults = requestBody.status.trim().toUpperCase(); + } + } else if (role == "COMMANDER") { + if (item.evaluationStatus == "EVALUATING_COMMANDER") { + if (item.commanderHighId == null || item.commanderHighId == "") { + item.evaluationStatus = "COMPLETE"; + } else { + item.evaluationStatus = "EVALUATING_COMMANDER_HIGH"; } - } else { - item.evaluationStatus = "COMPLETE"; } } else { - // item.evaluationStatus = requestBody.status.trim().toUpperCase(); + item.evaluationStatus = "COMPLETE"; } + // } else { + // // item.evaluationStatus = requestBody.status.trim().toUpperCase(); + // } item.lastUpdateUserId = request.user.sub; item.lastUpdateFullName = request.user.name; await this.kpiUserEvalutionRepository.save(item);