role
This commit is contained in:
parent
75ed79f722
commit
23df3da9b0
7 changed files with 65 additions and 25 deletions
|
|
@ -37,6 +37,8 @@ import { KpiCapacity } from "../entities/kpiCapacity";
|
|||
import { Position } from "../entities/position";
|
||||
import { KpiLink } from "../entities/kpiLink";
|
||||
import { KpiGroup } from "../entities/kpiGroup";
|
||||
import { RequestWithUser } from "../middlewares/user";
|
||||
import permission from "../interfaces/permission";
|
||||
|
||||
@Route("api/v1/kpi/user/evaluation")
|
||||
@Tags("kpiUserEvaluation")
|
||||
|
|
@ -313,8 +315,9 @@ export class KpiUserEvaluationController extends Controller {
|
|||
@Post()
|
||||
async CreateKpiUserEvaluation(
|
||||
@Body() requestBody: createKpiUserEvaluation,
|
||||
@Request() request: { user: Record<string, any> },
|
||||
@Request() request: RequestWithUser,
|
||||
) {
|
||||
await new permission().PermissionCreate(request, "SYS_KPI_LIST");
|
||||
const kpiPeriod = await this.kpiPeriodRepository.findOne({
|
||||
where: { id: requestBody.kpiPeriodId },
|
||||
});
|
||||
|
|
@ -1376,8 +1379,9 @@ export class KpiUserEvaluationController extends Controller {
|
|||
requestBody: {
|
||||
id: string[];
|
||||
},
|
||||
@Request() request: { user: Record<string, any> },
|
||||
@Request() request: RequestWithUser,
|
||||
) {
|
||||
await new permission().PermissionCreate(request, "SYS_RESULT");
|
||||
const kpiUserEvaluations = await this.kpiUserEvalutionRepository.find({
|
||||
where: { id: In(requestBody.id) },
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue