From 1c42a242c08f68694130460057427d9bbd1d1d5a Mon Sep 17 00:00:00 2001 From: Kittapath Date: Fri, 19 Apr 2024 17:35:42 +0700 Subject: [PATCH] no message --- src/controllers/KpiPlanController.ts | 5 ++--- src/controllers/KpiRoleController.ts | 6 ++---- src/entities/kpiPlan.ts | 11 ----------- src/entities/kpiRole.ts | 11 ----------- 4 files changed, 4 insertions(+), 29 deletions(-) diff --git a/src/controllers/KpiPlanController.ts b/src/controllers/KpiPlanController.ts index d7ea759..7136b3e 100644 --- a/src/controllers/KpiPlanController.ts +++ b/src/controllers/KpiPlanController.ts @@ -84,7 +84,7 @@ export class kpiPlanController extends Controller { kpiPlan.strategyChild5Id = requestBody.strategy <= 4 ? null : x.strategyChild5Id; }) .catch((x) => {}); - kpiPlan.round = requestBody.round.trim().toUpperCase(); + kpiPlan.createdUserId = request.user.sub; kpiPlan.createdFullName = request.user.name; kpiPlan.lastUpdateUserId = request.user.sub; @@ -112,7 +112,6 @@ export class kpiPlanController extends Controller { throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลตัวชี้วัดตามแผนฯนี้"); } - kpiPlan.round = requestBody.round.trim().toUpperCase(); Object.assign(kpiPlan, requestBody); await new CallAPI() .PostData(request, "org/find/all", { @@ -214,7 +213,7 @@ export class kpiPlanController extends Controller { const formattedData = { id: kpiPlan.id, year: kpiPlan.year, - round: kpiPlan.round, + // round: kpiPlan.round, including: kpiPlan.including, includingName: kpiPlan.includingName, target: kpiPlan.target, diff --git a/src/controllers/KpiRoleController.ts b/src/controllers/KpiRoleController.ts index 1acc5d0..406d7c2 100644 --- a/src/controllers/KpiRoleController.ts +++ b/src/controllers/KpiRoleController.ts @@ -66,7 +66,6 @@ export class kpiRoleController extends Controller { kpiRole.child4ShortName = requestBody.node <= 3 ? null : x.child4ShortName; }) .catch((x) => {}); - kpiRole.round = requestBody.round.trim().toUpperCase(); kpiRole.createdUserId = request.user.sub; kpiRole.createdFullName = request.user.name; kpiRole.lastUpdateUserId = request.user.sub; @@ -94,7 +93,6 @@ export class kpiRoleController extends Controller { throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลตัวชี้วัดตามตำแหน่งนี้"); } - kpiRole.round = requestBody.round.trim().toUpperCase(); Object.assign(kpiRole, requestBody); await new CallAPI() .PostData(request, "org/find/all", { @@ -160,7 +158,7 @@ export class kpiRoleController extends Controller { const formattedData = { id: kpiRole.id, year: kpiRole.year, - round: kpiRole.round, + // round: kpiRole.round, including: kpiRole.including, includingName: kpiRole.includingName, target: kpiRole.target, @@ -176,7 +174,7 @@ export class kpiRoleController extends Controller { node: node, nodeId: nodeId, orgRevisionId: kpiRole.orgRevisionId, - position: kpiRole.position + position: kpiRole.position, }; return new HttpSuccess(formattedData); } diff --git a/src/entities/kpiPlan.ts b/src/entities/kpiPlan.ts index 0f5c6ea..82f4153 100644 --- a/src/entities/kpiPlan.ts +++ b/src/entities/kpiPlan.ts @@ -11,13 +11,6 @@ export class KpiPlan extends EntityBase { }) year: number; - @Column({ - nullable: true, - comment: "รอบการประเมิน", - default: null, - }) - round: string; - @Column({ nullable: true, comment: "รหัสตัวชี้วัด", @@ -305,8 +298,6 @@ export class createKpiPlan { @Column() year: number | null; @Column() - round: string; - @Column() including: string | null; @Column() includingName: string | null; @@ -348,8 +339,6 @@ export class updateKpiPlan { @Column() year: number | null; @Column() - round: string; - @Column() including: string | null; @Column() includingName: string | null; diff --git a/src/entities/kpiRole.ts b/src/entities/kpiRole.ts index d644fa5..3136bb6 100644 --- a/src/entities/kpiRole.ts +++ b/src/entities/kpiRole.ts @@ -18,13 +18,6 @@ export class KpiRole extends EntityBase { }) year: number; - @Column({ - nullable: true, - comment: "รอบการประเมิน", - default: null, - }) - round: string; - @Column({ nullable: true, comment: "รหัสตัวชี้วัด", @@ -239,8 +232,6 @@ export class createKpiRole { @Column() year: number | null; @Column() - round: string; - @Column() including: string | null; @Column() includingName: string | null; @@ -280,8 +271,6 @@ export class updateKpiRole { @Column() year: number | null; @Column() - round: string; - @Column() including: string | null; @Column() includingName: string | null;