แก้ไข 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
|
|
@ -1107,11 +1107,11 @@ export class ProfileController extends Controller {
|
|||
}))
|
||||
: [
|
||||
{
|
||||
certificateType: "-",
|
||||
issuer: "-",
|
||||
certificateNo: "-",
|
||||
detail: "-",
|
||||
issueToExpireDate: "-",
|
||||
certificateType: "",
|
||||
issuer: "",
|
||||
certificateNo: "",
|
||||
detail: "",
|
||||
issueToExpireDate: "",
|
||||
},
|
||||
];
|
||||
const training_raw = await this.trainingRepository.find({
|
||||
|
|
@ -1130,11 +1130,11 @@ export class ProfileController extends Controller {
|
|||
}))
|
||||
: [
|
||||
{
|
||||
institute: "-",
|
||||
degree: "-",
|
||||
place: "-",
|
||||
duration: "-",
|
||||
date: "-"
|
||||
institute: "",
|
||||
degree: "",
|
||||
place: "",
|
||||
duration: "",
|
||||
date: ""
|
||||
},
|
||||
];
|
||||
|
||||
|
|
@ -1155,10 +1155,10 @@ export class ProfileController extends Controller {
|
|||
}))
|
||||
: [
|
||||
{
|
||||
disciplineYear: "-",
|
||||
disciplineDetail: "-",
|
||||
refNo: "-",
|
||||
level: "-",
|
||||
disciplineYear: "",
|
||||
disciplineDetail: "",
|
||||
refNo: "",
|
||||
level: "",
|
||||
},
|
||||
];
|
||||
|
||||
|
|
@ -1181,10 +1181,10 @@ export class ProfileController extends Controller {
|
|||
}))
|
||||
: [
|
||||
{
|
||||
institute: "-",
|
||||
date: "-",
|
||||
degree: "-",
|
||||
level: "-"
|
||||
institute: "",
|
||||
date: "",
|
||||
degree: "",
|
||||
level: ""
|
||||
},
|
||||
];
|
||||
const salary_raw = await this.salaryRepo.find({
|
||||
|
|
@ -1251,19 +1251,19 @@ export class ProfileController 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: "",
|
||||
},
|
||||
];
|
||||
|
||||
|
|
@ -1310,18 +1310,18 @@ export class ProfileController extends Controller {
|
|||
}))
|
||||
: [
|
||||
{
|
||||
receiveDate: "-",
|
||||
insigniaName: "-",
|
||||
insigniaShortName: "-",
|
||||
insigniaTypeName: "-",
|
||||
no: "-",
|
||||
issue: "-",
|
||||
volumeNo: "-",
|
||||
volume: "-",
|
||||
section: "-",
|
||||
page: "-",
|
||||
refCommandDate: "-",
|
||||
note: "-"
|
||||
receiveDate: "",
|
||||
insigniaName: "",
|
||||
insigniaShortName: "",
|
||||
insigniaTypeName: "",
|
||||
no: "",
|
||||
issue: "",
|
||||
volumeNo: "",
|
||||
volume: "",
|
||||
section: "",
|
||||
page: "",
|
||||
refCommandDate: "",
|
||||
note: ""
|
||||
},
|
||||
];
|
||||
|
||||
|
|
@ -1417,10 +1417,10 @@ export class ProfileController extends Controller {
|
|||
}))
|
||||
: [
|
||||
{
|
||||
date: "-",
|
||||
type: "-",
|
||||
leaveDays: "-",
|
||||
reason: "-",
|
||||
date: "",
|
||||
type: "",
|
||||
leaveDays: "",
|
||||
reason: "",
|
||||
},
|
||||
];
|
||||
const children_raw = await this.profileChildrenRepository.find({
|
||||
|
|
@ -1439,11 +1439,11 @@ export class ProfileController extends Controller {
|
|||
: [
|
||||
{
|
||||
no: "",
|
||||
childrenPrefix: "-",
|
||||
childrenFirstName: "-",
|
||||
childrenLastName: "-",
|
||||
childrenFullName: "-",
|
||||
childrenLive: "-",
|
||||
childrenPrefix: "",
|
||||
childrenFirstName: "",
|
||||
childrenLastName: "",
|
||||
childrenFullName: "",
|
||||
childrenLive: "",
|
||||
},
|
||||
];
|
||||
const changeName_raw = await this.changeNameRepository.find({
|
||||
|
|
@ -1463,11 +1463,11 @@ export class ProfileController extends Controller {
|
|||
}))
|
||||
: [
|
||||
{
|
||||
createdAt: "-",
|
||||
status: "-",
|
||||
prefix: "-",
|
||||
firstName: "-",
|
||||
lastName: "-",
|
||||
createdAt: "",
|
||||
status: "",
|
||||
prefix: "",
|
||||
firstName: "",
|
||||
lastName: "",
|
||||
},
|
||||
];
|
||||
|
||||
|
|
@ -1487,8 +1487,8 @@ export class ProfileController extends Controller {
|
|||
}))
|
||||
: [
|
||||
{
|
||||
birthDateOld: "-",
|
||||
birthDate: "-",
|
||||
birthDateOld: "",
|
||||
birthDate: "",
|
||||
},
|
||||
];
|
||||
|
||||
|
|
@ -1529,16 +1529,16 @@ export class ProfileController extends Controller {
|
|||
}))
|
||||
: [
|
||||
{
|
||||
commandName: "-",
|
||||
commandDateAffect: "-",
|
||||
commandDateSign: "-",
|
||||
posNo: "-",
|
||||
position: "-",
|
||||
posType: "-",
|
||||
posLevel: "-",
|
||||
amount: "-",
|
||||
positionSalaryAmount: "-",
|
||||
refDoc: "-"
|
||||
commandName: "",
|
||||
commandDateAffect: "",
|
||||
commandDateSign: "",
|
||||
posNo: "",
|
||||
position: "",
|
||||
posType: "",
|
||||
posLevel: "",
|
||||
amount: "",
|
||||
positionSalaryAmount: "",
|
||||
refDoc: ""
|
||||
},
|
||||
];
|
||||
|
||||
|
|
@ -1591,7 +1591,7 @@ export class ProfileController extends Controller {
|
|||
|
||||
// กรณีไม่มีข้อมูล
|
||||
if (retires.length === 0) {
|
||||
retires.push({ date: "-", detail: "-", day: "-" });
|
||||
retires.push({ date: "", detail: "", day: "" });
|
||||
}
|
||||
|
||||
// รักษาการ
|
||||
|
|
@ -1674,12 +1674,12 @@ export class ProfileController extends Controller {
|
|||
}
|
||||
else {
|
||||
_actpositions.push({
|
||||
date: "-",
|
||||
position: "-",
|
||||
commandName: "-",
|
||||
agency: "-",
|
||||
note: "-",
|
||||
document: "-",
|
||||
date: "",
|
||||
position: "",
|
||||
commandName: "",
|
||||
agency: "",
|
||||
note: "",
|
||||
document: "",
|
||||
});
|
||||
}
|
||||
// ช่วยราชการ
|
||||
|
|
@ -1732,12 +1732,12 @@ export class ProfileController extends Controller {
|
|||
}
|
||||
else {
|
||||
_assistances.push({
|
||||
date: "-",
|
||||
position: "-",
|
||||
commandName: "-",
|
||||
agency: "-",
|
||||
note: "-",
|
||||
document: "-",
|
||||
date: "",
|
||||
position: "",
|
||||
commandName: "",
|
||||
agency: "",
|
||||
note: "",
|
||||
document: "",
|
||||
});
|
||||
}
|
||||
// Merge รักษาการ และ ช่วยราชาร
|
||||
|
|
@ -1771,11 +1771,11 @@ export class ProfileController extends Controller {
|
|||
}))
|
||||
: [
|
||||
{
|
||||
date: "-",
|
||||
type: "-",
|
||||
detail: "-",
|
||||
agency: "-",
|
||||
refCommandNo: "-",
|
||||
date: "",
|
||||
type: "",
|
||||
detail: "",
|
||||
agency: "",
|
||||
refCommandNo: "",
|
||||
},
|
||||
];
|
||||
const assessments_raw = await this.profileAssessmentsRepository.find({
|
||||
|
|
@ -1814,13 +1814,13 @@ export class ProfileController extends Controller {
|
|||
}))
|
||||
: [
|
||||
{
|
||||
year: "-",
|
||||
period: "-",
|
||||
point1: "-",
|
||||
point2: "-",
|
||||
pointSum: "-",
|
||||
pointSumTh: "-",
|
||||
level: "-",
|
||||
year: "",
|
||||
period: "",
|
||||
point1: "",
|
||||
point2: "",
|
||||
pointSum: "",
|
||||
pointSumTh: "",
|
||||
level: "",
|
||||
},
|
||||
];
|
||||
const profileAbility_raw = await this.profileAbilityRepo.find({
|
||||
|
|
@ -1835,8 +1835,8 @@ export class ProfileController extends Controller {
|
|||
}))
|
||||
: [
|
||||
{
|
||||
field: "-",
|
||||
detail: "-",
|
||||
field: "",
|
||||
detail: "",
|
||||
},
|
||||
];
|
||||
|
||||
|
|
@ -1870,14 +1870,14 @@ export class ProfileController extends Controller {
|
|||
}))
|
||||
: [
|
||||
{
|
||||
commandName: "-",
|
||||
commandDateAffect: "-",
|
||||
commandDateSign: "-",
|
||||
commandNo: "-",
|
||||
position: "-",
|
||||
posLevel: "-",
|
||||
amount: "-",
|
||||
refDoc: "-"
|
||||
commandName: "",
|
||||
commandDateAffect: "",
|
||||
commandDateSign: "",
|
||||
commandNo: "",
|
||||
position: "",
|
||||
posLevel: "",
|
||||
amount: "",
|
||||
refDoc: ""
|
||||
},
|
||||
];
|
||||
|
||||
|
|
@ -1924,15 +1924,15 @@ export class ProfileController extends Controller {
|
|||
)
|
||||
: "";
|
||||
|
||||
let portfolios: any;
|
||||
let portfolios:any[] = [];
|
||||
await new CallAPI()
|
||||
.GetData(req, `/development/portfolio/kk1/${profiles?.keycloak}`)
|
||||
.then((x) => {
|
||||
portfolios = x;
|
||||
portfolios = Array.isArray(x) ? x : [];
|
||||
})
|
||||
.catch(() => {});
|
||||
if (!portfolios) {
|
||||
portfolios = [{ name: "-", year: "-", position: "-" }];
|
||||
if (portfolios.length == 0) {
|
||||
portfolios = [{ name: "", year: "", position: "" }];
|
||||
} else {
|
||||
portfolios = portfolios.map((x: any) => ({
|
||||
name: x.name ? Extension.ToThaiNumber(x.name) : "-",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue