From 7bdecb7205c65a424ea8bdcad8939cdab1e67e9e Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Wed, 20 Aug 2025 12:14:01 +0700 Subject: [PATCH] update --- src/controllers/KpiUserEvaluationController.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/controllers/KpiUserEvaluationController.ts b/src/controllers/KpiUserEvaluationController.ts index 751260e..deb7ab1 100644 --- a/src/controllers/KpiUserEvaluationController.ts +++ b/src/controllers/KpiUserEvaluationController.ts @@ -1158,6 +1158,24 @@ export class KpiUserEvaluationController extends Controller { }) .then(() => {}) .catch(() => {}); + } else if (requestBody.status.trim().toUpperCase() == "APPROVE") { // ทุกขั้นอนุมัติแล้วส่งกลับไปหาผู้ขอประเมินเพื่อส่งขอทำการประเมินต่อ + await new CallAPI() + .PostData(request, "/placement/noti/profiles", { + subject: `ผู้ประเมินและผู้บังคับบัญชาอนุมัติข้อตกลงการประเมินผลฯ สามารถดำเนินการขั้นตอนต่อไปได้`, + body: `ผู้ประเมินและผู้บังคับบัญชาอนุมัติข้อตกลงการประเมินผลฯ สามารถดำเนินการขั้นตอนต่อไปได้`, + receiverUserIds: [ + { + receiverUserId: kpiUserEvaluation.evaluatorId, + notiLink: `${process.env.USER_NOTI_URL}/KPI-evaluator/${kpiUserEvaluation.id}`, + }, + ], + payload: "", + isSendMail: true, + isSendInbox: true, + isSendNotification: true, + }) + .then(() => {}) + .catch(() => {}); } const before = structuredClone(kpiUserEvaluation); let _null: any = null;