Merge branch 'develop' into adiDev
This commit is contained in:
commit
9646659f4c
8 changed files with 411 additions and 99 deletions
102
.onedev-buildspec.yml
Normal file
102
.onedev-buildspec.yml
Normal file
|
|
@ -0,0 +1,102 @@
|
||||||
|
version: 37
|
||||||
|
jobs:
|
||||||
|
- name: CI for UAT
|
||||||
|
steps:
|
||||||
|
- !CheckoutStep
|
||||||
|
name: checkout code
|
||||||
|
cloneCredential: !DefaultCredential {}
|
||||||
|
withLfs: false
|
||||||
|
withSubmodules: false
|
||||||
|
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
|
||||||
|
- !GenerateChecksumStep
|
||||||
|
name: generate package checksum
|
||||||
|
files: package-lock.json yarn.lock
|
||||||
|
targetFile: checksum
|
||||||
|
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
|
||||||
|
- !SetupCacheStep
|
||||||
|
name: set up npm cache
|
||||||
|
key: node_modules_@file:checksum@
|
||||||
|
loadKeys:
|
||||||
|
- node_modules
|
||||||
|
paths:
|
||||||
|
- node_modules
|
||||||
|
uploadStrategy: UPLOAD_IF_NOT_HIT
|
||||||
|
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
|
||||||
|
- !SetBuildVersionStep
|
||||||
|
name: set build version
|
||||||
|
buildVersion: '@tag@'
|
||||||
|
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
|
||||||
|
- !CommandStep
|
||||||
|
name: build & test
|
||||||
|
runInContainer: true
|
||||||
|
image: node
|
||||||
|
interpreter: !DefaultInterpreter
|
||||||
|
commands: |
|
||||||
|
npm install
|
||||||
|
npm run build
|
||||||
|
useTTY: true
|
||||||
|
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
|
||||||
|
- !BuildImageStep
|
||||||
|
name: build docker image
|
||||||
|
dockerfile: ./docker/Dockerfile
|
||||||
|
output: !RegistryOutput
|
||||||
|
tags: hrms-git.chin.in.th/bma-hrms/hrms-api-kpi:@build_version@ hrms-git.chin.in.th/bma-hrms/hrms-api-kpi:latest
|
||||||
|
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
|
||||||
|
triggers:
|
||||||
|
- !TagCreateTrigger
|
||||||
|
tags: uat-*
|
||||||
|
branches: main
|
||||||
|
retryCondition: never
|
||||||
|
maxRetries: 3
|
||||||
|
retryDelay: 30
|
||||||
|
timeout: 14400
|
||||||
|
- name: CI for PROD
|
||||||
|
steps:
|
||||||
|
- !CheckoutStep
|
||||||
|
name: checkout code
|
||||||
|
cloneCredential: !DefaultCredential {}
|
||||||
|
withLfs: false
|
||||||
|
withSubmodules: false
|
||||||
|
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
|
||||||
|
- !GenerateChecksumStep
|
||||||
|
name: generate package checksum
|
||||||
|
files: package-lock.json yarn.lock
|
||||||
|
targetFile: checksum
|
||||||
|
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
|
||||||
|
- !SetupCacheStep
|
||||||
|
name: set up npm cache
|
||||||
|
key: node_modules_@file:checksum@
|
||||||
|
loadKeys:
|
||||||
|
- node_modules
|
||||||
|
paths:
|
||||||
|
- node_modules
|
||||||
|
uploadStrategy: UPLOAD_IF_NOT_HIT
|
||||||
|
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
|
||||||
|
- !SetBuildVersionStep
|
||||||
|
name: set build version
|
||||||
|
buildVersion: '@tag@'
|
||||||
|
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
|
||||||
|
- !CommandStep
|
||||||
|
name: build & test
|
||||||
|
runInContainer: true
|
||||||
|
image: node
|
||||||
|
interpreter: !DefaultInterpreter
|
||||||
|
commands: |
|
||||||
|
npm install
|
||||||
|
npm run build
|
||||||
|
useTTY: true
|
||||||
|
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
|
||||||
|
- !BuildImageStep
|
||||||
|
name: build docker image
|
||||||
|
dockerfile: ./docker/Dockerfile
|
||||||
|
output: !RegistryOutput
|
||||||
|
tags: hrms-git.bangkok.go.th/bma-hrms/hrms-api-kpi:@build_version@ hrms-git.bangkok.go.th/bma-hrms/hrms-api-kpi:latest
|
||||||
|
condition: ALL_PREVIOUS_STEPS_WERE_SUCCESSFUL
|
||||||
|
triggers:
|
||||||
|
- !TagCreateTrigger
|
||||||
|
tags: prod-*
|
||||||
|
branches: main
|
||||||
|
retryCondition: never
|
||||||
|
maxRetries: 3
|
||||||
|
retryDelay: 30
|
||||||
|
timeout: 14400
|
||||||
|
|
@ -211,6 +211,7 @@ export class kpiCapacityController extends Controller {
|
||||||
},
|
},
|
||||||
select: ["id", "name"],
|
select: ["id", "name"],
|
||||||
relations: ["kpiCapacityDetails"],
|
relations: ["kpiCapacityDetails"],
|
||||||
|
order: { createdAt: "ASC" },
|
||||||
});
|
});
|
||||||
|
|
||||||
const mapData = kpiCapacity.map((x) => ({
|
const mapData = kpiCapacity.map((x) => ({
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,10 @@ export class kpiPlanController extends Controller {
|
||||||
.where("kpiPeriod.year = :year", { year: requestBody.year })
|
.where("kpiPeriod.year = :year", { year: requestBody.year })
|
||||||
.andWhere("kpiPeriod.durationKPI = :durationKPI", { durationKPI: requestBody.period })
|
.andWhere("kpiPeriod.durationKPI = :durationKPI", { durationKPI: requestBody.period })
|
||||||
.getOne();
|
.getOne();
|
||||||
const year = requestBody.year && parseInt(requestBody.year) > 0?parseInt(requestBody.year) + 543:"ดังกล่าว";
|
const year =
|
||||||
|
requestBody.year && parseInt(requestBody.year) > 0
|
||||||
|
? parseInt(requestBody.year) + 543
|
||||||
|
: "ดังกล่าว";
|
||||||
if (!kpiPeriod) {
|
if (!kpiPeriod) {
|
||||||
// throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลตัวชี้วัดตามตำแหน่งนี้");
|
// throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลตัวชี้วัดตามตำแหน่งนี้");
|
||||||
throw new HttpError(
|
throw new HttpError(
|
||||||
|
|
@ -453,6 +456,7 @@ export class kpiPlanController extends Controller {
|
||||||
if (kpiPlan.strategyChild5Id != null) {
|
if (kpiPlan.strategyChild5Id != null) {
|
||||||
strategy = 5;
|
strategy = 5;
|
||||||
strategyId = kpiPlan.strategyChild5Id;
|
strategyId = kpiPlan.strategyChild5Id;
|
||||||
|
strategyName = kpiPlan.strategyChild5;
|
||||||
} else if (kpiPlan.strategyChild4Id != null) {
|
} else if (kpiPlan.strategyChild4Id != null) {
|
||||||
strategy = 4;
|
strategy = 4;
|
||||||
strategyId = kpiPlan.strategyChild4Id;
|
strategyId = kpiPlan.strategyChild4Id;
|
||||||
|
|
@ -870,9 +874,9 @@ export class kpiPlanController extends Controller {
|
||||||
type = 4;
|
type = 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
const _null:any = null;
|
const _null: any = null;
|
||||||
await this.kpiPlanHistoryRepository.delete({ kpiPlanId: id });
|
await this.kpiPlanHistoryRepository.delete({ kpiPlanId: id });
|
||||||
await this.kpiUserPlanRepository.update({ kpiPlanId: id },{ kpiPlanId: _null });
|
await this.kpiUserPlanRepository.update({ kpiPlanId: id }, { kpiPlanId: _null });
|
||||||
await this.kpiPlanRepository.remove(kpiPlan, { data: request });
|
await this.kpiPlanRepository.remove(kpiPlan, { data: request });
|
||||||
|
|
||||||
if (kpiPlan) {
|
if (kpiPlan) {
|
||||||
|
|
|
||||||
|
|
@ -526,6 +526,7 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
kpiUserEvaluation.posLevelName = x.posLevelName;
|
kpiUserEvaluation.posLevelName = x.posLevelName;
|
||||||
kpiUserEvaluation.posTypeName = x.posTypeName;
|
kpiUserEvaluation.posTypeName = x.posTypeName;
|
||||||
kpiUserEvaluation.posExecutiveName = x.posExecutiveName;
|
kpiUserEvaluation.posExecutiveName = x.posExecutiveName;
|
||||||
|
kpiUserEvaluation.isProbation = x.isProbation;
|
||||||
kpiUserEvaluation.org = x.root;
|
kpiUserEvaluation.org = x.root;
|
||||||
kpiUserEvaluation.orgId = x.rootId;
|
kpiUserEvaluation.orgId = x.rootId;
|
||||||
kpiUserEvaluation.child1 = x.child1;
|
kpiUserEvaluation.child1 = x.child1;
|
||||||
|
|
@ -553,6 +554,7 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
kpiUserEvaluation.posLevelName = x.posLevelName;
|
kpiUserEvaluation.posLevelName = x.posLevelName;
|
||||||
kpiUserEvaluation.posTypeName = x.posTypeName;
|
kpiUserEvaluation.posTypeName = x.posTypeName;
|
||||||
kpiUserEvaluation.posExecutiveName = x.posExecutiveName;
|
kpiUserEvaluation.posExecutiveName = x.posExecutiveName;
|
||||||
|
kpiUserEvaluation.isProbation = x.isProbation;
|
||||||
kpiUserEvaluation.org = x.root;
|
kpiUserEvaluation.org = x.root;
|
||||||
kpiUserEvaluation.orgId = x.rootId;
|
kpiUserEvaluation.orgId = x.rootId;
|
||||||
kpiUserEvaluation.child1 = x.child1;
|
kpiUserEvaluation.child1 = x.child1;
|
||||||
|
|
@ -569,17 +571,39 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลในทะเบียนประวัติ");
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลในทะเบียนประวัติ");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
await new CallAPI()
|
if (requestBody.evaluatorId) {
|
||||||
.GetData(request, "/org/profile/profileid/position/" + requestBody.evaluatorId)
|
await new CallAPI()
|
||||||
.then((x) => {
|
.GetData(request, "/org/profile/profileid/position/" + requestBody.evaluatorId)
|
||||||
kpiUserEvaluation.prefixEvaluator = x.prefix;
|
.then((x) => {
|
||||||
kpiUserEvaluation.firstNameEvaluator = x.firstName;
|
kpiUserEvaluation.prefixEvaluator = x.prefix;
|
||||||
kpiUserEvaluation.lastNameEvaluator = x.lastName;
|
kpiUserEvaluation.firstNameEvaluator = x.firstName;
|
||||||
kpiUserEvaluation.positionEvaluator = x.position;
|
kpiUserEvaluation.lastNameEvaluator = x.lastName;
|
||||||
kpiUserEvaluation.posLevelNameEvaluator = x.posLevelName;
|
kpiUserEvaluation.positionEvaluator = x.position;
|
||||||
kpiUserEvaluation.posTypeNameEvaluator = x.posTypeName;
|
kpiUserEvaluation.posLevelNameEvaluator = x.posLevelName;
|
||||||
kpiUserEvaluation.orgEvaluator = x.root;
|
kpiUserEvaluation.posTypeNameEvaluator = x.posTypeName;
|
||||||
});
|
kpiUserEvaluation.orgEvaluator = x.root;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (requestBody.commanderId) {
|
||||||
|
await new CallAPI()
|
||||||
|
.GetData(request, "/org/profile/profileid/position/" + requestBody.commanderId)
|
||||||
|
.then((x) => {
|
||||||
|
kpiUserEvaluation.prefixCommander = x.prefix;
|
||||||
|
kpiUserEvaluation.firstNameCommander = x.firstName;
|
||||||
|
kpiUserEvaluation.lastNameCommander = x.lastName;
|
||||||
|
kpiUserEvaluation.positionCommander = x.position;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (requestBody.commanderHighId) {
|
||||||
|
await new CallAPI()
|
||||||
|
.GetData(request, "/org/profile/profileid/position/" + requestBody.commanderHighId)
|
||||||
|
.then((x) => {
|
||||||
|
kpiUserEvaluation.prefixCommanderHigh = x.prefix;
|
||||||
|
kpiUserEvaluation.firstNameCommanderHigh = x.firstName;
|
||||||
|
kpiUserEvaluation.lastNameCommanderHigh = x.lastName;
|
||||||
|
kpiUserEvaluation.positionCommanderHigh = x.position;
|
||||||
|
});
|
||||||
|
}
|
||||||
const before = null;
|
const before = null;
|
||||||
kpiUserEvaluation.evaluationStatus = "NEW";
|
kpiUserEvaluation.evaluationStatus = "NEW";
|
||||||
kpiUserEvaluation.evaluationResults = "PENDING";
|
kpiUserEvaluation.evaluationResults = "PENDING";
|
||||||
|
|
@ -747,6 +771,40 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
}
|
}
|
||||||
const before = structuredClone(kpiUserEvaluation);
|
const before = structuredClone(kpiUserEvaluation);
|
||||||
|
|
||||||
|
if (requestBody.evaluatorId) {
|
||||||
|
await new CallAPI()
|
||||||
|
.GetData(request, "/org/profile/profileid/position/" + requestBody.evaluatorId)
|
||||||
|
.then((x) => {
|
||||||
|
kpiUserEvaluation.prefixEvaluator = x.prefix;
|
||||||
|
kpiUserEvaluation.firstNameEvaluator = x.firstName;
|
||||||
|
kpiUserEvaluation.lastNameEvaluator = x.lastName;
|
||||||
|
kpiUserEvaluation.positionEvaluator = x.position;
|
||||||
|
kpiUserEvaluation.posLevelNameEvaluator = x.posLevelName;
|
||||||
|
kpiUserEvaluation.posTypeNameEvaluator = x.posTypeName;
|
||||||
|
kpiUserEvaluation.orgEvaluator = x.root;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (requestBody.commanderId) {
|
||||||
|
await new CallAPI()
|
||||||
|
.GetData(request, "/org/profile/profileid/position/" + requestBody.commanderId)
|
||||||
|
.then((x) => {
|
||||||
|
kpiUserEvaluation.prefixCommander = x.prefix;
|
||||||
|
kpiUserEvaluation.firstNameCommander = x.firstName;
|
||||||
|
kpiUserEvaluation.lastNameCommander = x.lastName;
|
||||||
|
kpiUserEvaluation.positionCommander = x.position;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
if (requestBody.commanderHighId) {
|
||||||
|
await new CallAPI()
|
||||||
|
.GetData(request, "/org/profile/profileid/position/" + requestBody.commanderHighId)
|
||||||
|
.then((x) => {
|
||||||
|
kpiUserEvaluation.prefixCommanderHigh = x.prefix;
|
||||||
|
kpiUserEvaluation.firstNameCommanderHigh = x.firstName;
|
||||||
|
kpiUserEvaluation.lastNameCommanderHigh = x.lastName;
|
||||||
|
kpiUserEvaluation.positionCommanderHigh = x.position;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
kpiUserEvaluation.lastUpdateUserId = request.user.sub;
|
kpiUserEvaluation.lastUpdateUserId = request.user.sub;
|
||||||
kpiUserEvaluation.lastUpdateFullName = request.user.name;
|
kpiUserEvaluation.lastUpdateFullName = request.user.name;
|
||||||
kpiUserEvaluation.lastUpdatedAt = new Date();
|
kpiUserEvaluation.lastUpdatedAt = new Date();
|
||||||
|
|
@ -1002,6 +1060,7 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
evaluationStatus: kpiUserEvaluation.evaluationStatus,
|
evaluationStatus: kpiUserEvaluation.evaluationStatus,
|
||||||
evaluationResults: kpiUserEvaluation.evaluationResults,
|
evaluationResults: kpiUserEvaluation.evaluationResults,
|
||||||
evaluationReqEdit: kpiUserEvaluation.evaluationReqEdit,
|
evaluationReqEdit: kpiUserEvaluation.evaluationReqEdit,
|
||||||
|
isProbation: kpiUserEvaluation.isProbation,
|
||||||
createdAt: kpiUserEvaluation.createdAt,
|
createdAt: kpiUserEvaluation.createdAt,
|
||||||
evaluatorId: kpiUserEvaluation.evaluatorId,
|
evaluatorId: kpiUserEvaluation.evaluatorId,
|
||||||
commanderId: kpiUserEvaluation.commanderId,
|
commanderId: kpiUserEvaluation.commanderId,
|
||||||
|
|
@ -1017,6 +1076,11 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
summaryPoint: kpiUserEvaluation.summaryPoint,
|
summaryPoint: kpiUserEvaluation.summaryPoint,
|
||||||
isOpen: kpiUserEvaluation.isOpen,
|
isOpen: kpiUserEvaluation.isOpen,
|
||||||
openDate: kpiUserEvaluation.openDate,
|
openDate: kpiUserEvaluation.openDate,
|
||||||
|
root: kpiUserEvaluation.org,
|
||||||
|
child1: kpiUserEvaluation.child1,
|
||||||
|
child2: kpiUserEvaluation.child2,
|
||||||
|
child3: kpiUserEvaluation.child3,
|
||||||
|
child4: kpiUserEvaluation.child4,
|
||||||
year: kpiUserEvaluation.kpiPeriod == null ? null : kpiUserEvaluation.kpiPeriod.year,
|
year: kpiUserEvaluation.kpiPeriod == null ? null : kpiUserEvaluation.kpiPeriod.year,
|
||||||
durationKPI:
|
durationKPI:
|
||||||
kpiUserEvaluation.kpiPeriod == null ? null : kpiUserEvaluation.kpiPeriod.durationKPI,
|
kpiUserEvaluation.kpiPeriod == null ? null : kpiUserEvaluation.kpiPeriod.durationKPI,
|
||||||
|
|
@ -1426,6 +1490,7 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
evaluationStatus: kpiUserEvaluation.evaluationStatus,
|
evaluationStatus: kpiUserEvaluation.evaluationStatus,
|
||||||
evaluationResults: kpiUserEvaluation.evaluationResults,
|
evaluationResults: kpiUserEvaluation.evaluationResults,
|
||||||
evaluationReqEdit: kpiUserEvaluation.evaluationReqEdit,
|
evaluationReqEdit: kpiUserEvaluation.evaluationReqEdit,
|
||||||
|
isProbation: kpiUserEvaluation.isProbation,
|
||||||
createdAt: kpiUserEvaluation.createdAt,
|
createdAt: kpiUserEvaluation.createdAt,
|
||||||
evaluatorId: kpiUserEvaluation.evaluatorId,
|
evaluatorId: kpiUserEvaluation.evaluatorId,
|
||||||
commanderId: kpiUserEvaluation.commanderId,
|
commanderId: kpiUserEvaluation.commanderId,
|
||||||
|
|
@ -1437,6 +1502,11 @@ export class KpiUserEvaluationController extends Controller {
|
||||||
summaryPoint: kpiUserEvaluation.summaryPoint,
|
summaryPoint: kpiUserEvaluation.summaryPoint,
|
||||||
isOpen: kpiUserEvaluation.isOpen,
|
isOpen: kpiUserEvaluation.isOpen,
|
||||||
openDate: kpiUserEvaluation.openDate,
|
openDate: kpiUserEvaluation.openDate,
|
||||||
|
root: kpiUserEvaluation.org,
|
||||||
|
child1: kpiUserEvaluation.child1,
|
||||||
|
child2: kpiUserEvaluation.child2,
|
||||||
|
child3: kpiUserEvaluation.child3,
|
||||||
|
child4: kpiUserEvaluation.child4,
|
||||||
year: kpiUserEvaluation.kpiPeriod == null ? null : kpiUserEvaluation.kpiPeriod.year,
|
year: kpiUserEvaluation.kpiPeriod == null ? null : kpiUserEvaluation.kpiPeriod.year,
|
||||||
durationKPI:
|
durationKPI:
|
||||||
kpiUserEvaluation.kpiPeriod == null ? null : kpiUserEvaluation.kpiPeriod.durationKPI,
|
kpiUserEvaluation.kpiPeriod == null ? null : kpiUserEvaluation.kpiPeriod.durationKPI,
|
||||||
|
|
|
||||||
|
|
@ -198,12 +198,38 @@ export class KpiUserPlannedController extends Controller {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลงานตามแผนปฏิบัติราชการประจำปีนี้");
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลงานตามแผนปฏิบัติราชการประจำปีนี้");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let nodeName = null;
|
||||||
|
if (getKpiUserPlanned.kpiPlan.child4Id != null) {
|
||||||
|
nodeName = getKpiUserPlanned.kpiPlan.child4;
|
||||||
|
} else if (getKpiUserPlanned.kpiPlan.child3Id != null) {
|
||||||
|
nodeName = getKpiUserPlanned.kpiPlan.child3;
|
||||||
|
} else if (getKpiUserPlanned.kpiPlan.child2Id != null) {
|
||||||
|
nodeName = getKpiUserPlanned.kpiPlan.child2;
|
||||||
|
} else if (getKpiUserPlanned.kpiPlan.child1Id != null) {
|
||||||
|
nodeName = getKpiUserPlanned.kpiPlan.child1;
|
||||||
|
} else if (getKpiUserPlanned.kpiPlan.rootId != null) {
|
||||||
|
nodeName = getKpiUserPlanned.kpiPlan.root;
|
||||||
|
}
|
||||||
|
let strategyName = null;
|
||||||
|
if (getKpiUserPlanned.kpiPlan.strategyChild5Id != null) {
|
||||||
|
strategyName = getKpiUserPlanned.kpiPlan.strategyChild5;
|
||||||
|
} else if (getKpiUserPlanned.kpiPlan.strategyChild4Id != null) {
|
||||||
|
strategyName = getKpiUserPlanned.kpiPlan.strategyChild4;
|
||||||
|
} else if (getKpiUserPlanned.kpiPlan.strategyChild3Id != null) {
|
||||||
|
strategyName = getKpiUserPlanned.kpiPlan.strategyChild3;
|
||||||
|
} else if (getKpiUserPlanned.kpiPlan.strategyChild2Id != null) {
|
||||||
|
strategyName = getKpiUserPlanned.kpiPlan.strategyChild2;
|
||||||
|
} else if (getKpiUserPlanned.kpiPlan.strategyChild1Id != null) {
|
||||||
|
strategyName = getKpiUserPlanned.kpiPlan.strategyChild1;
|
||||||
|
}
|
||||||
const mapGetKpiUserPlanned = {
|
const mapGetKpiUserPlanned = {
|
||||||
id: getKpiUserPlanned.id,
|
id: getKpiUserPlanned.id,
|
||||||
evaluationId: getKpiUserPlanned.kpiUserEvaluation.id,
|
evaluationId: getKpiUserPlanned.kpiUserEvaluation.id,
|
||||||
kpiPlanId: getKpiUserPlanned.kpiPlan.id,
|
kpiPlanId: getKpiUserPlanned.kpiPlan.id,
|
||||||
including: getKpiUserPlanned.kpiPlan.including, //รหัสตัวชี้วัด
|
including: getKpiUserPlanned.kpiPlan.including, //รหัสตัวชี้วัด
|
||||||
includingName: getKpiUserPlanned.kpiPlan.includingName, //ชื่อตัวชี้วัด
|
includingName: getKpiUserPlanned.kpiPlan.includingName, //ชื่อตัวชี้วัด
|
||||||
|
nodeName: nodeName,
|
||||||
|
strategyName: strategyName,
|
||||||
target: getKpiUserPlanned.target,
|
target: getKpiUserPlanned.target,
|
||||||
weight: getKpiUserPlanned.weight,
|
weight: getKpiUserPlanned.weight,
|
||||||
unit: getKpiUserPlanned.unit,
|
unit: getKpiUserPlanned.unit,
|
||||||
|
|
@ -254,21 +280,21 @@ export class KpiUserPlannedController extends Controller {
|
||||||
point: item.point,
|
point: item.point,
|
||||||
achievement:
|
achievement:
|
||||||
item.point === 1
|
item.point === 1
|
||||||
? item.kpiPlan.achievement1
|
? item.achievement1
|
||||||
: item.point === 2
|
: item.point === 2
|
||||||
? item.kpiPlan.achievement2
|
? item.achievement2
|
||||||
: item.point === 3
|
: item.point === 3
|
||||||
? item.kpiPlan.achievement3
|
? item.achievement3
|
||||||
: item.point === 4
|
: item.point === 4
|
||||||
? item.kpiPlan.achievement4
|
? item.achievement4
|
||||||
: item.point === 5
|
: item.point === 5
|
||||||
? item.kpiPlan.achievement5
|
? item.achievement5
|
||||||
: null,
|
: null,
|
||||||
achievement1: item.kpiPlan.achievement1,
|
achievement1: item.achievement1,
|
||||||
achievement2: item.kpiPlan.achievement2,
|
achievement2: item.achievement2,
|
||||||
achievement3: item.kpiPlan.achievement3,
|
achievement3: item.achievement3,
|
||||||
achievement4: item.kpiPlan.achievement4,
|
achievement4: item.achievement4,
|
||||||
achievement5: item.kpiPlan.achievement5,
|
achievement5: item.achievement5,
|
||||||
}));
|
}));
|
||||||
return new HttpSuccess(mapKpiUserPlanned);
|
return new HttpSuccess(mapKpiUserPlanned);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -202,12 +202,25 @@ export class KpiUserRoleController extends Controller {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลงานตามหน้าที่ความรับผิดชอบหลักนี้");
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลงานตามหน้าที่ความรับผิดชอบหลักนี้");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let nodeName = null;
|
||||||
|
if (getKpiUserRole.kpiRole.child4Id != null) {
|
||||||
|
nodeName = getKpiUserRole.kpiRole.child4;
|
||||||
|
} else if (getKpiUserRole.kpiRole.child3Id != null) {
|
||||||
|
nodeName = getKpiUserRole.kpiRole.child3;
|
||||||
|
} else if (getKpiUserRole.kpiRole.child2Id != null) {
|
||||||
|
nodeName = getKpiUserRole.kpiRole.child2;
|
||||||
|
} else if (getKpiUserRole.kpiRole.child1Id != null) {
|
||||||
|
nodeName = getKpiUserRole.kpiRole.child1;
|
||||||
|
} else if (getKpiUserRole.kpiRole.rootId != null) {
|
||||||
|
nodeName = getKpiUserRole.kpiRole.root;
|
||||||
|
}
|
||||||
const mapKpiUserRole = {
|
const mapKpiUserRole = {
|
||||||
id: getKpiUserRole.id,
|
id: getKpiUserRole.id,
|
||||||
evaluationId: getKpiUserRole.kpiUserEvaluation.id,
|
evaluationId: getKpiUserRole.kpiUserEvaluation.id,
|
||||||
kpiRoleId: getKpiUserRole.kpiRole.id,
|
kpiRoleId: getKpiUserRole.kpiRole.id,
|
||||||
including: getKpiUserRole.kpiRole.including,
|
including: getKpiUserRole.kpiRole.including,
|
||||||
includingName: getKpiUserRole.kpiRole.includingName,
|
includingName: getKpiUserRole.kpiRole.includingName,
|
||||||
|
nodeName: nodeName,
|
||||||
target: getKpiUserRole.target,
|
target: getKpiUserRole.target,
|
||||||
weight: getKpiUserRole.weight,
|
weight: getKpiUserRole.weight,
|
||||||
unit: getKpiUserRole.unit,
|
unit: getKpiUserRole.unit,
|
||||||
|
|
@ -259,21 +272,21 @@ export class KpiUserRoleController extends Controller {
|
||||||
point: item.point,
|
point: item.point,
|
||||||
achievement:
|
achievement:
|
||||||
item.point === 1
|
item.point === 1
|
||||||
? item.kpiRole.achievement1
|
? item.achievement1
|
||||||
: item.point === 2
|
: item.point === 2
|
||||||
? item.kpiRole.achievement2
|
? item.achievement2
|
||||||
: item.point === 3
|
: item.point === 3
|
||||||
? item.kpiRole.achievement3
|
? item.achievement3
|
||||||
: item.point === 4
|
: item.point === 4
|
||||||
? item.kpiRole.achievement4
|
? item.achievement4
|
||||||
: item.point === 5
|
: item.point === 5
|
||||||
? item.kpiRole.achievement5
|
? item.achievement5
|
||||||
: null,
|
: null,
|
||||||
achievement1: item.kpiRole.achievement1,
|
achievement1: item.achievement1,
|
||||||
achievement2: item.kpiRole.achievement2,
|
achievement2: item.achievement2,
|
||||||
achievement3: item.kpiRole.achievement3,
|
achievement3: item.achievement3,
|
||||||
achievement4: item.kpiRole.achievement4,
|
achievement4: item.achievement4,
|
||||||
achievement5: item.kpiRole.achievement5,
|
achievement5: item.achievement5,
|
||||||
}));
|
}));
|
||||||
return new HttpSuccess(mapKpiUserRole);
|
return new HttpSuccess(mapKpiUserRole);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -788,10 +788,10 @@ export class ReportController extends Controller {
|
||||||
? Extension.ToThaiNumber(Extension.ToThaiYear(x.kpiPeriod.year).toString())
|
? Extension.ToThaiNumber(Extension.ToThaiYear(x.kpiPeriod.year).toString())
|
||||||
: null;
|
: null;
|
||||||
} else {
|
} else {
|
||||||
acc.summaryPointAPR1 = "-"
|
acc.summaryPointAPR1 = "-";
|
||||||
acc.textPointAPR1 = "-"
|
acc.textPointAPR1 = "-";
|
||||||
acc.periodAPR1 = "-"
|
acc.periodAPR1 = "-";
|
||||||
acc.yearAPR1 = "-"
|
acc.yearAPR1 = "-";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x.kpiPeriod.year === yearNow - 4 && x.kpiPeriod.durationKPI === "OCT") {
|
if (x.kpiPeriod.year === yearNow - 4 && x.kpiPeriod.durationKPI === "OCT") {
|
||||||
|
|
@ -804,10 +804,10 @@ export class ReportController extends Controller {
|
||||||
? Extension.ToThaiNumber(Extension.ToThaiYear(x.kpiPeriod.year).toString())
|
? Extension.ToThaiNumber(Extension.ToThaiYear(x.kpiPeriod.year).toString())
|
||||||
: null;
|
: null;
|
||||||
} else {
|
} else {
|
||||||
acc.summaryPointOCT1 = "-"
|
acc.summaryPointOCT1 = "-";
|
||||||
acc.textPointOCT1 = "-"
|
acc.textPointOCT1 = "-";
|
||||||
acc.periodOCT1 = "-"
|
acc.periodOCT1 = "-";
|
||||||
acc.yearOCT1 = "-"
|
acc.yearOCT1 = "-";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x.kpiPeriod.year === yearNow - 3 && x.kpiPeriod.durationKPI === "APR") {
|
if (x.kpiPeriod.year === yearNow - 3 && x.kpiPeriod.durationKPI === "APR") {
|
||||||
|
|
@ -820,10 +820,10 @@ export class ReportController extends Controller {
|
||||||
? Extension.ToThaiNumber(Extension.ToThaiYear(x.kpiPeriod.year).toString())
|
? Extension.ToThaiNumber(Extension.ToThaiYear(x.kpiPeriod.year).toString())
|
||||||
: null;
|
: null;
|
||||||
} else {
|
} else {
|
||||||
acc.summaryPointAPR2 = "-"
|
acc.summaryPointAPR2 = "-";
|
||||||
acc.textPointAPR2 = "-"
|
acc.textPointAPR2 = "-";
|
||||||
acc.periodAPR2 = "-"
|
acc.periodAPR2 = "-";
|
||||||
acc.yearAPR2 = "-"
|
acc.yearAPR2 = "-";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x.kpiPeriod.year === yearNow - 3 && x.kpiPeriod.durationKPI === "OCT") {
|
if (x.kpiPeriod.year === yearNow - 3 && x.kpiPeriod.durationKPI === "OCT") {
|
||||||
|
|
@ -836,10 +836,10 @@ export class ReportController extends Controller {
|
||||||
? Extension.ToThaiNumber(Extension.ToThaiYear(x.kpiPeriod.year).toString())
|
? Extension.ToThaiNumber(Extension.ToThaiYear(x.kpiPeriod.year).toString())
|
||||||
: null;
|
: null;
|
||||||
} else {
|
} else {
|
||||||
acc.summaryPointOCT2 = "-"
|
acc.summaryPointOCT2 = "-";
|
||||||
acc.textPointOCT2 = "-"
|
acc.textPointOCT2 = "-";
|
||||||
acc.periodOCT2 = "-"
|
acc.periodOCT2 = "-";
|
||||||
acc.yearOCT2 = "-"
|
acc.yearOCT2 = "-";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x.kpiPeriod.year === yearNow - 2 && x.kpiPeriod.durationKPI === "APR") {
|
if (x.kpiPeriod.year === yearNow - 2 && x.kpiPeriod.durationKPI === "APR") {
|
||||||
|
|
@ -852,10 +852,10 @@ export class ReportController extends Controller {
|
||||||
? Extension.ToThaiNumber(Extension.ToThaiYear(x.kpiPeriod.year).toString())
|
? Extension.ToThaiNumber(Extension.ToThaiYear(x.kpiPeriod.year).toString())
|
||||||
: null;
|
: null;
|
||||||
} else {
|
} else {
|
||||||
acc.summaryPointAPR3 = "-"
|
acc.summaryPointAPR3 = "-";
|
||||||
acc.textPointAPR3 = "-"
|
acc.textPointAPR3 = "-";
|
||||||
acc.periodAPR3 = "-"
|
acc.periodAPR3 = "-";
|
||||||
acc.yearAPR3 = "-"
|
acc.yearAPR3 = "-";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x.kpiPeriod.year === yearNow - 2 && x.kpiPeriod.durationKPI === "OCT") {
|
if (x.kpiPeriod.year === yearNow - 2 && x.kpiPeriod.durationKPI === "OCT") {
|
||||||
|
|
@ -868,10 +868,10 @@ export class ReportController extends Controller {
|
||||||
? Extension.ToThaiNumber(Extension.ToThaiYear(x.kpiPeriod.year).toString())
|
? Extension.ToThaiNumber(Extension.ToThaiYear(x.kpiPeriod.year).toString())
|
||||||
: null;
|
: null;
|
||||||
} else {
|
} else {
|
||||||
acc.summaryPointOCT3 = "-"
|
acc.summaryPointOCT3 = "-";
|
||||||
acc.textPointOCT3 = "-"
|
acc.textPointOCT3 = "-";
|
||||||
acc.periodOCT3 = "-"
|
acc.periodOCT3 = "-";
|
||||||
acc.yearOCT3 = "-"
|
acc.yearOCT3 = "-";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x.kpiPeriod.year === yearNow - 1 && x.kpiPeriod.durationKPI === "APR") {
|
if (x.kpiPeriod.year === yearNow - 1 && x.kpiPeriod.durationKPI === "APR") {
|
||||||
|
|
@ -884,10 +884,10 @@ export class ReportController extends Controller {
|
||||||
? Extension.ToThaiNumber(Extension.ToThaiYear(x.kpiPeriod.year).toString())
|
? Extension.ToThaiNumber(Extension.ToThaiYear(x.kpiPeriod.year).toString())
|
||||||
: null;
|
: null;
|
||||||
} else {
|
} else {
|
||||||
acc.summaryPointAPR4 = "-"
|
acc.summaryPointAPR4 = "-";
|
||||||
acc.textPointAPR4 = "-"
|
acc.textPointAPR4 = "-";
|
||||||
acc.periodAPR4 = "-"
|
acc.periodAPR4 = "-";
|
||||||
acc.yearAPR4 = "-"
|
acc.yearAPR4 = "-";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x.kpiPeriod.year === yearNow - 1 && x.kpiPeriod.durationKPI === "OCT") {
|
if (x.kpiPeriod.year === yearNow - 1 && x.kpiPeriod.durationKPI === "OCT") {
|
||||||
|
|
@ -900,10 +900,10 @@ export class ReportController extends Controller {
|
||||||
? Extension.ToThaiNumber(Extension.ToThaiYear(x.kpiPeriod.year).toString())
|
? Extension.ToThaiNumber(Extension.ToThaiYear(x.kpiPeriod.year).toString())
|
||||||
: null;
|
: null;
|
||||||
} else {
|
} else {
|
||||||
acc.summaryPointOCT4 = "-"
|
acc.summaryPointOCT4 = "-";
|
||||||
acc.textPointOCT4 = "-"
|
acc.textPointOCT4 = "-";
|
||||||
acc.periodOCT4 = "-"
|
acc.periodOCT4 = "-";
|
||||||
acc.yearOCT4 = "-"
|
acc.yearOCT4 = "-";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x.kpiPeriod.year === yearNow && x.kpiPeriod.durationKPI === "APR") {
|
if (x.kpiPeriod.year === yearNow && x.kpiPeriod.durationKPI === "APR") {
|
||||||
|
|
@ -916,10 +916,10 @@ export class ReportController extends Controller {
|
||||||
? Extension.ToThaiNumber(Extension.ToThaiYear(x.kpiPeriod.year).toString())
|
? Extension.ToThaiNumber(Extension.ToThaiYear(x.kpiPeriod.year).toString())
|
||||||
: null;
|
: null;
|
||||||
} else {
|
} else {
|
||||||
acc.summaryPointAPR5 = "-"
|
acc.summaryPointAPR5 = "-";
|
||||||
acc.textPointAPR5 = "-"
|
acc.textPointAPR5 = "-";
|
||||||
acc.periodAPR5 = "-"
|
acc.periodAPR5 = "-";
|
||||||
acc.yearAPR5 = "-"
|
acc.yearAPR5 = "-";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x.kpiPeriod.year === yearNow && x.kpiPeriod.durationKPI === "OCT") {
|
if (x.kpiPeriod.year === yearNow && x.kpiPeriod.durationKPI === "OCT") {
|
||||||
|
|
@ -932,10 +932,10 @@ export class ReportController extends Controller {
|
||||||
? Extension.ToThaiNumber(Extension.ToThaiYear(x.kpiPeriod.year).toString())
|
? Extension.ToThaiNumber(Extension.ToThaiYear(x.kpiPeriod.year).toString())
|
||||||
: null;
|
: null;
|
||||||
} else {
|
} else {
|
||||||
acc.summaryPointOCT5 = "-"
|
acc.summaryPointOCT5 = "-";
|
||||||
acc.textPointOCT5 = "-"
|
acc.textPointOCT5 = "-";
|
||||||
acc.periodOCT5 = "-"
|
acc.periodOCT5 = "-";
|
||||||
acc.yearOCT5 = "-"
|
acc.yearOCT5 = "-";
|
||||||
}
|
}
|
||||||
|
|
||||||
return acc;
|
return acc;
|
||||||
|
|
@ -1143,10 +1143,10 @@ export class ReportController extends Controller {
|
||||||
? Extension.ToThaiNumber(Extension.ToThaiYear(x.kpiPeriod.year).toString())
|
? Extension.ToThaiNumber(Extension.ToThaiYear(x.kpiPeriod.year).toString())
|
||||||
: null;
|
: null;
|
||||||
} else {
|
} else {
|
||||||
acc.summaryPointAPR1 = "-"
|
acc.summaryPointAPR1 = "-";
|
||||||
acc.textPointAPR1 = "-"
|
acc.textPointAPR1 = "-";
|
||||||
acc.periodAPR1 = "-"
|
acc.periodAPR1 = "-";
|
||||||
acc.yearAPR1 = "-"
|
acc.yearAPR1 = "-";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x.kpiPeriod.year === yearNow - 2 && x.kpiPeriod.durationKPI === "OCT") {
|
if (x.kpiPeriod.year === yearNow - 2 && x.kpiPeriod.durationKPI === "OCT") {
|
||||||
|
|
@ -1159,10 +1159,10 @@ export class ReportController extends Controller {
|
||||||
? Extension.ToThaiNumber(Extension.ToThaiYear(x.kpiPeriod.year).toString())
|
? Extension.ToThaiNumber(Extension.ToThaiYear(x.kpiPeriod.year).toString())
|
||||||
: null;
|
: null;
|
||||||
} else {
|
} else {
|
||||||
acc.summaryPointOCT1 = "-"
|
acc.summaryPointOCT1 = "-";
|
||||||
acc.textPointOCT1 = "-"
|
acc.textPointOCT1 = "-";
|
||||||
acc.periodOCT1 = "-"
|
acc.periodOCT1 = "-";
|
||||||
acc.yearOCT1 = "-"
|
acc.yearOCT1 = "-";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x.kpiPeriod.year === yearNow - 1 && x.kpiPeriod.durationKPI === "APR") {
|
if (x.kpiPeriod.year === yearNow - 1 && x.kpiPeriod.durationKPI === "APR") {
|
||||||
|
|
@ -1175,10 +1175,10 @@ export class ReportController extends Controller {
|
||||||
? Extension.ToThaiNumber(Extension.ToThaiYear(x.kpiPeriod.year).toString())
|
? Extension.ToThaiNumber(Extension.ToThaiYear(x.kpiPeriod.year).toString())
|
||||||
: null;
|
: null;
|
||||||
} else {
|
} else {
|
||||||
acc.summaryPointAPR2 = "-"
|
acc.summaryPointAPR2 = "-";
|
||||||
acc.textPointAPR2 = "-"
|
acc.textPointAPR2 = "-";
|
||||||
acc.periodAPR2 = "-"
|
acc.periodAPR2 = "-";
|
||||||
acc.yearAPR2 = "-"
|
acc.yearAPR2 = "-";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x.kpiPeriod.year === yearNow - 1 && x.kpiPeriod.durationKPI === "OCT") {
|
if (x.kpiPeriod.year === yearNow - 1 && x.kpiPeriod.durationKPI === "OCT") {
|
||||||
|
|
@ -1191,10 +1191,10 @@ export class ReportController extends Controller {
|
||||||
? Extension.ToThaiNumber(Extension.ToThaiYear(x.kpiPeriod.year).toString())
|
? Extension.ToThaiNumber(Extension.ToThaiYear(x.kpiPeriod.year).toString())
|
||||||
: null;
|
: null;
|
||||||
} else {
|
} else {
|
||||||
acc.summaryPointOCT2 = "-"
|
acc.summaryPointOCT2 = "-";
|
||||||
acc.textPointOCT2 = "-"
|
acc.textPointOCT2 = "-";
|
||||||
acc.periodOCT2 = "-"
|
acc.periodOCT2 = "-";
|
||||||
acc.yearOCT2 = "-"
|
acc.yearOCT2 = "-";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x.kpiPeriod.year === yearNow && x.kpiPeriod.durationKPI === "APR") {
|
if (x.kpiPeriod.year === yearNow && x.kpiPeriod.durationKPI === "APR") {
|
||||||
|
|
@ -1207,10 +1207,10 @@ export class ReportController extends Controller {
|
||||||
? Extension.ToThaiNumber(Extension.ToThaiYear(x.kpiPeriod.year).toString())
|
? Extension.ToThaiNumber(Extension.ToThaiYear(x.kpiPeriod.year).toString())
|
||||||
: null;
|
: null;
|
||||||
} else {
|
} else {
|
||||||
acc.summaryPointAPR3 = "-"
|
acc.summaryPointAPR3 = "-";
|
||||||
acc.textPointAPR3 = "-"
|
acc.textPointAPR3 = "-";
|
||||||
acc.periodAPR3 = "-"
|
acc.periodAPR3 = "-";
|
||||||
acc.yearAPR3 = "-"
|
acc.yearAPR3 = "-";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x.kpiPeriod.year === yearNow && x.kpiPeriod.durationKPI === "OCT") {
|
if (x.kpiPeriod.year === yearNow && x.kpiPeriod.durationKPI === "OCT") {
|
||||||
|
|
@ -1223,10 +1223,10 @@ export class ReportController extends Controller {
|
||||||
? Extension.ToThaiNumber(Extension.ToThaiYear(x.kpiPeriod.year).toString())
|
? Extension.ToThaiNumber(Extension.ToThaiYear(x.kpiPeriod.year).toString())
|
||||||
: null;
|
: null;
|
||||||
} else {
|
} else {
|
||||||
acc.summaryPointOCT3 = "-"
|
acc.summaryPointOCT3 = "-";
|
||||||
acc.textPointOCT3 = "-"
|
acc.textPointOCT3 = "-";
|
||||||
acc.periodOCT3 = "-"
|
acc.periodOCT3 = "-";
|
||||||
acc.yearOCT3 = "-"
|
acc.yearOCT3 = "-";
|
||||||
}
|
}
|
||||||
|
|
||||||
return acc;
|
return acc;
|
||||||
|
|
@ -1639,12 +1639,37 @@ export class ReportController extends Controller {
|
||||||
(kpiUserEvaluation.firstNameEvaluator == null ? "" : kpiUserEvaluation.firstNameEvaluator) +
|
(kpiUserEvaluation.firstNameEvaluator == null ? "" : kpiUserEvaluation.firstNameEvaluator) +
|
||||||
" " +
|
" " +
|
||||||
(kpiUserEvaluation.lastNameEvaluator == null ? "" : kpiUserEvaluation.lastNameEvaluator),
|
(kpiUserEvaluation.lastNameEvaluator == null ? "" : kpiUserEvaluation.lastNameEvaluator),
|
||||||
|
|
||||||
|
fullnameCommander:
|
||||||
|
(kpiUserEvaluation.prefixCommander == null ? "" : kpiUserEvaluation.prefixCommander) +
|
||||||
|
"" +
|
||||||
|
(kpiUserEvaluation.firstNameCommander == null ? "" : kpiUserEvaluation.firstNameCommander) +
|
||||||
|
" " +
|
||||||
|
(kpiUserEvaluation.lastNameCommander == null ? "" : kpiUserEvaluation.lastNameCommander),
|
||||||
|
|
||||||
|
fullnameCommanderHigh:
|
||||||
|
(kpiUserEvaluation.prefixCommanderHigh == null
|
||||||
|
? ""
|
||||||
|
: kpiUserEvaluation.prefixCommanderHigh) +
|
||||||
|
"" +
|
||||||
|
(kpiUserEvaluation.firstNameCommanderHigh == null
|
||||||
|
? ""
|
||||||
|
: kpiUserEvaluation.firstNameCommanderHigh) +
|
||||||
|
" " +
|
||||||
|
(kpiUserEvaluation.lastNameCommanderHigh == null
|
||||||
|
? ""
|
||||||
|
: kpiUserEvaluation.lastNameCommanderHigh),
|
||||||
positionEvaluator: kpiUserEvaluation.positionEvaluator,
|
positionEvaluator: kpiUserEvaluation.positionEvaluator,
|
||||||
|
positionCommander: kpiUserEvaluation.positionCommander,
|
||||||
|
positionCommanderHigh: kpiUserEvaluation.positionCommanderHigh,
|
||||||
posTypeNameEvaluator: kpiUserEvaluation.posTypeNameEvaluator,
|
posTypeNameEvaluator: kpiUserEvaluation.posTypeNameEvaluator,
|
||||||
posLevelNameEvaluator: kpiUserEvaluation.posLevelNameEvaluator,
|
posLevelNameEvaluator: kpiUserEvaluation.posLevelNameEvaluator,
|
||||||
orgEvaluator: kpiUserEvaluation.orgEvaluator,
|
orgEvaluator: kpiUserEvaluation.orgEvaluator,
|
||||||
|
|
||||||
year: Extension.ToThaiNumber(String(Extension.ToThaiYear(kpiUserEvaluation.kpiPeriod.year))),
|
year: Extension.ToThaiNumber(String(Extension.ToThaiYear(kpiUserEvaluation.kpiPeriod.year))),
|
||||||
|
yearOld: Extension.ToThaiNumber(
|
||||||
|
String(Extension.ToThaiYear(kpiUserEvaluation.kpiPeriod.year + 1)),
|
||||||
|
),
|
||||||
|
|
||||||
startDateApr:
|
startDateApr:
|
||||||
kpiUserEvaluation.kpiPeriod == null ||
|
kpiUserEvaluation.kpiPeriod == null ||
|
||||||
|
|
|
||||||
|
|
@ -200,6 +200,70 @@ export class KpiUserEvaluation extends EntityBase {
|
||||||
})
|
})
|
||||||
orgEvaluator: string;
|
orgEvaluator: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "คำนำหน้าผู้บังคับบัญชาเหนือขึ้นไป",
|
||||||
|
length: 255,
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
prefixCommander: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "ชื่อผู้บังคับบัญชาเหนือขึ้นไป",
|
||||||
|
length: 255,
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
firstNameCommander: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "สกุลผู้บังคับบัญชาเหนือขึ้นไป",
|
||||||
|
length: 255,
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
lastNameCommander: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "ตำแหน่งผู้บังคับบัญชาเหนือขึ้นไป",
|
||||||
|
length: 255,
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
positionCommander: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "คำนำหน้าผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง",
|
||||||
|
length: 255,
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
prefixCommanderHigh: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "ชื่อผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง",
|
||||||
|
length: 255,
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
firstNameCommanderHigh: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "สกุลผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง",
|
||||||
|
length: 255,
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
lastNameCommanderHigh: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "ตำแหน่งผู้บังคับบัญชาเหนือขึ้นไปอีกชั้นหนึ่ง",
|
||||||
|
length: 255,
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
positionCommanderHigh: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
length: 40,
|
length: 40,
|
||||||
|
|
@ -417,6 +481,13 @@ export class KpiUserEvaluation extends EntityBase {
|
||||||
})
|
})
|
||||||
isOpen: boolean;
|
isOpen: boolean;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "สถานะทดลองงาน",
|
||||||
|
default: false,
|
||||||
|
})
|
||||||
|
isProbation: boolean;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
type: "datetime",
|
type: "datetime",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue