fix
This commit is contained in:
parent
df5eada7c6
commit
5470f9fbd2
1 changed files with 21 additions and 24 deletions
|
|
@ -1767,28 +1767,28 @@ export class EvaluationController {
|
||||||
if (!evaluation) {
|
if (!evaluation) {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "not found.");
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "not found.");
|
||||||
}
|
}
|
||||||
// if (evaluation.step != "WAIT_CHECK_DOC_V1") {
|
if (evaluation.step != "WAIT_CHECK_DOC_V1") {
|
||||||
// const evaluationLogs = new EvaluationLogs();
|
const evaluationLogs = new EvaluationLogs();
|
||||||
// const _null: any = null;
|
const _null: any = null;
|
||||||
// evaluationLogs.step = (await ConvertToThaiStep("WAIT_CHECK_DOC_V1")) ?? _null;
|
evaluationLogs.step = (await ConvertToThaiStep("WAIT_CHECK_DOC_V1")) ?? _null;
|
||||||
// evaluationLogs.createdUserId = request.user.sub;
|
evaluationLogs.createdUserId = request.user.sub;
|
||||||
// evaluationLogs.createdFullName = request.user.name;
|
evaluationLogs.createdFullName = request.user.name;
|
||||||
// evaluationLogs.createdAt = new Date();
|
evaluationLogs.createdAt = new Date();
|
||||||
// evaluationLogs.lastUpdateUserId = request.user.sub;
|
evaluationLogs.lastUpdateUserId = request.user.sub;
|
||||||
// evaluationLogs.lastUpdateFullName = request.user.name;
|
evaluationLogs.lastUpdateFullName = request.user.name;
|
||||||
// evaluationLogs.lastUpdatedAt = new Date();
|
evaluationLogs.lastUpdatedAt = new Date();
|
||||||
// evaluationLogs.evaluation = evaluation;
|
evaluationLogs.evaluation = evaluation;
|
||||||
// await this.evaluationLogsRepository.save(evaluationLogs, { data: request });
|
await this.evaluationLogsRepository.save(evaluationLogs, { data: request });
|
||||||
// setLogDataDiff(request, { before: null, after: evaluationLogs });
|
setLogDataDiff(request, { before: null, after: evaluationLogs });
|
||||||
// }
|
}
|
||||||
// const before = structuredClone(evaluation);
|
const before = structuredClone(evaluation);
|
||||||
|
|
||||||
// evaluation.step = "WAIT_CHECK_DOC_V1";
|
evaluation.step = "WAIT_CHECK_DOC_V1";
|
||||||
// evaluation.lastUpdateUserId = request.user.sub;
|
evaluation.lastUpdateUserId = request.user.sub;
|
||||||
// evaluation.lastUpdateFullName = request.user.name;
|
evaluation.lastUpdateFullName = request.user.name;
|
||||||
// evaluation.lastUpdatedAt = new Date();
|
evaluation.lastUpdatedAt = new Date();
|
||||||
// await this.evaluationRepository.save(evaluation, { data: request });
|
await this.evaluationRepository.save(evaluation, { data: request });
|
||||||
// setLogDataDiff(request, { before, after: evaluation });
|
setLogDataDiff(request, { before, after: evaluation });
|
||||||
|
|
||||||
let _director: any;
|
let _director: any;
|
||||||
await new CallAPI()
|
await new CallAPI()
|
||||||
|
|
@ -1799,16 +1799,13 @@ export class EvaluationController {
|
||||||
_director = x;
|
_director = x;
|
||||||
})
|
})
|
||||||
.catch((x) => {});
|
.catch((x) => {});
|
||||||
console.log(_director);
|
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
_director.map((director:any) => {
|
_director.map((director:any) => {
|
||||||
console.log(">>",director.id);
|
|
||||||
return new CallAPI()
|
return new CallAPI()
|
||||||
.PostData(request, "/placement/noti/keycloak", {
|
.PostData(request, "/placement/noti/keycloak", {
|
||||||
subject: `${evaluation.fullName} แบบประเมินมีการบันทึกตรวจสอบจัดเตรียมเอกสารเล่ม 1`,
|
subject: `${evaluation.fullName} แบบประเมินมีการบันทึกตรวจสอบจัดเตรียมเอกสารเล่ม 1`,
|
||||||
body: `${evaluation.fullName} แบบประเมินมีการบันทึกตรวจสอบจัดเตรียมเอกสารเล่ม 1`,
|
body: `${evaluation.fullName} แบบประเมินมีการบันทึกตรวจสอบจัดเตรียมเอกสารเล่ม 1`,
|
||||||
receiverUserId: director.keycloak,
|
receiverUserId: director.keycloak,
|
||||||
// receiverUserId: "59134ef9-9e62-41d0-aac5-339be727f2b0",
|
|
||||||
payload: "",
|
payload: "",
|
||||||
isSendMail: true,
|
isSendMail: true,
|
||||||
isSendInbox: true,
|
isSendInbox: true,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue