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

@ -221,10 +221,11 @@ export class PermissionOrgController extends Controller {
? 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,
@ -234,7 +235,11 @@ export class PermissionOrgController extends Controller {
rank: _data.rank,
firstName: _data.firstName,
lastName: _data.lastName,
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),
posNo: shortName,
position: _data.position,
posType: _data.posType == null ? null : _data.posType.posTypeName,
@ -430,10 +435,11 @@ export class PermissionOrgController extends Controller {
: _data.profileTree.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,
@ -446,7 +452,11 @@ export class PermissionOrgController extends Controller {
rank: _data.profileTree.rank,
firstName: _data.profileTree.firstName,
lastName: _data.profileTree.lastName,
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),
posNo: shortName,
position: _data.profileTree.position,
posType: _data.profileTree.posType == null ? null : _data.profileTree.posType.posTypeName,