This commit is contained in:
AdisakKanthawilang 2025-04-04 10:07:34 +07:00
parent 351621ee18
commit b1b9700e40
7 changed files with 90 additions and 47 deletions

View file

@ -539,11 +539,11 @@ export class ProfileEmployeeController extends Controller {
: profileOc.current_holders.find((x) => x.orgRevisionId == orgRevision?.id)?.orgChild4;
// Construct org path
const _root = root ? `${root.orgRootName}` : "";
const _child1 = child1 ? `${child1.orgChild1Name}/` : "";
const _child2 = child2 ? `${child2.orgChild2Name}/` : "";
const _child3 = child3 ? `${child3.orgChild3Name}/` : "";
const _child4 = child4 ? `${child4.orgChild4Name}/` : "";
let _root = root?.orgRootName;
let _child1 =child1?.orgChild1Name;
let _child2 =child2?.orgChild2Name;
let _child3 =child3?.orgChild3Name;
let _child4 =child4?.orgChild4Name;
const cert_raw = await this.certificateRepository.find({
where: { profileEmployeeId: id },
@ -698,7 +698,11 @@ export class ProfileEmployeeController extends Controller {
? null
: Extension.ToThaiNumber(item.positionSalaryAmount.toLocaleString()),
FullName: `${profiles?.prefix}${profiles?.firstName} ${profiles?.lastName}`,
OcFullPath: `${_child4}${_child3}${_child2}${_child1}${_root}`,
OcFullPath: (_child4 == null ? "" : _child4 + "\n") +
(_child3 == null ? "" : _child3 + "\n") +
(_child2 == null ? "" : _child2 + "\n") +
(_child1 == null ? "" : _child1 + "\n") +
(_root == null ? "" : _root),
}))
: [
{
@ -787,7 +791,11 @@ export class ProfileEmployeeController extends Controller {
prefix: profiles?.prefix != null ? profiles.prefix : "",
firstName: profiles?.firstName != null ? profiles.firstName : "",
lastName: profiles?.lastName != null ? profiles.lastName : "",
ocFullPath: `${_child4}${_child3}${_child2}${_child1}${_root}`,
ocFullPath: (_child4 == null ? "" : _child4 + "\n") +
(_child3 == null ? "" : _child3 + "\n") +
(_child2 == null ? "" : _child2 + "\n") +
(_child1 == null ? "" : _child1 + "\n") +
(_root == null ? "" : _root),
birthDate: profiles?.birthDate
? Extension.ToThaiNumber(Extension.ToThaiFullDate2(profiles.birthDate))
: "",