From b63d998442f9632e91e184ab85ee30db5175b43b Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Wed, 8 May 2024 14:10:22 +0700 Subject: [PATCH] fix --- src/controllers/KpiPlanController.ts | 4 ++-- src/controllers/KpiRoleController.ts | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/controllers/KpiPlanController.ts b/src/controllers/KpiPlanController.ts index 09b7f6a..35f8e33 100644 --- a/src/controllers/KpiPlanController.ts +++ b/src/controllers/KpiPlanController.ts @@ -342,8 +342,8 @@ export class kpiPlanController extends Controller { id: kpiPlan.id, // year: kpiPlan.kpiPeriod == null ? null : kpiPlan.kpiPeriod.year, // round: kpiPlan.kpiPeriod == null ? null : kpiPlan.kpiPeriod.durationKPI, - year: kpiPlan.kpiPeriod == null ? null : kpiPlan.year, - round: kpiPlan.kpiPeriod == null ? null : kpiPlan.period, + year: kpiPlan.year == null ? null : kpiPlan.year, + round: kpiPlan.period == null ? null : kpiPlan.period, kpiPeriodId: kpiPlan.kpiPeriodId, including: kpiPlan.including, includingName: kpiPlan.includingName, diff --git a/src/controllers/KpiRoleController.ts b/src/controllers/KpiRoleController.ts index 964725d..fd57ee5 100644 --- a/src/controllers/KpiRoleController.ts +++ b/src/controllers/KpiRoleController.ts @@ -296,8 +296,10 @@ export class kpiRoleController extends Controller { } const formattedData = { id: kpiRole.id, - year: kpiRole.kpiPeriod == null ? null : kpiRole.kpiPeriod.year, - round: kpiRole.kpiPeriod == null ? null : kpiRole.kpiPeriod.durationKPI, + // year: kpiRole.kpiPeriod == null ? null : kpiRole.kpiPeriod.year, + // round: kpiRole.kpiPeriod == null ? null : kpiRole.kpiPeriod.durationKPI, + year: kpiRole.year == null ? null : kpiRole.year, + round: kpiRole.period == null ? null : kpiRole.period, kpiPeriodId: kpiRole.kpiPeriodId, including: kpiRole.including, includingName: kpiRole.includingName, @@ -321,6 +323,8 @@ export class kpiRoleController extends Controller { nodeName: nodeName, orgRevisionId: kpiRole.orgRevisionId, position: kpiRole.position, + documentInfoEvidence: kpiRole.documentInfoEvidence, + }; return new HttpSuccess(formattedData); }