แก้ไข middleware log ให้ใช้จาก token #223
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m21s
All checks were successful
Build & Deploy on Dev / build (push) Successful in 1m21s
This commit is contained in:
parent
251e87d2b2
commit
2fdf5e5854
3 changed files with 224 additions and 221 deletions
|
|
@ -1022,12 +1022,12 @@ export class ProfileEmployeeController extends Controller {
|
|||
order: { lastUpdatedAt: "DESC" },
|
||||
});
|
||||
|
||||
const posMasterId =
|
||||
profiles.current_holders == null ||
|
||||
profiles.current_holders.length == 0 ||
|
||||
profiles.current_holders.find((x) => x.orgRevisionId == orgRevision?.id) == null
|
||||
? null
|
||||
: profiles.current_holders.find((x) => x.orgRevisionId == orgRevision?.id)?.id;
|
||||
// const posMasterId =
|
||||
// profiles.current_holders == null ||
|
||||
// profiles.current_holders.length == 0 ||
|
||||
// profiles.current_holders.find((x) => x.orgRevisionId == orgRevision?.id) == null
|
||||
// ? null
|
||||
// : profiles.current_holders.find((x) => x.orgRevisionId == orgRevision?.id)?.id;
|
||||
|
||||
const root =
|
||||
profiles.current_holders == null ||
|
||||
|
|
@ -1102,11 +1102,11 @@ export class ProfileEmployeeController extends Controller {
|
|||
}))
|
||||
: [
|
||||
{
|
||||
certificateType: "-",
|
||||
issuer: "-",
|
||||
certificateNo: "-",
|
||||
detail: "-",
|
||||
issueToExpireDate: "-",
|
||||
certificateType: "",
|
||||
issuer: "",
|
||||
certificateNo: "",
|
||||
detail: "",
|
||||
issueToExpireDate: "",
|
||||
},
|
||||
];
|
||||
const training_raw = await this.trainingRepository.find({
|
||||
|
|
@ -1125,11 +1125,11 @@ export class ProfileEmployeeController extends Controller {
|
|||
}))
|
||||
: [
|
||||
{
|
||||
institute: "-",
|
||||
degree: "-",
|
||||
place: "-",
|
||||
duration: "-",
|
||||
date: "-"
|
||||
institute: "",
|
||||
degree: "",
|
||||
place: "",
|
||||
duration: "",
|
||||
date: ""
|
||||
},
|
||||
];
|
||||
|
||||
|
|
@ -1150,10 +1150,10 @@ export class ProfileEmployeeController extends Controller {
|
|||
}))
|
||||
: [
|
||||
{
|
||||
disciplineYear: "-",
|
||||
disciplineDetail: "-",
|
||||
refNo: "-",
|
||||
level: "-",
|
||||
disciplineYear: "",
|
||||
disciplineDetail: "",
|
||||
refNo: "",
|
||||
level: "",
|
||||
},
|
||||
];
|
||||
|
||||
|
|
@ -1176,10 +1176,10 @@ export class ProfileEmployeeController extends Controller {
|
|||
}))
|
||||
: [
|
||||
{
|
||||
institute: "-",
|
||||
date: "-",
|
||||
degree: "-",
|
||||
level: "-"
|
||||
institute: "",
|
||||
date: "",
|
||||
degree: "",
|
||||
level: ""
|
||||
},
|
||||
];
|
||||
const salary_raw = await this.salaryRepo.find({
|
||||
|
|
@ -1246,19 +1246,19 @@ export class ProfileEmployeeController extends Controller {
|
|||
}))
|
||||
: [
|
||||
{
|
||||
commandName: "-",
|
||||
salaryDate: "-",
|
||||
position: "-",
|
||||
posNo: "-",
|
||||
salary: "-",
|
||||
special: "-",
|
||||
rank: "-",
|
||||
refAll: "-",
|
||||
positionLevel: "-",
|
||||
positionType: "-",
|
||||
positionAmount: "-",
|
||||
fullName: "-",
|
||||
ocFullPath: "-",
|
||||
commandName: "",
|
||||
salaryDate: "",
|
||||
position: "",
|
||||
posNo: "",
|
||||
salary: "",
|
||||
special: "",
|
||||
rank: "",
|
||||
refAll: "",
|
||||
positionLevel: "",
|
||||
positionType: "",
|
||||
positionAmount: "",
|
||||
fullName: "",
|
||||
ocFullPath: "",
|
||||
},
|
||||
];
|
||||
|
||||
|
|
@ -1305,17 +1305,17 @@ export class ProfileEmployeeController extends Controller {
|
|||
}))
|
||||
: [
|
||||
{
|
||||
receiveDate: "-",
|
||||
insigniaName: "-",
|
||||
insigniaShortName: "-",
|
||||
insigniaTypeName: "-",
|
||||
no: "-",
|
||||
issue: "-",
|
||||
volumeNo: "-",
|
||||
volume: "-",
|
||||
section: "-",
|
||||
page: "-",
|
||||
refCommandDate: "-",
|
||||
receiveDate: "",
|
||||
insigniaName: "",
|
||||
insigniaShortName: "",
|
||||
insigniaTypeName: "",
|
||||
no: "",
|
||||
issue: "",
|
||||
volumeNo: "",
|
||||
volume: "",
|
||||
section: "",
|
||||
page: "",
|
||||
refCommandDate: "",
|
||||
},
|
||||
];
|
||||
|
||||
|
|
@ -1411,10 +1411,10 @@ export class ProfileEmployeeController extends Controller {
|
|||
}))
|
||||
: [
|
||||
{
|
||||
date: "-",
|
||||
type: "-",
|
||||
leaveDays: "-",
|
||||
reason: "-",
|
||||
date: "",
|
||||
type: "",
|
||||
leaveDays: "",
|
||||
reason: "",
|
||||
},
|
||||
];
|
||||
const children_raw = await this.profileChildrenRepository.find({
|
||||
|
|
@ -1433,11 +1433,11 @@ export class ProfileEmployeeController extends Controller {
|
|||
: [
|
||||
{
|
||||
no: "",
|
||||
childrenPrefix: "-",
|
||||
childrenFirstName: "-",
|
||||
childrenLastName: "-",
|
||||
childrenFullName: "-",
|
||||
childrenLive: "-",
|
||||
childrenPrefix: "",
|
||||
childrenFirstName: "",
|
||||
childrenLastName: "",
|
||||
childrenFullName: "",
|
||||
childrenLive: "",
|
||||
},
|
||||
];
|
||||
const changeName_raw = await this.changeNameRepository.find({
|
||||
|
|
@ -1457,11 +1457,11 @@ export class ProfileEmployeeController extends Controller {
|
|||
}))
|
||||
: [
|
||||
{
|
||||
createdAt: "-",
|
||||
status: "-",
|
||||
prefix: "-",
|
||||
firstName: "-",
|
||||
lastName: "-",
|
||||
createdAt: "",
|
||||
status: "",
|
||||
prefix: "",
|
||||
firstName: "",
|
||||
lastName: "",
|
||||
},
|
||||
];
|
||||
|
||||
|
|
@ -1481,8 +1481,8 @@ export class ProfileEmployeeController extends Controller {
|
|||
}))
|
||||
: [
|
||||
{
|
||||
birthDateOld: "-",
|
||||
birthDate: "-",
|
||||
birthDateOld: "",
|
||||
birthDate: "",
|
||||
},
|
||||
];
|
||||
|
||||
|
|
@ -1523,16 +1523,16 @@ export class ProfileEmployeeController extends Controller {
|
|||
}))
|
||||
: [
|
||||
{
|
||||
commandName: "-",
|
||||
commandDateAffect: "-",
|
||||
commandDateSign: "-",
|
||||
posNo: "-",
|
||||
position: "-",
|
||||
posType: "-",
|
||||
posLevel: "-",
|
||||
amount: "-",
|
||||
positionSalaryAmount: "-",
|
||||
refDoc: "-"
|
||||
commandName: "",
|
||||
commandDateAffect: "",
|
||||
commandDateSign: "",
|
||||
posNo: "",
|
||||
position: "",
|
||||
posType: "",
|
||||
posLevel: "",
|
||||
amount: "",
|
||||
positionSalaryAmount: "",
|
||||
refDoc: ""
|
||||
},
|
||||
];
|
||||
// ลูกจ้างยังไม่มีรักษาการและช่วยราชการ
|
||||
|
|
@ -1567,11 +1567,11 @@ export class ProfileEmployeeController extends Controller {
|
|||
}))
|
||||
: [
|
||||
{
|
||||
date: "-",
|
||||
position: "-",
|
||||
commandName: "-",
|
||||
agency: "-",
|
||||
document: "-",
|
||||
date: "",
|
||||
position: "",
|
||||
commandName: "",
|
||||
agency: "",
|
||||
document: "",
|
||||
},
|
||||
];
|
||||
const _assistance =
|
||||
|
|
@ -1594,11 +1594,11 @@ export class ProfileEmployeeController extends Controller {
|
|||
}))
|
||||
: [
|
||||
{
|
||||
date: "-",
|
||||
position: "-",
|
||||
commandName: "-",
|
||||
agency: "-",
|
||||
document: "-",
|
||||
date: "",
|
||||
position: "",
|
||||
commandName: "",
|
||||
agency: "",
|
||||
document: "",
|
||||
},
|
||||
];
|
||||
const actposition = [..._actposition, ..._assistance];
|
||||
|
|
@ -1630,11 +1630,11 @@ export class ProfileEmployeeController extends Controller {
|
|||
}))
|
||||
: [
|
||||
{
|
||||
date: "-",
|
||||
type: "-",
|
||||
detail: "-",
|
||||
agency: "-",
|
||||
refCommandNo: "-",
|
||||
date: "",
|
||||
type: "",
|
||||
detail: "",
|
||||
agency: "",
|
||||
refCommandNo: "",
|
||||
},
|
||||
];
|
||||
const assessments_raw = await this.profileAssessmentsRepository.find({
|
||||
|
|
@ -1673,12 +1673,12 @@ export class ProfileEmployeeController extends Controller {
|
|||
}))
|
||||
: [
|
||||
{
|
||||
year: "-",
|
||||
period: "-",
|
||||
point1: "-",
|
||||
point2: "-",
|
||||
pointSum: "-",
|
||||
pointSumTh: "-",
|
||||
year: "",
|
||||
period: "",
|
||||
point1: "",
|
||||
point2: "",
|
||||
pointSum: "",
|
||||
pointSumTh: "",
|
||||
},
|
||||
];
|
||||
const profileAbility_raw = await this.profileAbilityRepo.find({
|
||||
|
|
@ -1693,8 +1693,8 @@ export class ProfileEmployeeController extends Controller {
|
|||
}))
|
||||
: [
|
||||
{
|
||||
field: "-",
|
||||
detail: "-",
|
||||
field: "",
|
||||
detail: "",
|
||||
},
|
||||
];
|
||||
|
||||
|
|
@ -1728,14 +1728,14 @@ export class ProfileEmployeeController extends Controller {
|
|||
}))
|
||||
: [
|
||||
{
|
||||
commandName: "-",
|
||||
commandDateAffect: "-",
|
||||
commandDateSign: "-",
|
||||
commandNo: "-",
|
||||
position: "-",
|
||||
posLevel: "-",
|
||||
amount: "-",
|
||||
refDoc: "-"
|
||||
commandName: "",
|
||||
commandDateAffect: "",
|
||||
commandDateSign: "",
|
||||
commandNo: "",
|
||||
position: "",
|
||||
posLevel: "",
|
||||
amount: "",
|
||||
refDoc: ""
|
||||
},
|
||||
];
|
||||
|
||||
|
|
@ -1788,7 +1788,7 @@ export class ProfileEmployeeController extends Controller {
|
|||
|
||||
// กรณีไม่มีข้อมูล
|
||||
if (retires.length === 0) {
|
||||
retires.push({ date: "-", detail: "-", day: "-" });
|
||||
retires.push({ date: "", detail: "", day: "" });
|
||||
}
|
||||
|
||||
const org =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue