คำสั่งวินัย
This commit is contained in:
parent
40f45b01e6
commit
d6f0f583c3
2 changed files with 241 additions and 115 deletions
|
|
@ -77,7 +77,6 @@ export class kpiReasonController extends Controller {
|
||||||
where: { id: id },
|
where: { id: id },
|
||||||
relations: ["kpiUserEvaluation"],
|
relations: ["kpiUserEvaluation"],
|
||||||
});
|
});
|
||||||
|
|
||||||
let kpiUserEvaluationReason = Object.assign(new KpiUserEvaluationReasonPlan(), requestBody);
|
let kpiUserEvaluationReason = Object.assign(new KpiUserEvaluationReasonPlan(), requestBody);
|
||||||
kpiUserEvaluationReason.type = type.trim().toUpperCase();
|
kpiUserEvaluationReason.type = type.trim().toUpperCase();
|
||||||
if (type.trim().toUpperCase() == "PROBLEM") {
|
if (type.trim().toUpperCase() == "PROBLEM") {
|
||||||
|
|
@ -204,10 +203,39 @@ export class kpiReasonController extends Controller {
|
||||||
@Get("{type}/plan/{user}/{id}")
|
@Get("{type}/plan/{user}/{id}")
|
||||||
async listKpiUserPlanReason(@Path() id: string, @Path() type: string, @Path() user: string) {
|
async listKpiUserPlanReason(@Path() id: string, @Path() type: string, @Path() user: string) {
|
||||||
if (type.trim().toUpperCase() == "PROBLEM") {
|
if (type.trim().toUpperCase() == "PROBLEM") {
|
||||||
const kpiUserEvaluationReason = await this.kpiUserEvaluationReasonPlan.find({
|
if (user.trim().toUpperCase() == "USER") {
|
||||||
where: { kpiUserPlannedId: id, type: type.trim().toUpperCase() },
|
const kpiUserEvaluationReason = await this.kpiUserEvaluationReasonPlan.find({
|
||||||
});
|
where: { kpiUserPlannedId: id, type: type.trim().toUpperCase() },
|
||||||
return new HttpSuccess(kpiUserEvaluationReason);
|
});
|
||||||
|
return new HttpSuccess(kpiUserEvaluationReason);
|
||||||
|
} else if (user.trim().toUpperCase() == "EVALUATOR") {
|
||||||
|
const kpiUserEvaluationReason = await this.kpiUserEvaluationReasonPlan.find({
|
||||||
|
where: {
|
||||||
|
kpiUserPlannedId: id,
|
||||||
|
type: type.trim().toUpperCase(),
|
||||||
|
status: In(["EVALUATOR", "COMMANDER", "COMMANDERHIGH", "DONE"]),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return new HttpSuccess(kpiUserEvaluationReason);
|
||||||
|
} else if (user.trim().toUpperCase() == "COMMANDER") {
|
||||||
|
const kpiUserEvaluationReason = await this.kpiUserEvaluationReasonPlan.find({
|
||||||
|
where: {
|
||||||
|
kpiUserPlannedId: id,
|
||||||
|
type: type.trim().toUpperCase(),
|
||||||
|
status: In(["COMMANDER", "COMMANDERHIGH", "DONE"]),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return new HttpSuccess(kpiUserEvaluationReason);
|
||||||
|
} else if (user.trim().toUpperCase() == "COMMANDERHIGH") {
|
||||||
|
const kpiUserEvaluationReason = await this.kpiUserEvaluationReasonPlan.find({
|
||||||
|
where: {
|
||||||
|
kpiUserPlannedId: id,
|
||||||
|
type: type.trim().toUpperCase(),
|
||||||
|
status: In(["COMMANDERHIGH", "DONE"]),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return new HttpSuccess(kpiUserEvaluationReason);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (user.trim().toUpperCase() == "USER") {
|
if (user.trim().toUpperCase() == "USER") {
|
||||||
const kpiUserEvaluationReason = await this.kpiUserEvaluationReasonPlan.find({
|
const kpiUserEvaluationReason = await this.kpiUserEvaluationReasonPlan.find({
|
||||||
|
|
@ -392,10 +420,39 @@ export class kpiReasonController extends Controller {
|
||||||
@Get("{type}/role/{user}/{id}")
|
@Get("{type}/role/{user}/{id}")
|
||||||
async listKpiUserRoleReason(@Path() id: string, @Path() type: string, @Path() user: string) {
|
async listKpiUserRoleReason(@Path() id: string, @Path() type: string, @Path() user: string) {
|
||||||
if (type.trim().toUpperCase() == "PROBLEM") {
|
if (type.trim().toUpperCase() == "PROBLEM") {
|
||||||
const kpiUserEvaluationReason = await this.kpiUserEvaluationReasonRole.find({
|
if (user.trim().toUpperCase() == "USER") {
|
||||||
where: { kpiUserRoleId: id, type: type.trim().toUpperCase() },
|
const kpiUserEvaluationReason = await this.kpiUserEvaluationReasonRole.find({
|
||||||
});
|
where: { kpiUserRoleId: id, type: type.trim().toUpperCase() },
|
||||||
return new HttpSuccess(kpiUserEvaluationReason);
|
});
|
||||||
|
return new HttpSuccess(kpiUserEvaluationReason);
|
||||||
|
} else if (user.trim().toUpperCase() == "EVALUATOR") {
|
||||||
|
const kpiUserEvaluationReason = await this.kpiUserEvaluationReasonRole.find({
|
||||||
|
where: {
|
||||||
|
kpiUserRoleId: id,
|
||||||
|
type: type.trim().toUpperCase(),
|
||||||
|
status: In(["EVALUATOR", "COMMANDER", "COMMANDERHIGH", "DONE"]),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return new HttpSuccess(kpiUserEvaluationReason);
|
||||||
|
} else if (user.trim().toUpperCase() == "COMMANDER") {
|
||||||
|
const kpiUserEvaluationReason = await this.kpiUserEvaluationReasonRole.find({
|
||||||
|
where: {
|
||||||
|
kpiUserRoleId: id,
|
||||||
|
type: type.trim().toUpperCase(),
|
||||||
|
status: In(["COMMANDER", "COMMANDERHIGH", "DONE"]),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return new HttpSuccess(kpiUserEvaluationReason);
|
||||||
|
} else if (user.trim().toUpperCase() == "COMMANDERHIGH") {
|
||||||
|
const kpiUserEvaluationReason = await this.kpiUserEvaluationReasonRole.find({
|
||||||
|
where: {
|
||||||
|
kpiUserRoleId: id,
|
||||||
|
type: type.trim().toUpperCase(),
|
||||||
|
status: In(["COMMANDERHIGH", "DONE"]),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return new HttpSuccess(kpiUserEvaluationReason);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (user.trim().toUpperCase() == "USER") {
|
if (user.trim().toUpperCase() == "USER") {
|
||||||
const kpiUserEvaluationReason = await this.kpiUserEvaluationReasonRole.find({
|
const kpiUserEvaluationReason = await this.kpiUserEvaluationReasonRole.find({
|
||||||
|
|
@ -582,10 +639,39 @@ export class kpiReasonController extends Controller {
|
||||||
@Get("{type}/special/{user}/{id}")
|
@Get("{type}/special/{user}/{id}")
|
||||||
async listKpiUserSpecialReason(@Path() id: string, @Path() type: string, @Path() user: string) {
|
async listKpiUserSpecialReason(@Path() id: string, @Path() type: string, @Path() user: string) {
|
||||||
if (type.trim().toUpperCase() == "PROBLEM") {
|
if (type.trim().toUpperCase() == "PROBLEM") {
|
||||||
const kpiUserEvaluationReason = await this.kpiUserEvaluationReasonSpecial.find({
|
if (user.trim().toUpperCase() == "USER") {
|
||||||
where: { kpiUserSpecialId: id, type: type.trim().toUpperCase() },
|
const kpiUserEvaluationReason = await this.kpiUserEvaluationReasonSpecial.find({
|
||||||
});
|
where: { kpiUserSpecialId: id, type: type.trim().toUpperCase() },
|
||||||
return new HttpSuccess(kpiUserEvaluationReason);
|
});
|
||||||
|
return new HttpSuccess(kpiUserEvaluationReason);
|
||||||
|
} else if (user.trim().toUpperCase() == "EVALUATOR") {
|
||||||
|
const kpiUserEvaluationReason = await this.kpiUserEvaluationReasonSpecial.find({
|
||||||
|
where: {
|
||||||
|
kpiUserSpecialId: id,
|
||||||
|
type: type.trim().toUpperCase(),
|
||||||
|
status: In(["EVALUATOR", "COMMANDER", "COMMANDERHIGH", "DONE"]),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return new HttpSuccess(kpiUserEvaluationReason);
|
||||||
|
} else if (user.trim().toUpperCase() == "COMMANDER") {
|
||||||
|
const kpiUserEvaluationReason = await this.kpiUserEvaluationReasonSpecial.find({
|
||||||
|
where: {
|
||||||
|
kpiUserSpecialId: id,
|
||||||
|
type: type.trim().toUpperCase(),
|
||||||
|
status: In(["COMMANDER", "COMMANDERHIGH", "DONE"]),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return new HttpSuccess(kpiUserEvaluationReason);
|
||||||
|
} else if (user.trim().toUpperCase() == "COMMANDERHIGH") {
|
||||||
|
const kpiUserEvaluationReason = await this.kpiUserEvaluationReasonSpecial.find({
|
||||||
|
where: {
|
||||||
|
kpiUserSpecialId: id,
|
||||||
|
type: type.trim().toUpperCase(),
|
||||||
|
status: In(["COMMANDERHIGH", "DONE"]),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return new HttpSuccess(kpiUserEvaluationReason);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (user.trim().toUpperCase() == "USER") {
|
if (user.trim().toUpperCase() == "USER") {
|
||||||
const kpiUserEvaluationReason = await this.kpiUserEvaluationReasonSpecial.find({
|
const kpiUserEvaluationReason = await this.kpiUserEvaluationReasonSpecial.find({
|
||||||
|
|
@ -772,10 +858,39 @@ export class kpiReasonController extends Controller {
|
||||||
@Path() user: string,
|
@Path() user: string,
|
||||||
) {
|
) {
|
||||||
if (type.trim().toUpperCase() == "PROBLEM") {
|
if (type.trim().toUpperCase() == "PROBLEM") {
|
||||||
const kpiUserEvaluationReason = await this.kpiUserEvaluationReasonDevelopment.find({
|
if (user.trim().toUpperCase() == "USER") {
|
||||||
where: { kpiUserDevelopmentId: id, type: type.trim().toUpperCase() },
|
const kpiUserEvaluationReason = await this.kpiUserEvaluationReasonDevelopment.find({
|
||||||
});
|
where: { kpiUserDevelopmentId: id, type: type.trim().toUpperCase() },
|
||||||
return new HttpSuccess(kpiUserEvaluationReason);
|
});
|
||||||
|
return new HttpSuccess(kpiUserEvaluationReason);
|
||||||
|
} else if (user.trim().toUpperCase() == "EVALUATOR") {
|
||||||
|
const kpiUserEvaluationReason = await this.kpiUserEvaluationReasonDevelopment.find({
|
||||||
|
where: {
|
||||||
|
kpiUserDevelopmentId: id,
|
||||||
|
type: type.trim().toUpperCase(),
|
||||||
|
status: In(["EVALUATOR", "COMMANDER", "COMMANDERHIGH", "DONE"]),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return new HttpSuccess(kpiUserEvaluationReason);
|
||||||
|
} else if (user.trim().toUpperCase() == "COMMANDER") {
|
||||||
|
const kpiUserEvaluationReason = await this.kpiUserEvaluationReasonDevelopment.find({
|
||||||
|
where: {
|
||||||
|
kpiUserDevelopmentId: id,
|
||||||
|
type: type.trim().toUpperCase(),
|
||||||
|
status: In(["COMMANDER", "COMMANDERHIGH", "DONE"]),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return new HttpSuccess(kpiUserEvaluationReason);
|
||||||
|
} else if (user.trim().toUpperCase() == "COMMANDERHIGH") {
|
||||||
|
const kpiUserEvaluationReason = await this.kpiUserEvaluationReasonDevelopment.find({
|
||||||
|
where: {
|
||||||
|
kpiUserDevelopmentId: id,
|
||||||
|
type: type.trim().toUpperCase(),
|
||||||
|
status: In(["COMMANDERHIGH", "DONE"]),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return new HttpSuccess(kpiUserEvaluationReason);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (user.trim().toUpperCase() == "USER") {
|
if (user.trim().toUpperCase() == "USER") {
|
||||||
const kpiUserEvaluationReason = await this.kpiUserEvaluationReasonDevelopment.find({
|
const kpiUserEvaluationReason = await this.kpiUserEvaluationReasonDevelopment.find({
|
||||||
|
|
@ -958,10 +1073,39 @@ export class kpiReasonController extends Controller {
|
||||||
@Get("{type}/capacity/{user}/{id}")
|
@Get("{type}/capacity/{user}/{id}")
|
||||||
async listKpiUserCapacityReason(@Path() id: string, @Path() type: string, @Path() user: string) {
|
async listKpiUserCapacityReason(@Path() id: string, @Path() type: string, @Path() user: string) {
|
||||||
if (type.trim().toUpperCase() == "PROBLEM") {
|
if (type.trim().toUpperCase() == "PROBLEM") {
|
||||||
const kpiUserEvaluationReason = await this.kpiUserEvaluationReasonCapacity.find({
|
if (user.trim().toUpperCase() == "USER") {
|
||||||
where: { kpiUserCapacityId: id, type: type.trim().toUpperCase() },
|
const kpiUserEvaluationReason = await this.kpiUserEvaluationReasonCapacity.find({
|
||||||
});
|
where: { kpiUserCapacityId: id, type: type.trim().toUpperCase() },
|
||||||
return new HttpSuccess(kpiUserEvaluationReason);
|
});
|
||||||
|
return new HttpSuccess(kpiUserEvaluationReason);
|
||||||
|
} else if (user.trim().toUpperCase() == "EVALUATOR") {
|
||||||
|
const kpiUserEvaluationReason = await this.kpiUserEvaluationReasonCapacity.find({
|
||||||
|
where: {
|
||||||
|
kpiUserCapacityId: id,
|
||||||
|
type: type.trim().toUpperCase(),
|
||||||
|
status: In(["EVALUATOR", "COMMANDER", "COMMANDERHIGH", "DONE"]),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return new HttpSuccess(kpiUserEvaluationReason);
|
||||||
|
} else if (user.trim().toUpperCase() == "COMMANDER") {
|
||||||
|
const kpiUserEvaluationReason = await this.kpiUserEvaluationReasonCapacity.find({
|
||||||
|
where: {
|
||||||
|
kpiUserCapacityId: id,
|
||||||
|
type: type.trim().toUpperCase(),
|
||||||
|
status: In(["COMMANDER", "COMMANDERHIGH", "DONE"]),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return new HttpSuccess(kpiUserEvaluationReason);
|
||||||
|
} else if (user.trim().toUpperCase() == "COMMANDERHIGH") {
|
||||||
|
const kpiUserEvaluationReason = await this.kpiUserEvaluationReasonCapacity.find({
|
||||||
|
where: {
|
||||||
|
kpiUserCapacityId: id,
|
||||||
|
type: type.trim().toUpperCase(),
|
||||||
|
status: In(["COMMANDERHIGH", "DONE"]),
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return new HttpSuccess(kpiUserEvaluationReason);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (user.trim().toUpperCase() == "USER") {
|
if (user.trim().toUpperCase() == "USER") {
|
||||||
const kpiUserEvaluationReason = await this.kpiUserEvaluationReasonCapacity.find({
|
const kpiUserEvaluationReason = await this.kpiUserEvaluationReasonCapacity.find({
|
||||||
|
|
|
||||||
|
|
@ -132,106 +132,88 @@ export class ReportController extends Controller {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Post("kpi9/{profileId}")
|
@Post("kpi9/{id}")
|
||||||
async GetReportKpi9(@Path() profileId?: string | null) {
|
async GetReportKpi9(@Path() id?: string) {
|
||||||
let formattedData: any;
|
const kpiUserEvaluation = await this.kpiUserEvaluationRepository.findOne({
|
||||||
if (profileId) {
|
relations: ["kpiPeriod"],
|
||||||
const kpiUserEvaluation = await this.kpiUserEvaluationRepository.findOne({
|
where: { id: id },
|
||||||
relations: ["kpiUserRoles", "kpiUserPlanneds", "kpiUserSpecials", "kpiUserCapacitys"],
|
});
|
||||||
where: { profileId: profileId },
|
if (!kpiUserEvaluation) throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลผู้ประเมิน");
|
||||||
});
|
|
||||||
if (!kpiUserEvaluation)
|
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลผู้ประเมิน");
|
|
||||||
|
|
||||||
//period
|
let formattedData = {
|
||||||
const period = await this.kpiPeriodRepository.findOneBy({
|
durationKPI: kpiUserEvaluation.kpiPeriod.durationKPI,
|
||||||
id: kpiUserEvaluation?.kpiPeriodId,
|
fullname:
|
||||||
});
|
(kpiUserEvaluation.prefix == null ? "" : kpiUserEvaluation.prefix) +
|
||||||
if (!period) throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบข้อมูลงวดการประเมิน");
|
"" +
|
||||||
|
(kpiUserEvaluation.firstName == null ? "" : kpiUserEvaluation.firstName) +
|
||||||
|
" " +
|
||||||
|
(kpiUserEvaluation.lastName == null ? "" : kpiUserEvaluation.lastName),
|
||||||
|
position: kpiUserEvaluation.position,
|
||||||
|
posTypeName: kpiUserEvaluation.posTypeName,
|
||||||
|
posLevelName: kpiUserEvaluation.posLevelName,
|
||||||
|
org: kpiUserEvaluation.org,
|
||||||
|
|
||||||
const kpiRole = await this.kpiRoleRepository.find({
|
fullnameEvaluator:
|
||||||
where: { kpiPeriodId: period?.id },
|
(kpiUserEvaluation.prefixEvaluator == null ? "" : kpiUserEvaluation.prefixEvaluator) +
|
||||||
});
|
"" +
|
||||||
|
(kpiUserEvaluation.firstNameEvaluator == null ? "" : kpiUserEvaluation.firstNameEvaluator) +
|
||||||
|
" " +
|
||||||
|
(kpiUserEvaluation.lastNameEvaluator == null ? "" : kpiUserEvaluation.lastNameEvaluator),
|
||||||
|
positionEvaluator: kpiUserEvaluation.positionEvaluator,
|
||||||
|
posTypeNameEvaluator: kpiUserEvaluation.posTypeNameEvaluator,
|
||||||
|
posLevelNameEvaluator: kpiUserEvaluation.posLevelNameEvaluator,
|
||||||
|
orgEvaluator: kpiUserEvaluation.orgEvaluator,
|
||||||
|
|
||||||
const kpiPlan = await this.kpiPlanRepository.find({
|
year: Extension.ToThaiNumber(String(Extension.ToThaiYear(kpiUserEvaluation.kpiPeriod.year))),
|
||||||
where: { kpiPeriodId: period?.id },
|
|
||||||
});
|
|
||||||
|
|
||||||
formattedData = {
|
startDateApr:
|
||||||
fullname:
|
kpiUserEvaluation.kpiPeriod == null ||
|
||||||
kpiUserEvaluation.prefix + kpiUserEvaluation.firstName + " " + kpiUserEvaluation.lastName,
|
kpiUserEvaluation.kpiPeriod.startDate == null ||
|
||||||
position: kpiUserEvaluation.position,
|
kpiUserEvaluation.kpiPeriod.durationKPI != "APR"
|
||||||
posTypeName: kpiUserEvaluation.posTypeName,
|
? "-"
|
||||||
posLevelName: kpiUserEvaluation.posLevelName,
|
: Extension.ToThaiNumber(Extension.ToThaiFullDate(kpiUserEvaluation.kpiPeriod.startDate)),
|
||||||
org: kpiUserEvaluation.org,
|
endDateApr:
|
||||||
|
kpiUserEvaluation.kpiPeriod == null ||
|
||||||
|
kpiUserEvaluation.kpiPeriod.endDate == null ||
|
||||||
|
kpiUserEvaluation.kpiPeriod.durationKPI != "APR"
|
||||||
|
? "-"
|
||||||
|
: Extension.ToThaiNumber(Extension.ToThaiFullDate(kpiUserEvaluation.kpiPeriod.endDate)),
|
||||||
|
startDateOct:
|
||||||
|
kpiUserEvaluation.kpiPeriod == null ||
|
||||||
|
kpiUserEvaluation.kpiPeriod.startDate == null ||
|
||||||
|
kpiUserEvaluation.kpiPeriod.durationKPI != "OCT"
|
||||||
|
? "-"
|
||||||
|
: Extension.ToThaiNumber(Extension.ToThaiFullDate(kpiUserEvaluation.kpiPeriod.startDate)),
|
||||||
|
endDateOct:
|
||||||
|
kpiUserEvaluation.kpiPeriod == null ||
|
||||||
|
kpiUserEvaluation.kpiPeriod.endDate == null ||
|
||||||
|
kpiUserEvaluation.kpiPeriod.durationKPI != "OCT"
|
||||||
|
? "-"
|
||||||
|
: Extension.ToThaiNumber(Extension.ToThaiFullDate(kpiUserEvaluation.kpiPeriod.endDate)),
|
||||||
|
|
||||||
fullnameEvaluator:
|
evaluationResults: kpiUserEvaluation.evaluationResults,
|
||||||
kpiUserEvaluation.prefixEvaluator +
|
totalPoint1: Extension.ToThaiNumber(kpiUserEvaluation.totalPoint1.toLocaleString()),
|
||||||
kpiUserEvaluation.firstNameEvaluator +
|
totalPoint2: Extension.ToThaiNumber(
|
||||||
" " +
|
(kpiUserEvaluation.totalPoint2_2 + kpiUserEvaluation.totalPoint2_1).toLocaleString(),
|
||||||
kpiUserEvaluation.lastNameEvaluator,
|
),
|
||||||
positionEvaluator: kpiUserEvaluation.positionEvaluator,
|
summaryPoint: Extension.ToThaiNumber(kpiUserEvaluation.summaryPoint.toLocaleString()),
|
||||||
posTypeNameEvaluator: kpiUserEvaluation.posTypeNameEvaluator,
|
weightPoint1: Extension.ToThaiNumber(kpiUserEvaluation.weightPoint1.toLocaleString()),
|
||||||
posLevelNameEvaluator: kpiUserEvaluation.posLevelNameEvaluator,
|
weightPoint2: Extension.ToThaiNumber(kpiUserEvaluation.weightPoint2.toLocaleString()),
|
||||||
rootEvaluator: kpiUserEvaluation.orgEvaluator,
|
summaryWeight: Extension.ToThaiNumber(kpiUserEvaluation.summaryWeight.toLocaleString()),
|
||||||
|
|
||||||
year: Extension.ToThaiNumber(
|
topicEvaluator: kpiUserEvaluation.topicEvaluator,
|
||||||
String(Extension.ToThaiYear(kpiUserEvaluation.kpiPeriod.year)),
|
developEvaluator: kpiUserEvaluation.developEvaluator,
|
||||||
),
|
timeEvaluator: kpiUserEvaluation.timeEvaluator,
|
||||||
|
reasonEvaluator: kpiUserEvaluation.reasonEvaluator,
|
||||||
startDateApr:
|
isReasonCommander: kpiUserEvaluation.isReasonCommander,
|
||||||
kpiUserEvaluation.kpiPeriod == null ||
|
reasonCommander: kpiUserEvaluation.reasonCommander,
|
||||||
kpiUserEvaluation.kpiPeriod.startDate == null ||
|
isReasonCommanderHigh: kpiUserEvaluation.isReasonCommanderHigh,
|
||||||
kpiUserEvaluation.kpiPeriod.durationKPI != "APR"
|
reasonCommanderHigh: kpiUserEvaluation.reasonCommanderHigh,
|
||||||
? "-"
|
openDate:
|
||||||
: Extension.ToThaiNumber(
|
kpiUserEvaluation.openDate == null
|
||||||
Extension.ToThaiFullDate(kpiUserEvaluation.kpiPeriod.startDate),
|
? null
|
||||||
),
|
: Extension.ToThaiNumber(Extension.ToThaiFullDate(kpiUserEvaluation.openDate)),
|
||||||
endDateApr:
|
};
|
||||||
kpiUserEvaluation.kpiPeriod == null ||
|
|
||||||
kpiUserEvaluation.kpiPeriod.endDate == null ||
|
|
||||||
kpiUserEvaluation.kpiPeriod.durationKPI != "APR"
|
|
||||||
? "-"
|
|
||||||
: Extension.ToThaiNumber(Extension.ToThaiFullDate(kpiUserEvaluation.kpiPeriod.endDate)),
|
|
||||||
startDateOct:
|
|
||||||
kpiUserEvaluation.kpiPeriod == null ||
|
|
||||||
kpiUserEvaluation.kpiPeriod.startDate == null ||
|
|
||||||
kpiUserEvaluation.kpiPeriod.durationKPI != "OCT"
|
|
||||||
? "-"
|
|
||||||
: Extension.ToThaiNumber(
|
|
||||||
Extension.ToThaiFullDate(kpiUserEvaluation.kpiPeriod.startDate),
|
|
||||||
),
|
|
||||||
endDateOct:
|
|
||||||
kpiUserEvaluation.kpiPeriod == null ||
|
|
||||||
kpiUserEvaluation.kpiPeriod.endDate == null ||
|
|
||||||
kpiUserEvaluation.kpiPeriod.durationKPI != "OCT"
|
|
||||||
? "-"
|
|
||||||
: Extension.ToThaiNumber(Extension.ToThaiFullDate(kpiUserEvaluation.kpiPeriod.endDate)),
|
|
||||||
|
|
||||||
evaluationResults: kpiUserEvaluation.evaluationResults,
|
|
||||||
totalPoint1: Extension.ToThaiNumber(kpiUserEvaluation.totalPoint1.toLocaleString()),
|
|
||||||
totalPoint2: Extension.ToThaiNumber(
|
|
||||||
kpiUserEvaluation.totalPoint2_2 + kpiUserEvaluation.totalPoint2_1.toLocaleString(),
|
|
||||||
),
|
|
||||||
summaryPoint: Extension.ToThaiNumber(kpiUserEvaluation.summaryPoint.toLocaleString()),
|
|
||||||
weightPoint1: Extension.ToThaiNumber(kpiUserEvaluation.weightPoint1.toLocaleString()),
|
|
||||||
weightPoint2: Extension.ToThaiNumber(kpiUserEvaluation.weightPoint2.toLocaleString()),
|
|
||||||
summaryWeight: Extension.ToThaiNumber(kpiUserEvaluation.summaryWeight.toLocaleString()),
|
|
||||||
|
|
||||||
topicEvaluator: kpiUserEvaluation.topicEvaluator,
|
|
||||||
developEvaluator: kpiUserEvaluation.developEvaluator,
|
|
||||||
timeEvaluator: kpiUserEvaluation.timeEvaluator,
|
|
||||||
reasonEvaluator: kpiUserEvaluation.reasonEvaluator,
|
|
||||||
isReasonCommander: kpiUserEvaluation.isReasonCommander,
|
|
||||||
reasonCommander: kpiUserEvaluation.reasonCommander,
|
|
||||||
isReasonCommanderHigh: kpiUserEvaluation.isReasonCommanderHigh,
|
|
||||||
reasonCommanderHigh: kpiUserEvaluation.reasonCommanderHigh,
|
|
||||||
openDate:
|
|
||||||
kpiUserEvaluation.openDate == null
|
|
||||||
? null
|
|
||||||
: Extension.ToThaiNumber(Extension.ToThaiFullDate(kpiUserEvaluation.openDate)),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
return new HttpSuccess({
|
return new HttpSuccess({
|
||||||
template: "KPI9",
|
template: "KPI9",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue