This commit is contained in:
AdisakKanthawilang 2025-04-04 09:52:59 +07:00
parent 79ada6fcee
commit bb69bb5096
6 changed files with 133 additions and 74 deletions

View file

@ -240,11 +240,11 @@ export class ProfileController extends Controller {
profile && profile.registrationZipCode != null
? ` รหัสไปรษณีย์ ${profile.registrationZipCode}`
: "";
let _root = root == null || root == undefined ? "" : `${root.orgRootName}`;
let _child1 = child1 == null || child1 == undefined ? "" : `${child1.orgChild1Name}/`;
let _child2 = child2 == null || child2 == undefined ? "" : `${child2.orgChild2Name}/`;
let _child3 = child3 == null || child3 == undefined ? "" : `${child3.orgChild3Name}/`;
let _child4 = child4 == null || child4 == undefined ? "" : `${child4.orgChild4Name}/`;
let _root = root?.orgRootName;
let _child1 =child1?.orgChild1Name;
let _child2 =child2?.orgChild2Name;
let _child3 =child3?.orgChild3Name;
let _child4 =child4?.orgChild4Name;
const salary_raw = await this.salaryRepo.find({
// select: [
@ -400,7 +400,11 @@ export class ProfileController extends Controller {
? Extension.ToThaiNumber(Extension.ToThaiNumber(salary_raw[0].orgRoot))
: ""
}`,
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),
educations: Education,
salarys: salarys.map((item) => {
return {
@ -5422,11 +5426,11 @@ export class ProfileController extends Controller {
_data.current_holders.find((x) => x.orgRevisionId == revisionId) == null
? null
: _data.current_holders.find((x) => x.orgRevisionId == revisionId)?.orgChild4;
let _child1 = child1 == null ? "" : `${child1.orgChild1Name}/`;
let _child2 = child2 == null ? "" : `${child2.orgChild2Name}/`;
let _child3 = child3 == null ? "" : `${child3.orgChild3Name}/`;
let _child4 = child4 == null ? "" : `${child4.orgChild4Name}/`;
let _root = root?.orgRootName;
let _child1 =child1?.orgChild1Name;
let _child2 =child2?.orgChild2Name;
let _child3 =child3?.orgChild3Name;
let _child4 =child4?.orgChild4Name;
return {
id: _data.id,
@ -5448,7 +5452,11 @@ export class ProfileController extends Controller {
root: root == null ? null : root.orgRootName,
orgRootShortName: root == null ? null : root.orgRootShortName,
orgRevisionId: root == null ? null : root.orgRevisionId,
org: `${_child4}${_child3}${_child2}${_child1}${root?.orgRootName ?? ""}`,
org: (_child4 == null ? "" : _child4 + "\n") +
(_child3 == null ? "" : _child3 + "\n") +
(_child2 == null ? "" : _child2 + "\n") +
(_child1 == null ? "" : _child1 + "\n") +
(_root == null ? "" : _root),
};
}),
);
@ -6244,11 +6252,12 @@ export class ProfileController extends Controller {
_data.current_holders.find((x) => x.orgRevisionId == findRevision.id) == null
? null
: _data.current_holders.find((x) => x.orgRevisionId == findRevision.id)?.orgChild4;
let _child1 = child1 == null ? "" : `${child1.orgChild1Name} `;
let _child2 = child2 == null ? "" : `${child2.orgChild2Name} `;
let _child3 = child3 == null ? "" : `${child3.orgChild3Name} `;
let _child4 = child4 == null ? "" : `${child4.orgChild4Name} `;
let _root = root?.orgRootName;
let _child1 =child1?.orgChild1Name;
let _child2 =child2?.orgChild2Name;
let _child3 =child3?.orgChild3Name;
let _child4 =child4?.orgChild4Name;
return {
id: _data.id,
@ -6271,7 +6280,11 @@ export class ProfileController extends Controller {
root: root == null ? null : root.orgRootName,
orgRootShortName: root == null ? null : root.orgRootShortName,
orgRevisionId: root == null ? null : root.orgRevisionId,
org: `${_child4}${_child3}${_child2}${_child1}${root?.orgRootName ?? ""}`,
org: (_child4 == null ? "" : _child4 + "\n") +
(_child3 == null ? "" : _child3 + "\n") +
(_child2 == null ? "" : _child2 + "\n") +
(_child1 == null ? "" : _child1 + "\n") +
(_root == null ? "" : _root),
};
}),
);