This commit is contained in:
parent
ca52b5b077
commit
ce83b8d0a9
1 changed files with 8 additions and 0 deletions
|
|
@ -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 },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue