fix posLevel

This commit is contained in:
Bright 2025-02-25 11:30:45 +07:00
parent 240f2aab7e
commit ece5bbf051

View file

@ -111,7 +111,7 @@ export class ProfileGovernmentEmployeeController extends Controller {
posLevel: posLevel:
record.posType == null && record.posLevel == null record.posType == null && record.posLevel == null
? null ? null
: `${record.posType.posTypeShortName}${record.posLevel.posLevelName}`, //ระดับ : `${record.posType.posTypeShortName} ${record.posLevel.posLevelName}`, //ระดับ
posMasterNo: posMaster == null ? null : `${orgShortName} ${posMaster.posMasterNo}`, //เลขที่ตำแหน่ง posMasterNo: posMaster == null ? null : `${orgShortName} ${posMaster.posMasterNo}`, //เลขที่ตำแหน่ง
posType: record.posType == null ? null : record.posType.posTypeName, //ประเภท posType: record.posType == null ? null : record.posType.posTypeName, //ประเภท
dateLeave: record.birthDate == null ? null : calculateRetireDate(record.birthDate), dateLeave: record.birthDate == null ? null : calculateRetireDate(record.birthDate),
@ -299,7 +299,9 @@ export class ProfileGovernmentEmployeeController extends Controller {
const data = { const data = {
org: org, //สังกัด org: org, //สังกัด
position: record.position, //ตำแหน่ง position: record.position, //ตำแหน่ง
posLevel: record.posLevel == null ? null : record.posLevel.posLevelName, //ระดับ posLevel: record.posLevel == null && record.posType == null
? null
: `${record.posType.posTypeShortName} ${record.posLevel.posLevelName}`, //ระดับ
posMasterNo: posMaster == null ? null : `${orgShortName} ${posMaster.posMasterNo}`, //เลขที่ตำแหน่ง posMasterNo: posMaster == null ? null : `${orgShortName} ${posMaster.posMasterNo}`, //เลขที่ตำแหน่ง
posType: record.posType == null ? null : record.posType.posTypeName, //ประเภท posType: record.posType == null ? null : record.posType.posTypeName, //ประเภท
dateLeave: record.birthDate == null ? null : calculateRetireDate(record.birthDate), //วันเกษียณ dateLeave: record.birthDate == null ? null : calculateRetireDate(record.birthDate), //วันเกษียณ