fix
This commit is contained in:
parent
90f2676a9e
commit
362af24ee0
1 changed files with 6 additions and 6 deletions
|
|
@ -56,7 +56,7 @@ export class KpiUserSpecialController extends Controller {
|
|||
requestBody: CreateKpiUserSpecial,
|
||||
@Request() request: RequestWithUser,
|
||||
) {
|
||||
await new permission().PermissionCreate(request, "SYS_KPI_LIST");
|
||||
// await new permission().PermissionCreate(request, "SYS_KPI_LIST");
|
||||
const chkUserEvaluation = await this.kpiUserEvaluationRepository.findOne({
|
||||
where: { id: requestBody.kpiUserEvaluationId },
|
||||
});
|
||||
|
|
@ -132,7 +132,7 @@ export class KpiUserSpecialController extends Controller {
|
|||
@Body() requestBody: UpdateKpiUserSpecial,
|
||||
@Request() request: RequestWithUser,
|
||||
) {
|
||||
await new permission().PermissionUpdate(request, "SYS_KPI_LIST");
|
||||
// await new permission().PermissionUpdate(request, "SYS_KPI_LIST");
|
||||
const kpiUserSpecial = await this.kpiUserSpecialRepository.findOne({ where: { id } });
|
||||
if (!kpiUserSpecial) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลงานที่ได้รับมอบหมายพิเศษนี้");
|
||||
|
|
@ -204,7 +204,7 @@ export class KpiUserSpecialController extends Controller {
|
|||
*/
|
||||
@Delete("{id}")
|
||||
async deleteKpiUserSpecial(@Path() id: string, @Request() request: RequestWithUser) {
|
||||
await new permission().PermissionDelete(request, "SYS_KPI_LIST");
|
||||
// await new permission().PermissionDelete(request, "SYS_KPI_LIST");
|
||||
const delKpiUserSpecial = await this.kpiUserSpecialRepository.findOne({ where: { id } });
|
||||
if (!delKpiUserSpecial) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลงานที่ได้รับมอบหมายพิเศษนี้");
|
||||
|
|
@ -229,7 +229,7 @@ export class KpiUserSpecialController extends Controller {
|
|||
if (!getKpiUserSpecial) {
|
||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลงานที่ได้รับมอบหมายพิเศษนี้");
|
||||
}
|
||||
|
||||
console.log("CODE28");
|
||||
const mapKpiUserSpecial = {
|
||||
id: getKpiUserSpecial.id,
|
||||
evaluationId: getKpiUserSpecial.kpiUserEvaluation.id,
|
||||
|
|
@ -275,7 +275,7 @@ export class KpiUserSpecialController extends Controller {
|
|||
*/
|
||||
@Get()
|
||||
async GetKpiUserSpecial(@Request() request: RequestWithUser, @Query("id") id: string) {
|
||||
await new permission().PermissionGet(request, "SYS_KPI_LIST");
|
||||
// await new permission().PermissionGet(request, "SYS_KPI_LIST");
|
||||
const kpiUserSpecial = await this.kpiUserSpecialRepository.find({
|
||||
where: {
|
||||
kpiUserEvaluationId: id,
|
||||
|
|
@ -329,7 +329,7 @@ export class KpiUserSpecialController extends Controller {
|
|||
@Body() requestBody: KpiUserSpecialDataPoint[],
|
||||
@Request() request: RequestWithUser,
|
||||
) {
|
||||
await new permission().PermissionCreate(request, "SYS_KPI_LIST");
|
||||
// await new permission().PermissionCreate(request, "SYS_KPI_LIST");
|
||||
for (const item of requestBody) {
|
||||
const kpiUserSpecial = await this.kpiUserSpecialRepository.findOne({
|
||||
where: { id: item.id },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue