update
This commit is contained in:
parent
b2d4fd202c
commit
2dcabd5a66
2 changed files with 24 additions and 19 deletions
|
|
@ -537,6 +537,8 @@ export class EvaluationController {
|
||||||
evaluation.userId = request.user.sub;
|
evaluation.userId = request.user.sub;
|
||||||
evaluation.detailAnnounceStep5Body = announceTemplate5?.detailBody??_null;
|
evaluation.detailAnnounceStep5Body = announceTemplate5?.detailBody??_null;
|
||||||
evaluation.detailAnnounceStep5Footer = announceTemplate5?.detailFooter??_null;
|
evaluation.detailAnnounceStep5Footer = announceTemplate5?.detailFooter??_null;
|
||||||
|
evaluation.positionArea = requestBody.positionArea && requestBody.positionArea !== "" ? requestBody.positionArea : _null;
|
||||||
|
evaluation.posExecutive = requestBody.posExecutive && requestBody.posExecutive !== "" ? requestBody.posExecutive : _null;
|
||||||
await this.evaluationRepository.save(evaluation, { data: request });
|
await this.evaluationRepository.save(evaluation, { data: request });
|
||||||
setLogDataDiff(request, { before, after: evaluation });
|
setLogDataDiff(request, { before, after: evaluation });
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -291,23 +291,23 @@ export class ReoportController {
|
||||||
if (!evaluation.userId) {
|
if (!evaluation.userId) {
|
||||||
return "ไม่พบข้อมูลผู้ขอประเมิน";
|
return "ไม่พบข้อมูลผู้ขอประเมิน";
|
||||||
}
|
}
|
||||||
await new CallAPI()
|
// await new CallAPI()
|
||||||
.GetData(request, `/org/profile/keycloak/commander/${evaluation.userId}`)
|
// .GetData(request, `/org/profile/keycloak/commander/${evaluation.userId}`)
|
||||||
.then(async (x) => {
|
// .then(async (x) => {
|
||||||
(root = x.root),
|
// (root = x.root),
|
||||||
(dateStart = x.dateStart),
|
// (dateStart = x.dateStart),
|
||||||
(dateRetireLaw = x.dateRetireLaw),
|
// (dateRetireLaw = x.dateRetireLaw),
|
||||||
(org = x.org),
|
// (org = x.org),
|
||||||
(commanderFullname = x.commanderFullname),
|
// (commanderFullname = x.commanderFullname),
|
||||||
(commanderPosition = x.commanderPosition),
|
// (commanderPosition = x.commanderPosition),
|
||||||
(commanderRootName = x.commanderRootName),
|
// (commanderRootName = x.commanderRootName),
|
||||||
(commanderOrg = x.commanderOrg),
|
// (commanderOrg = x.commanderOrg),
|
||||||
(commanderAboveFullname = x.commanderAboveFullname),
|
// (commanderAboveFullname = x.commanderAboveFullname),
|
||||||
(commanderAbovePosition = x.commanderAbovePosition),
|
// (commanderAbovePosition = x.commanderAbovePosition),
|
||||||
(commanderAboveRootName = x.commanderAboveRootName),
|
// (commanderAboveRootName = x.commanderAboveRootName),
|
||||||
(commanderAboveOrg = x.commanderAboveOrg);
|
// (commanderAboveOrg = x.commanderAboveOrg);
|
||||||
})
|
// })
|
||||||
.catch();
|
// .catch();
|
||||||
const evaluationOld = await this.evaluationRepository.find({
|
const evaluationOld = await this.evaluationRepository.find({
|
||||||
where: {
|
where: {
|
||||||
id: Not(id),
|
id: Not(id),
|
||||||
|
|
@ -351,8 +351,9 @@ export class ReoportController {
|
||||||
positionLevel: evaluation.positionLevel ? evaluation.positionLevel : "",
|
positionLevel: evaluation.positionLevel ? evaluation.positionLevel : "",
|
||||||
detailAnnounceStep5Body: evaluation.detailAnnounceStep5Body,
|
detailAnnounceStep5Body: evaluation.detailAnnounceStep5Body,
|
||||||
detailAnnounceStep5Footer: evaluation.detailAnnounceStep5Footer,
|
detailAnnounceStep5Footer: evaluation.detailAnnounceStep5Footer,
|
||||||
positionArea: evaluation.positionArea,
|
positionAreaWithSym: evaluation.positionArea?`(${Extension.ToThaiNumber(evaluation.positionArea)})` : "",
|
||||||
posExecutive: evaluation.posExecutive,
|
posExecutive: evaluation.posExecutive,
|
||||||
|
posFull: (evaluation.position ? `${evaluation.position}` : "") + (evaluation.posExecutive ? " " + `${evaluation.posExecutive}` : "") + (evaluation.positionLevel ? " " + `${evaluation.positionLevel}` : ""),
|
||||||
birthDate:
|
birthDate:
|
||||||
evaluation.birthDate != null && evaluation.birthDate != ""
|
evaluation.birthDate != null && evaluation.birthDate != ""
|
||||||
? Extension.ToThaiNumber(
|
? Extension.ToThaiNumber(
|
||||||
|
|
@ -440,7 +441,9 @@ export class ReoportController {
|
||||||
amount: salaries.amount
|
amount: salaries.amount
|
||||||
? Extension.ToThaiNumber(salaries.amount.toLocaleString())
|
? Extension.ToThaiNumber(salaries.amount.toLocaleString())
|
||||||
: "-",
|
: "-",
|
||||||
position: salaries.positionName ? Extension.ToThaiNumber(salaries.positionName) : "-",
|
position: salaries.positionName ? salaries.positionName : "-",
|
||||||
|
positionExecutive: salaries.positionExecutive ? salaries.positionExecutive : "",
|
||||||
|
positionAndPosEx: (salaries.positionName ? salaries.positionName : "") + (salaries.positionExecutive ? " " + salaries.positionExecutive : ""),
|
||||||
positionSalaryAmount: salaries.positionSalaryAmount,
|
positionSalaryAmount: salaries.positionSalaryAmount,
|
||||||
mouthSalaryAmount: salaries.mouthSalaryAmount,
|
mouthSalaryAmount: salaries.mouthSalaryAmount,
|
||||||
posNo: salaries.posNo,
|
posNo: salaries.posNo,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue