From 436bcb002b4370099a3f3672595a564d882f44cf Mon Sep 17 00:00:00 2001 From: Moss <> Date: Fri, 13 Jun 2025 18:33:33 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B8=95=E0=B8=B3?= =?UTF-8?q?=E0=B9=81=E0=B8=AB=E0=B8=99=E0=B9=88=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/EvaluationController.ts | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/src/controllers/EvaluationController.ts b/src/controllers/EvaluationController.ts index 8d26e8e..f7e6d01 100644 --- a/src/controllers/EvaluationController.ts +++ b/src/controllers/EvaluationController.ts @@ -550,7 +550,14 @@ export class EvaluationController { select: ["detailBody", "detailFooter"], }); const before = null; - let typeTh = evaluation.type == "EXPERT" ? "ชำนาญการ" : evaluation.type == "EXPERTISE" ? "เชียวชาญ" : evaluation.type == "SPECIAL_EXPERT" ? "ชำนาญการพิเศษ":""; + let typeTh = + evaluation.type == "EXPERT" + ? "ชำนาญการ" + : evaluation.type == "EXPERTISE" + ? "เชียวชาญ" + : evaluation.type == "SPECIAL_EXPERT" + ? "ชำนาญการพิเศษ" + : ""; await new CallAPI() .GetData(request, `/org/profile/keycloak/commander/${request.user.sub}`) .then(async (x) => { @@ -2227,12 +2234,11 @@ export class EvaluationController { setLogDataDiff(request, { before: null, after: evaluationLogs }); } const before = structuredClone(evaluation); - let typeTh = evaluation.type == "EXPERT" ? "ชำนาญการ" : evaluation.type == "EXPERTISE" ? "เชียวชาญ" : evaluation.type == "SPECIAL_EXPERT" ? "ชำนาญการพิเศษ":""; evaluation.step = "PREPARE_DOC_V2"; evaluation.subjectDoc2 = evaluation.subject; evaluation.authorDoc2 = evaluation.author; - evaluation.assignedPosition = evaluation.position; //xxxxxxxxxx - evaluation.assignedPosLevel = typeTh; + evaluation.assignedPosition = evaluation.position; + evaluation.assignedPosLevel = evaluation.positionLevel; evaluation.commanderFullnameDoc2 = evaluation.commanderFullname; evaluation.commanderPositionDoc2 = evaluation.commanderPosition; evaluation.commanderAboveFullnameDoc2 = evaluation.commanderAboveFullname; @@ -3071,7 +3077,7 @@ export class EvaluationController { authorDoc2: string; subjectDoc2: string[]; assignedPosition: string; - assignedPosLevel?: string; + assignedPosLevel?: string; commanderFullnameDoc2: string; commanderPositionDoc2: string; commanderAboveFullnameDoc2: string; @@ -3095,7 +3101,7 @@ export class EvaluationController { evaluation.authorDoc2 = body.authorDoc2; evaluation.subjectDoc2 = body.subjectDoc2; evaluation.assignedPosition = body.assignedPosition; - evaluation.assignedPosLevel = body.assignedPosLevel ? body.assignedPosLevel : _null; + evaluation.assignedPosLevel = body.assignedPosLevel ? body.assignedPosLevel : ""; evaluation.commanderFullnameDoc2 = body.commanderFullnameDoc2; evaluation.commanderOrgDoc2 = body.commanderOrgDoc2 ?? _null; evaluation.commanderOrgOldDoc2 = body.commanderOrgOldDoc2 ?? _null;