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;