fix รอประกาศผล final

This commit is contained in:
AdisakKanthawilang 2024-10-16 15:20:14 +07:00
parent b08c72e21c
commit e3e6a1df36

View file

@ -1629,7 +1629,10 @@ export class KpiUserEvaluationController extends Controller {
pointSum: kpiUserEvaluation.summaryPoint,
profileId: kpiUserEvaluation.profileId,
})
.then(async () => {});
.then(async () => {})
.catch((error) => {
console.error('Error details:', error.response.data);
});
kpiUserEvaluation.kpiUserDevelopments.map(async (kpiUserDevelopment) => {
await new CallAPI()
@ -1652,20 +1655,26 @@ export class KpiUserEvaluationController extends Controller {
developmentReport: kpiUserDevelopment.point != null ?kpiUserDevelopment.point.toString():null,
developmentProjects: kpiUserDevelopment.developmentProjects.map((x) => x.name),
})
.then(async () => {});
.then(async () => {})
.catch((error) => {
console.error('Error details:', error.response.data);
});
});
// await new CallAPI()
// .PostData(request, "/placement/noti/profile", {
// subject: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} ระดับผลการประเมินการปฏิบัติราชการระดับบุคคลของคุณอยู่ในเกณฑ์ ${kpiUserEvaluation.summaryPoint}`,
// body: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} ระดับผลการประเมินการปฏิบัติราชการระดับบุคคลของคุณอยู่ในเกณฑ์ ${kpiUserEvaluation.summaryPoint}`,
// receiverUserId: kpiUserEvaluation.profileId,
// payload: "",
// isSendMail: true,
// isSendInbox: true,
// isSendNotification: true,
// })
// .then(async () => {})
// .catch(() => {});
await new CallAPI()
.PostData(request, "/placement/noti/profile", {
subject: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} ระดับผลการประเมินการปฏิบัติราชการระดับบุคคลของคุณอยู่ในเกณฑ์ ${kpiUserEvaluation.summaryPoint}`,
body: `${kpiUserEvaluation.prefix}${kpiUserEvaluation.firstName} ${kpiUserEvaluation.lastName} ระดับผลการประเมินการปฏิบัติราชการระดับบุคคลของคุณอยู่ในเกณฑ์ ${kpiUserEvaluation.summaryPoint}`,
receiverUserId: kpiUserEvaluation.profileId,
payload: "",
isSendMail: true,
isSendInbox: true,
isSendNotification: true,
})
.then(async () => {})
.catch((error) => {
console.error('Error details:', error.response.data);
});
const before = null;
kpiUserEvaluation.lastUpdateUserId = request.user.sub;
kpiUserEvaluation.lastUpdateFullName = request.user.name;