org /n
This commit is contained in:
parent
79ada6fcee
commit
bb69bb5096
6 changed files with 133 additions and 74 deletions
|
|
@ -1721,15 +1721,19 @@ export class CommandController extends Controller {
|
||||||
: profile?.current_holders.find((x) => x.orgRevisionId == orgRevisionActive.id)
|
: profile?.current_holders.find((x) => x.orgRevisionId == orgRevisionActive.id)
|
||||||
?.orgChild4;
|
?.orgChild4;
|
||||||
|
|
||||||
let _child1 = child1 == null ? "" : `${child1.orgChild1Name}/`;
|
let _root = root?.orgRootName;
|
||||||
let _child2 = child2 == null ? "" : `${child2.orgChild2Name}/`;
|
let _child1 =child1?.orgChild1Name;
|
||||||
let _child3 = child3 == null ? "" : `${child3.orgChild3Name}/`;
|
let _child2 =child2?.orgChild2Name;
|
||||||
let _child4 = child4 == null ? "" : `${child4.orgChild4Name}/`;
|
let _child3 =child3?.orgChild3Name;
|
||||||
let _root = root == null ? "" : `${root.orgRootName}`;
|
let _child4 =child4?.orgChild4Name;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
no: Extension.ToThaiNumber((idx + 1).toString()),
|
no: Extension.ToThaiNumber((idx + 1).toString()),
|
||||||
org: `${_child4}${_child3}${_child2}${_child1}${_root}`,
|
org: (_child4 == null ? "" : _child4 + "\n") +
|
||||||
|
(_child3 == null ? "" : _child3 + "\n") +
|
||||||
|
(_child2 == null ? "" : _child2 + "\n") +
|
||||||
|
(_child1 == null ? "" : _child1 + "\n") +
|
||||||
|
(_root == null ? "" : _root),
|
||||||
fullName: `${x.prefix}${x.firstName} ${x.lastName}`,
|
fullName: `${x.prefix}${x.firstName} ${x.lastName}`,
|
||||||
citizenId: Extension.ToThaiNumber(x.citizenId),
|
citizenId: Extension.ToThaiNumber(x.citizenId),
|
||||||
position: profile?.position ? profile?.position : "-",
|
position: profile?.position ? profile?.position : "-",
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@ import { ProfileAssessment } from "../entities/ProfileAssessment";
|
||||||
import { log } from "console";
|
import { log } from "console";
|
||||||
import { format } from "path";
|
import { format } from "path";
|
||||||
import { viewProfileEvaluation } from "../entities/view/viewProfileEvaluation";
|
import { viewProfileEvaluation } from "../entities/view/viewProfileEvaluation";
|
||||||
|
import { viewPosMaster } from "../entities/view/viewPosMaster";
|
||||||
import { viewProfileEmployeeEvaluation } from "../entities/view/viewProfileEmployeeEvaluation";
|
import { viewProfileEmployeeEvaluation } from "../entities/view/viewProfileEmployeeEvaluation";
|
||||||
import Extension from "../interfaces/extension";
|
import Extension from "../interfaces/extension";
|
||||||
import { resetPassword } from "../keycloak";
|
import { resetPassword } from "../keycloak";
|
||||||
|
|
@ -766,11 +767,11 @@ export class OrganizationUnauthorizeController extends Controller {
|
||||||
? null
|
? null
|
||||||
: findProfile.current_holders.find((x) => x.orgRevisionId == findRevision.id)?.orgChild4;
|
: findProfile.current_holders.find((x) => x.orgRevisionId == findRevision.id)?.orgChild4;
|
||||||
|
|
||||||
let _child1 = child1 == null ? "" : `${child1.orgChild1Name}/`;
|
let _root = root?.orgRootName;
|
||||||
let _child2 = child2 == null ? "" : `${child2.orgChild2Name}/`;
|
let _child1 =child1?.orgChild1Name;
|
||||||
let _child3 = child3 == null ? "" : `${child3.orgChild3Name}/`;
|
let _child2 =child2?.orgChild2Name;
|
||||||
let _child4 = child4 == null ? "" : `${child4.orgChild4Name}/`;
|
let _child3 =child3?.orgChild3Name;
|
||||||
let _root = root == null ? "" : `${root.orgRootName}`;
|
let _child4 =child4?.orgChild4Name;
|
||||||
|
|
||||||
return new HttpSuccess({
|
return new HttpSuccess({
|
||||||
rootId: root == null ? null : root.id,
|
rootId: root == null ? null : root.id,
|
||||||
|
|
@ -778,7 +779,11 @@ export class OrganizationUnauthorizeController extends Controller {
|
||||||
orgRootShortName: root == null ? null : root.orgRootShortName,
|
orgRootShortName: root == null ? null : root.orgRootShortName,
|
||||||
orgRevisionId: findRevision.id,
|
orgRevisionId: findRevision.id,
|
||||||
profileId: findProfile.id,
|
profileId: findProfile.id,
|
||||||
org: `${_child4}${_child3}${_child2}${_child1}${_root}`,
|
org: (_child4 == null ? "" : _child4 + "\n") +
|
||||||
|
(_child3 == null ? "" : _child3 + "\n") +
|
||||||
|
(_child2 == null ? "" : _child2 + "\n") +
|
||||||
|
(_child1 == null ? "" : _child1 + "\n") +
|
||||||
|
(_root == null ? "" : _root),
|
||||||
type: "OFFICER",
|
type: "OFFICER",
|
||||||
rank: findProfile.rank,
|
rank: findProfile.rank,
|
||||||
prefix: findProfile.prefix,
|
prefix: findProfile.prefix,
|
||||||
|
|
@ -858,11 +863,11 @@ export class OrganizationUnauthorizeController extends Controller {
|
||||||
? null
|
? null
|
||||||
: findProfile.current_holders.find((x) => x.orgRevisionId == findRevision.id)?.orgChild4;
|
: findProfile.current_holders.find((x) => x.orgRevisionId == findRevision.id)?.orgChild4;
|
||||||
|
|
||||||
let _child1 = child1 == null ? "" : `${child1.orgChild1Name}/`;
|
let _root = root?.orgRootName;
|
||||||
let _child2 = child2 == null ? "" : `${child2.orgChild2Name}/`;
|
let _child1 =child1?.orgChild1Name;
|
||||||
let _child3 = child3 == null ? "" : `${child3.orgChild3Name}/`;
|
let _child2 =child2?.orgChild2Name;
|
||||||
let _child4 = child4 == null ? "" : `${child4.orgChild4Name}/`;
|
let _child3 =child3?.orgChild3Name;
|
||||||
let _root = root == null ? "" : `${root.orgRootName}`;
|
let _child4 =child4?.orgChild4Name;
|
||||||
|
|
||||||
return new HttpSuccess({
|
return new HttpSuccess({
|
||||||
rootId: root == null ? null : root.id,
|
rootId: root == null ? null : root.id,
|
||||||
|
|
@ -870,7 +875,11 @@ export class OrganizationUnauthorizeController extends Controller {
|
||||||
orgRootShortName: root == null ? null : root.orgRootShortName,
|
orgRootShortName: root == null ? null : root.orgRootShortName,
|
||||||
orgRevisionId: findRevision.id,
|
orgRevisionId: findRevision.id,
|
||||||
profileId: findProfile.id,
|
profileId: findProfile.id,
|
||||||
org: `${_child4}${_child3}${_child2}${_child1}${_root}`,
|
org: (_child4 == null ? "" : _child4 + "\n") +
|
||||||
|
(_child3 == null ? "" : _child3 + "\n") +
|
||||||
|
(_child2 == null ? "" : _child2 + "\n") +
|
||||||
|
(_child1 == null ? "" : _child1 + "\n") +
|
||||||
|
(_root == null ? "" : _root),
|
||||||
type: "EMPLOYEE",
|
type: "EMPLOYEE",
|
||||||
rank: findProfile.rank,
|
rank: findProfile.rank,
|
||||||
prefix: findProfile.prefix,
|
prefix: findProfile.prefix,
|
||||||
|
|
@ -950,11 +959,11 @@ export class OrganizationUnauthorizeController extends Controller {
|
||||||
? null
|
? null
|
||||||
: findProfile.current_holders.find((x) => x.orgRevisionId == findRevision.id)?.orgChild4;
|
: findProfile.current_holders.find((x) => x.orgRevisionId == findRevision.id)?.orgChild4;
|
||||||
|
|
||||||
let _child1 = child1 == null ? "" : `${child1.orgChild1Name}/`;
|
let _root = root?.orgRootName;
|
||||||
let _child2 = child2 == null ? "" : `${child2.orgChild2Name}/`;
|
let _child1 =child1?.orgChild1Name;
|
||||||
let _child3 = child3 == null ? "" : `${child3.orgChild3Name}/`;
|
let _child2 =child2?.orgChild2Name;
|
||||||
let _child4 = child4 == null ? "" : `${child4.orgChild4Name}/`;
|
let _child3 =child3?.orgChild3Name;
|
||||||
let _root = root == null ? "" : `${root.orgRootName}`;
|
let _child4 =child4?.orgChild4Name;
|
||||||
|
|
||||||
return new HttpSuccess({
|
return new HttpSuccess({
|
||||||
rootId: root == null ? null : root.id,
|
rootId: root == null ? null : root.id,
|
||||||
|
|
@ -962,7 +971,11 @@ export class OrganizationUnauthorizeController extends Controller {
|
||||||
orgRootShortName: root == null ? null : root.orgRootShortName,
|
orgRootShortName: root == null ? null : root.orgRootShortName,
|
||||||
orgRevisionId: findRevision.id,
|
orgRevisionId: findRevision.id,
|
||||||
profileId: findProfile.id,
|
profileId: findProfile.id,
|
||||||
org: `${_child4}${_child3}${_child2}${_child1}${_root}`,
|
org: (_child4 == null ? "" : _child4 + "\n") +
|
||||||
|
(_child3 == null ? "" : _child3 + "\n") +
|
||||||
|
(_child2 == null ? "" : _child2 + "\n") +
|
||||||
|
(_child1 == null ? "" : _child1 + "\n") +
|
||||||
|
(_root == null ? "" : _root),
|
||||||
type: "EMPLOYEE",
|
type: "EMPLOYEE",
|
||||||
rank: findProfile.rank,
|
rank: findProfile.rank,
|
||||||
prefix: findProfile.prefix,
|
prefix: findProfile.prefix,
|
||||||
|
|
|
||||||
|
|
@ -221,10 +221,11 @@ export class PermissionOrgController extends Controller {
|
||||||
? null
|
? null
|
||||||
: _data.current_holders.find((x) => x.orgRevisionId == findRevision.id)?.orgChild4;
|
: _data.current_holders.find((x) => x.orgRevisionId == findRevision.id)?.orgChild4;
|
||||||
|
|
||||||
let _child1 = child1 == null ? "" : `${child1.orgChild1Name}/`;
|
let _root = root?.orgRootName;
|
||||||
let _child2 = child2 == null ? "" : `${child2.orgChild2Name}/`;
|
let _child1 =child1?.orgChild1Name;
|
||||||
let _child3 = child3 == null ? "" : `${child3.orgChild3Name}/`;
|
let _child2 =child2?.orgChild2Name;
|
||||||
let _child4 = child4 == null ? "" : `${child4.orgChild4Name}/`;
|
let _child3 =child3?.orgChild3Name;
|
||||||
|
let _child4 =child4?.orgChild4Name;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: _data.id,
|
id: _data.id,
|
||||||
|
|
@ -234,7 +235,11 @@ export class PermissionOrgController extends Controller {
|
||||||
rank: _data.rank,
|
rank: _data.rank,
|
||||||
firstName: _data.firstName,
|
firstName: _data.firstName,
|
||||||
lastName: _data.lastName,
|
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,
|
posNo: shortName,
|
||||||
position: _data.position,
|
position: _data.position,
|
||||||
posType: _data.posType == null ? null : _data.posType.posTypeName,
|
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)
|
: _data.profileTree.current_holders.find((x) => x.orgRevisionId == findRevision.id)
|
||||||
?.orgChild4;
|
?.orgChild4;
|
||||||
|
|
||||||
let _child1 = child1 == null ? "" : `${child1.orgChild1Name}/`;
|
let _root = root?.orgRootName;
|
||||||
let _child2 = child2 == null ? "" : `${child2.orgChild2Name}/`;
|
let _child1 =child1?.orgChild1Name;
|
||||||
let _child3 = child3 == null ? "" : `${child3.orgChild3Name}/`;
|
let _child2 =child2?.orgChild2Name;
|
||||||
let _child4 = child4 == null ? "" : `${child4.orgChild4Name}/`;
|
let _child3 =child3?.orgChild3Name;
|
||||||
|
let _child4 =child4?.orgChild4Name;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: _data.id,
|
id: _data.id,
|
||||||
|
|
@ -446,7 +452,11 @@ export class PermissionOrgController extends Controller {
|
||||||
rank: _data.profileTree.rank,
|
rank: _data.profileTree.rank,
|
||||||
firstName: _data.profileTree.firstName,
|
firstName: _data.profileTree.firstName,
|
||||||
lastName: _data.profileTree.lastName,
|
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,
|
posNo: shortName,
|
||||||
position: _data.profileTree.position,
|
position: _data.profileTree.position,
|
||||||
posType: _data.profileTree.posType == null ? null : _data.profileTree.posType.posTypeName,
|
posType: _data.profileTree.posType == null ? null : _data.profileTree.posType.posTypeName,
|
||||||
|
|
|
||||||
|
|
@ -240,11 +240,11 @@ export class ProfileController extends Controller {
|
||||||
profile && profile.registrationZipCode != null
|
profile && profile.registrationZipCode != null
|
||||||
? ` รหัสไปรษณีย์ ${profile.registrationZipCode}`
|
? ` รหัสไปรษณีย์ ${profile.registrationZipCode}`
|
||||||
: "";
|
: "";
|
||||||
let _root = root == null || root == undefined ? "" : `${root.orgRootName}`;
|
let _root = root?.orgRootName;
|
||||||
let _child1 = child1 == null || child1 == undefined ? "" : `${child1.orgChild1Name}/`;
|
let _child1 =child1?.orgChild1Name;
|
||||||
let _child2 = child2 == null || child2 == undefined ? "" : `${child2.orgChild2Name}/`;
|
let _child2 =child2?.orgChild2Name;
|
||||||
let _child3 = child3 == null || child3 == undefined ? "" : `${child3.orgChild3Name}/`;
|
let _child3 =child3?.orgChild3Name;
|
||||||
let _child4 = child4 == null || child4 == undefined ? "" : `${child4.orgChild4Name}/`;
|
let _child4 =child4?.orgChild4Name;
|
||||||
|
|
||||||
const salary_raw = await this.salaryRepo.find({
|
const salary_raw = await this.salaryRepo.find({
|
||||||
// select: [
|
// select: [
|
||||||
|
|
@ -400,7 +400,11 @@ export class ProfileController extends Controller {
|
||||||
? Extension.ToThaiNumber(Extension.ToThaiNumber(salary_raw[0].orgRoot))
|
? 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,
|
educations: Education,
|
||||||
salarys: salarys.map((item) => {
|
salarys: salarys.map((item) => {
|
||||||
return {
|
return {
|
||||||
|
|
@ -5422,11 +5426,11 @@ export class ProfileController extends Controller {
|
||||||
_data.current_holders.find((x) => x.orgRevisionId == revisionId) == null
|
_data.current_holders.find((x) => x.orgRevisionId == revisionId) == null
|
||||||
? null
|
? null
|
||||||
: _data.current_holders.find((x) => x.orgRevisionId == revisionId)?.orgChild4;
|
: _data.current_holders.find((x) => x.orgRevisionId == revisionId)?.orgChild4;
|
||||||
|
let _root = root?.orgRootName;
|
||||||
let _child1 = child1 == null ? "" : `${child1.orgChild1Name}/`;
|
let _child1 =child1?.orgChild1Name;
|
||||||
let _child2 = child2 == null ? "" : `${child2.orgChild2Name}/`;
|
let _child2 =child2?.orgChild2Name;
|
||||||
let _child3 = child3 == null ? "" : `${child3.orgChild3Name}/`;
|
let _child3 =child3?.orgChild3Name;
|
||||||
let _child4 = child4 == null ? "" : `${child4.orgChild4Name}/`;
|
let _child4 =child4?.orgChild4Name;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: _data.id,
|
id: _data.id,
|
||||||
|
|
@ -5448,7 +5452,11 @@ export class ProfileController extends Controller {
|
||||||
root: root == null ? null : root.orgRootName,
|
root: root == null ? null : root.orgRootName,
|
||||||
orgRootShortName: root == null ? null : root.orgRootShortName,
|
orgRootShortName: root == null ? null : root.orgRootShortName,
|
||||||
orgRevisionId: root == null ? null : root.orgRevisionId,
|
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
|
_data.current_holders.find((x) => x.orgRevisionId == findRevision.id) == null
|
||||||
? null
|
? null
|
||||||
: _data.current_holders.find((x) => x.orgRevisionId == findRevision.id)?.orgChild4;
|
: _data.current_holders.find((x) => x.orgRevisionId == findRevision.id)?.orgChild4;
|
||||||
|
|
||||||
let _child1 = child1 == null ? "" : `${child1.orgChild1Name} `;
|
let _root = root?.orgRootName;
|
||||||
let _child2 = child2 == null ? "" : `${child2.orgChild2Name} `;
|
let _child1 =child1?.orgChild1Name;
|
||||||
let _child3 = child3 == null ? "" : `${child3.orgChild3Name} `;
|
let _child2 =child2?.orgChild2Name;
|
||||||
let _child4 = child4 == null ? "" : `${child4.orgChild4Name} `;
|
let _child3 =child3?.orgChild3Name;
|
||||||
|
let _child4 =child4?.orgChild4Name;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: _data.id,
|
id: _data.id,
|
||||||
|
|
@ -6271,7 +6280,11 @@ export class ProfileController extends Controller {
|
||||||
root: root == null ? null : root.orgRootName,
|
root: root == null ? null : root.orgRootName,
|
||||||
orgRootShortName: root == null ? null : root.orgRootShortName,
|
orgRootShortName: root == null ? null : root.orgRootShortName,
|
||||||
orgRevisionId: root == null ? null : root.orgRevisionId,
|
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),
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -224,11 +224,12 @@ export class ProfileEmployeeController extends Controller {
|
||||||
profile && profile.registrationZipCode != null
|
profile && profile.registrationZipCode != null
|
||||||
? ` รหัสไปรษณีย์ ${profile.registrationZipCode}`
|
? ` รหัสไปรษณีย์ ${profile.registrationZipCode}`
|
||||||
: "";
|
: "";
|
||||||
let _root = root == null || root == undefined ? "" : `${root.orgRootName}`;
|
|
||||||
let _child1 = child1 == null || child1 == undefined ? "" : `${child1.orgChild1Name}/`;
|
let _root = root?.orgRootName;
|
||||||
let _child2 = child2 == null || child2 == undefined ? "" : `${child2.orgChild2Name}/`;
|
let _child1 =child1?.orgChild1Name;
|
||||||
let _child3 = child3 == null || child3 == undefined ? "" : `${child3.orgChild3Name}/`;
|
let _child2 =child2?.orgChild2Name;
|
||||||
let _child4 = child4 == null || child4 == undefined ? "" : `${child4.orgChild4Name}/`;
|
let _child3 =child3?.orgChild3Name;
|
||||||
|
let _child4 =child4?.orgChild4Name;
|
||||||
|
|
||||||
const salary_raw = await this.salaryRepo.find({
|
const salary_raw = await this.salaryRepo.find({
|
||||||
// select: [
|
// select: [
|
||||||
|
|
@ -384,7 +385,11 @@ export class ProfileEmployeeController extends Controller {
|
||||||
? Extension.ToThaiNumber(Extension.ToThaiNumber(salary_raw[0].orgRoot))
|
? 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,
|
educations: Education,
|
||||||
salarys: salarys.map((item) => {
|
salarys: salarys.map((item) => {
|
||||||
return {
|
return {
|
||||||
|
|
@ -1598,10 +1603,11 @@ export class ProfileEmployeeController extends Controller {
|
||||||
? null
|
? null
|
||||||
: _data.current_holders.find((x) => x.orgRevisionId == revisionId)?.orgChild4;
|
: _data.current_holders.find((x) => x.orgRevisionId == revisionId)?.orgChild4;
|
||||||
|
|
||||||
let _child1 = child1 == null ? "" : `${child1.orgChild1Name}/`;
|
let _root = root?.orgRootName;
|
||||||
let _child2 = child2 == null ? "" : `${child2.orgChild2Name}/`;
|
let _child1 =child1?.orgChild1Name;
|
||||||
let _child3 = child3 == null ? "" : `${child3.orgChild3Name}/`;
|
let _child2 =child2?.orgChild2Name;
|
||||||
let _child4 = child4 == null ? "" : `${child4.orgChild4Name}/`;
|
let _child3 =child3?.orgChild3Name;
|
||||||
|
let _child4 =child4?.orgChild4Name;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
id: _data.id,
|
id: _data.id,
|
||||||
|
|
@ -1622,7 +1628,11 @@ export class ProfileEmployeeController extends Controller {
|
||||||
root: root == null ? null : root.orgRootName,
|
root: root == null ? null : root.orgRootName,
|
||||||
orgRootShortName: root == null ? null : root.orgRootShortName,
|
orgRootShortName: root == null ? null : root.orgRootShortName,
|
||||||
orgRevisionId: root == null ? null : root.orgRevisionId,
|
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),
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
@ -2381,10 +2391,11 @@ export class ProfileEmployeeController extends Controller {
|
||||||
? null
|
? null
|
||||||
: _data.current_holders.find((x) => x.orgRevisionId == findRevision.id)?.orgChild4;
|
: _data.current_holders.find((x) => x.orgRevisionId == findRevision.id)?.orgChild4;
|
||||||
|
|
||||||
let _child1 = child1 == null ? "" : `${child1.orgChild1Name} `;
|
let _root = root?.orgRootName;
|
||||||
let _child2 = child2 == null ? "" : `${child2.orgChild2Name} `;
|
let _child1 =child1?.orgChild1Name;
|
||||||
let _child3 = child3 == null ? "" : `${child3.orgChild3Name} `;
|
let _child2 =child2?.orgChild2Name;
|
||||||
let _child4 = child4 == null ? "" : `${child4.orgChild4Name} `;
|
let _child3 =child3?.orgChild3Name;
|
||||||
|
let _child4 =child4?.orgChild4Name;
|
||||||
return {
|
return {
|
||||||
id: _data.id,
|
id: _data.id,
|
||||||
prefix: _data.prefix,
|
prefix: _data.prefix,
|
||||||
|
|
@ -2464,7 +2475,11 @@ export class ProfileEmployeeController extends Controller {
|
||||||
child4: _data.child4Temp ? _data.child4Temp : null,
|
child4: _data.child4Temp ? _data.child4Temp : null,
|
||||||
child4Id: _data.child4IdTemp ? _data.child4IdTemp : null,
|
child4Id: _data.child4IdTemp ? _data.child4IdTemp : null,
|
||||||
child4ShortName: _data.child4ShortNameTemp ? _data.child4ShortNameTemp : null,
|
child4ShortName: _data.child4ShortNameTemp ? _data.child4ShortNameTemp : null,
|
||||||
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),
|
||||||
};
|
};
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -217,11 +217,11 @@ export class ProfileEmployeeTempController extends Controller {
|
||||||
profile && profile.registrationZipCode != null
|
profile && profile.registrationZipCode != null
|
||||||
? ` รหัสไปรษณีย์ ${profile.registrationZipCode}`
|
? ` รหัสไปรษณีย์ ${profile.registrationZipCode}`
|
||||||
: "";
|
: "";
|
||||||
let _root = root == null || root == undefined ? "" : `${root.orgRootName}`;
|
let _root = root?.orgRootName;
|
||||||
let _child1 = child1 == null || child1 == undefined ? "" : `${child1.orgChild1Name}/`;
|
let _child1 =child1?.orgChild1Name;
|
||||||
let _child2 = child2 == null || child2 == undefined ? "" : `${child2.orgChild2Name}/`;
|
let _child2 =child2?.orgChild2Name;
|
||||||
let _child3 = child3 == null || child3 == undefined ? "" : `${child3.orgChild3Name}/`;
|
let _child3 =child3?.orgChild3Name;
|
||||||
let _child4 = child4 == null || child4 == undefined ? "" : `${child4.orgChild4Name}/`;
|
let _child4 =child4?.orgChild4Name;
|
||||||
|
|
||||||
const salary_raw = await this.salaryRepo.find({
|
const salary_raw = await this.salaryRepo.find({
|
||||||
// select: [
|
// select: [
|
||||||
|
|
@ -375,7 +375,11 @@ export class ProfileEmployeeTempController extends Controller {
|
||||||
? Extension.ToThaiNumber(Extension.ToThaiNumber(salary_raw[0].orgRoot))
|
? 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,
|
educations: Education,
|
||||||
salarys: salarys.map((item) => {
|
salarys: salarys.map((item) => {
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue