แก้ format ฟิว posMasterNo (3) สำหรับบันทึกลงระบบที่พัฒนาบน .net
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m1s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m1s
This commit is contained in:
parent
8c9a62a378
commit
fa63953d75
1 changed files with 15 additions and 26 deletions
|
|
@ -407,8 +407,8 @@ export class ProfileController extends Controller {
|
||||||
? Extension.ToThaiNumber(Extension.ToThaiNumber(salary_raw[0].positionExecutive))
|
? Extension.ToThaiNumber(Extension.ToThaiNumber(salary_raw[0].positionExecutive))
|
||||||
: "",
|
: "",
|
||||||
org: `${salary_raw.length > 0 && salary_raw[0].orgChild4 && salary_raw[0].orgChild4 != "-"
|
org: `${salary_raw.length > 0 && salary_raw[0].orgChild4 && salary_raw[0].orgChild4 != "-"
|
||||||
? Extension.ToThaiNumber(Extension.ToThaiNumber(salary_raw[0].orgChild4)) + " "
|
? Extension.ToThaiNumber(Extension.ToThaiNumber(salary_raw[0].orgChild4)) + " "
|
||||||
: ""
|
: ""
|
||||||
}${salary_raw.length > 0 && salary_raw[0].orgChild3 && salary_raw[0].orgChild3 != "-"
|
}${salary_raw.length > 0 && salary_raw[0].orgChild3 && salary_raw[0].orgChild3 != "-"
|
||||||
? Extension.ToThaiNumber(Extension.ToThaiNumber(salary_raw[0].orgChild3)) + " "
|
? Extension.ToThaiNumber(Extension.ToThaiNumber(salary_raw[0].orgChild3)) + " "
|
||||||
: ""
|
: ""
|
||||||
|
|
@ -8797,32 +8797,21 @@ export class ProfileController extends Controller {
|
||||||
posMasterId: posMaster?.id,
|
posMasterId: posMaster?.id,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
const holder = profile.current_holders.find((x) => x.orgRevisionId == orgRevisionPublish.id);
|
||||||
|
const numPart = holder ? [holder.posMasterNoPrefix, holder.posMasterNo, holder.posMasterNoSuffix].filter((p) => p !== null && p !== undefined && p !== '').join(' ') : '';
|
||||||
const shortName =
|
const shortName =
|
||||||
profile.current_holders.length == 0
|
holder == null
|
||||||
? null
|
? null
|
||||||
: profile.current_holders.find((x) => x.orgRevisionId == orgRevisionPublish.id) != null &&
|
: holder.orgChild4 != null
|
||||||
profile.current_holders.find((x) => x.orgRevisionId == orgRevisionPublish.id)
|
? `${holder.orgChild4.orgChild4ShortName} ${numPart}`
|
||||||
?.orgChild4 != null
|
: holder.orgChild3 != null
|
||||||
? `${profile.current_holders.find((x) => x.orgRevisionId == orgRevisionPublish.id)?.orgChild4.orgChild4ShortName} ${profile.current_holders.find((x) => x.orgRevisionId == orgRevisionPublish.id)?.posMasterNo}`
|
? `${holder.orgChild3.orgChild3ShortName} ${numPart}`
|
||||||
: profile.current_holders.find((x) => x.orgRevisionId == orgRevisionPublish.id) != null &&
|
: holder.orgChild2 != null
|
||||||
profile.current_holders.find((x) => x.orgRevisionId == orgRevisionPublish.id)
|
? `${holder.orgChild2.orgChild2ShortName} ${numPart}`
|
||||||
?.orgChild3 != null
|
: holder.orgChild1 != null
|
||||||
? `${profile.current_holders.find((x) => x.orgRevisionId == orgRevisionPublish.id)?.orgChild3.orgChild3ShortName} ${profile.current_holders.find((x) => x.orgRevisionId == orgRevisionPublish.id)?.posMasterNo}`
|
? `${holder.orgChild1.orgChild1ShortName} ${numPart}`
|
||||||
: profile.current_holders.find((x) => x.orgRevisionId == orgRevisionPublish.id) !=
|
: holder.orgRoot != null
|
||||||
null &&
|
? `${holder.orgRoot.orgRootShortName} ${numPart}`
|
||||||
profile.current_holders.find((x) => x.orgRevisionId == orgRevisionPublish.id)
|
|
||||||
?.orgChild2 != null
|
|
||||||
? `${profile.current_holders.find((x) => x.orgRevisionId == orgRevisionPublish.id)?.orgChild2.orgChild2ShortName} ${profile.current_holders.find((x) => x.orgRevisionId == orgRevisionPublish.id)?.posMasterNo}`
|
|
||||||
: profile.current_holders.find((x) => x.orgRevisionId == orgRevisionPublish.id) !=
|
|
||||||
null &&
|
|
||||||
profile.current_holders.find((x) => x.orgRevisionId == orgRevisionPublish.id)
|
|
||||||
?.orgChild1 != null
|
|
||||||
? `${profile.current_holders.find((x) => x.orgRevisionId == orgRevisionPublish.id)?.orgChild1.orgChild1ShortName} ${profile.current_holders.find((x) => x.orgRevisionId == orgRevisionPublish.id)?.posMasterNo}`
|
|
||||||
: profile.current_holders.find((x) => x.orgRevisionId == orgRevisionPublish.id) !=
|
|
||||||
null &&
|
|
||||||
profile.current_holders.find((x) => x.orgRevisionId == orgRevisionPublish.id)
|
|
||||||
?.orgRoot != null
|
|
||||||
? `${profile.current_holders.find((x) => x.orgRevisionId == orgRevisionPublish.id)?.orgRoot.orgRootShortName} ${profile.current_holders.find((x) => x.orgRevisionId == orgRevisionPublish.id)?.posMasterNo}`
|
|
||||||
: null;
|
: null;
|
||||||
// const posMasterActs = await this.posMasterActRepository.find({
|
// const posMasterActs = await this.posMasterActRepository.find({
|
||||||
// relations: [
|
// relations: [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue