update
This commit is contained in:
parent
08af004d4a
commit
18aa974c3d
4 changed files with 114 additions and 38 deletions
|
|
@ -237,14 +237,33 @@ export class ProfileGovernmentHistoryController extends Controller {
|
|||
}
|
||||
}
|
||||
let _OrgLeave:any = []
|
||||
let _profileSalary:any = null;
|
||||
if (record?.isLeave && record?.profileSalary.length > 0) {
|
||||
_OrgLeave = [
|
||||
record?.profileSalary[0].orgChild4 ? record?.profileSalary[0].orgChild4 : null,
|
||||
record?.profileSalary[0].orgChild3 ? record?.profileSalary[0].orgChild3 : null,
|
||||
record?.profileSalary[0].orgChild2 ? record?.profileSalary[0].orgChild2 : null,
|
||||
record?.profileSalary[0].orgChild1 ? record?.profileSalary[0].orgChild1 : null,
|
||||
record?.profileSalary[0].orgRoot ? record?.profileSalary[0].orgRoot : null,
|
||||
];
|
||||
// _OrgLeave = [
|
||||
// record?.profileSalary[0].orgChild4 ? record?.profileSalary[0].orgChild4 : null,
|
||||
// record?.profileSalary[0].orgChild3 ? record?.profileSalary[0].orgChild3 : null,
|
||||
// record?.profileSalary[0].orgChild2 ? record?.profileSalary[0].orgChild2 : null,
|
||||
// record?.profileSalary[0].orgChild1 ? record?.profileSalary[0].orgChild1 : null,
|
||||
// record?.profileSalary[0].orgRoot ? record?.profileSalary[0].orgRoot : null,
|
||||
// ];
|
||||
if (record.leaveType == "RETIRE") {
|
||||
_profileSalary = record?.profileSalary.length > 1
|
||||
? record?.profileSalary[1]
|
||||
: null;
|
||||
} else {
|
||||
_profileSalary = record?.profileSalary[0];
|
||||
}
|
||||
if (_profileSalary) {
|
||||
_OrgLeave = [
|
||||
_profileSalary.orgChild4 ?? null,
|
||||
_profileSalary.orgChild3 ?? null,
|
||||
_profileSalary.orgChild2 ?? null,
|
||||
_profileSalary.orgChild1 ?? null,
|
||||
_profileSalary.orgRoot ?? null,
|
||||
];
|
||||
} else {
|
||||
_OrgLeave = [];
|
||||
}
|
||||
}
|
||||
const orgLeave = _OrgLeave.filter((x:any) => x !== undefined && x !== null).join("\n");
|
||||
const data = {
|
||||
|
|
@ -254,8 +273,8 @@ export class ProfileGovernmentHistoryController extends Controller {
|
|||
posLevel: record?.posLevel == null ? null : record?.posLevel.posLevelName, //ระดับ
|
||||
posMasterNo: record?.isLeave == false
|
||||
? posMaster == null ? null : `${orgShortName} ${posMaster.posMasterNo}`
|
||||
: record && record?.profileSalary.length > 0
|
||||
? `${record?.profileSalary[0].posNoAbb} ${record?.profileSalary[0].posNo}`
|
||||
: _profileSalary != null
|
||||
? `${_profileSalary.posNoAbb} ${_profileSalary.posNo}`
|
||||
: null, //เลขที่ตำแหน่ง
|
||||
posType: record?.posType == null ? null : record?.posType.posTypeName, //ประเภท
|
||||
posExecutive:
|
||||
|
|
@ -373,14 +392,33 @@ export class ProfileGovernmentHistoryController extends Controller {
|
|||
}
|
||||
}
|
||||
let _OrgLeave:any = []
|
||||
let _profileSalary:any = null;
|
||||
if (record?.isLeave && record?.profileSalary.length > 0) {
|
||||
_OrgLeave = [
|
||||
record?.profileSalary[0].orgChild4 ? record?.profileSalary[0].orgChild4 : null,
|
||||
record?.profileSalary[0].orgChild3 ? record?.profileSalary[0].orgChild3 : null,
|
||||
record?.profileSalary[0].orgChild2 ? record?.profileSalary[0].orgChild2 : null,
|
||||
record?.profileSalary[0].orgChild1 ? record?.profileSalary[0].orgChild1 : null,
|
||||
record?.profileSalary[0].orgRoot ? record?.profileSalary[0].orgRoot : null,
|
||||
];
|
||||
// _OrgLeave = [
|
||||
// record?.profileSalary[0].orgChild4 ? record?.profileSalary[0].orgChild4 : null,
|
||||
// record?.profileSalary[0].orgChild3 ? record?.profileSalary[0].orgChild3 : null,
|
||||
// record?.profileSalary[0].orgChild2 ? record?.profileSalary[0].orgChild2 : null,
|
||||
// record?.profileSalary[0].orgChild1 ? record?.profileSalary[0].orgChild1 : null,
|
||||
// record?.profileSalary[0].orgRoot ? record?.profileSalary[0].orgRoot : null,
|
||||
// ];
|
||||
if (record.leaveType == "RETIRE") {
|
||||
_profileSalary = record?.profileSalary.length > 1
|
||||
? record?.profileSalary[1]
|
||||
: null;
|
||||
} else {
|
||||
_profileSalary = record?.profileSalary[0];
|
||||
}
|
||||
if (_profileSalary) {
|
||||
_OrgLeave = [
|
||||
_profileSalary.orgChild4 ?? null,
|
||||
_profileSalary.orgChild3 ?? null,
|
||||
_profileSalary.orgChild2 ?? null,
|
||||
_profileSalary.orgChild1 ?? null,
|
||||
_profileSalary.orgRoot ?? null,
|
||||
];
|
||||
} else {
|
||||
_OrgLeave = [];
|
||||
}
|
||||
}
|
||||
const orgLeave = _OrgLeave.filter((x:any) => x !== undefined && x !== null).join("\n");
|
||||
const data = {
|
||||
|
|
@ -393,8 +431,8 @@ export class ProfileGovernmentHistoryController extends Controller {
|
|||
? posMaster == null
|
||||
? null
|
||||
: `${orgShortName} ${posMaster.posMasterNo}`
|
||||
: record && record.profileSalary.length > 0
|
||||
? `${record?.profileSalary[0].posNoAbb} ${record?.profileSalary[0].posNo}`
|
||||
: _profileSalary != null
|
||||
? `${_profileSalary.posNoAbb} ${_profileSalary.posNo}`
|
||||
: null, //เลขที่ตำแหน่ง
|
||||
posType: record?.posType == null ? null : record?.posType.posTypeName, //ประเภท
|
||||
posExecutive:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue