From ce83b8d0a9a4ea5f7c618cd38d768a43ee0099fb Mon Sep 17 00:00:00 2001 From: Adisak Date: Fri, 31 Oct 2025 10:40:27 +0700 Subject: [PATCH] #28 --- src/controllers/KpiUserEvaluationController.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/controllers/KpiUserEvaluationController.ts b/src/controllers/KpiUserEvaluationController.ts index 9816fb0..ba36285 100644 --- a/src/controllers/KpiUserEvaluationController.ts +++ b/src/controllers/KpiUserEvaluationController.ts @@ -667,6 +667,14 @@ export class KpiUserEvaluationController extends Controller { @Body() requestBody: createKpiUserEvaluation, @Request() request: RequestWithUser, ) { + if(requestBody.evaluatorId == requestBody.commanderId || + requestBody.commanderId == requestBody.commanderHighId || + requestBody.evaluatorId == requestBody.commanderHighId){ + throw new HttpError( + HttpStatusCode.NOT_FOUND, + "ไม่พบข้อมูลรอบการประเมินผลการปฏิบัติหน้าที่ราชการนี้", + ); + } // await new permission().PermissionCreate(request, "SYS_KPI_LIST"); const kpiPeriod = await this.kpiPeriodRepository.findOne({ where: { id: requestBody.kpiPeriodId },