This commit is contained in:
Adisak 2025-10-31 10:40:27 +07:00
parent ca52b5b077
commit ce83b8d0a9

View file

@ -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 },