diff --git a/src/controllers/ReportController.ts b/src/controllers/ReportController.ts index 4a08172..452a4d0 100644 --- a/src/controllers/ReportController.ts +++ b/src/controllers/ReportController.ts @@ -319,6 +319,8 @@ export class ReoportController { lastOneYear: Extension.ToThaiNumber((thaiYear - 1).toString()), currentYear: Extension.ToThaiNumber(thaiYear.toString()), }; + let _orgNoNewLine = (org ? org : "-").replace(/\n/g, " "); + let typeTh = evaluation.type == "EXPERT" ? "ชำนาญการ" : evaluation.type == "EXPERTISE" ? "เชียวชาญ" : evaluation.type == "SPECIAL_EXPERT" ? "ชำนาญการพิเศษ":""; const dataEvaluation = { isEducationalQft: evaluation.isEducationalQft, isGovermantServiceHtr: evaluation.isGovermantServiceHtr, @@ -328,15 +330,18 @@ export class ReoportController { isHaveProLicense: evaluation.isHaveProLicense, isHaveMinPeriodOrHoldPos: evaluation.isHaveMinPeriodOrHoldPos, type: evaluation.type, + typeTh: typeTh, prefix: evaluation.prefix, - fullName: evaluation.fullName ? `${evaluation.fullName}` : "-", - position: evaluation.position ? evaluation.position : "-", - posNo: evaluation.posNo ? Extension.ToThaiNumber(evaluation.posNo) : "-", + fullName: evaluation.fullName ? `${evaluation.fullName}` : "", + position: evaluation.position ? evaluation.position : "", + posNo: evaluation.posNo ? Extension.ToThaiNumber(evaluation.posNo) : "", + posNoWithSym: evaluation.posNo ? `(${Extension.ToThaiNumber(evaluation.posNo)})` : "", oc: evaluation.oc ? evaluation.oc : "-", org: org ? org : "-", //สังกัด + orgNoNewLine: _orgNoNewLine ? _orgNoNewLine : "-", //สังกัดแบบไม่เว้นวรรค root: root ? root : "-", //หน่วยงาน salary: evaluation.salary ? Extension.ToThaiNumber(evaluation.salary) : "-", - positionLevel: evaluation.positionLevel ? evaluation.positionLevel : "-", + positionLevel: evaluation.positionLevel ? evaluation.positionLevel : "", birthDate: evaluation.birthDate != null && evaluation.birthDate != "" ? Extension.ToThaiNumber(