no message
This commit is contained in:
parent
ac9e184ee7
commit
b7aa867f82
12 changed files with 99 additions and 24 deletions
|
|
@ -134,21 +134,21 @@ export class kpiReasonController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (user.trim().toUpperCase() == "EVALUATOR") {
|
if (user.trim().toUpperCase() == "EVALUATOR") {
|
||||||
kpiReason.reasonEvaluator = requestBody.reason;
|
kpiReason.reasonEvaluator = requestBody.reason == null ? "" : requestBody.reason;
|
||||||
kpiReason.status =
|
kpiReason.status =
|
||||||
kpiReason.kpiUserPlanned.kpiUserEvaluation.commanderId == null ||
|
kpiReason.kpiUserPlanned.kpiUserEvaluation.commanderId == null ||
|
||||||
kpiReason.kpiUserPlanned.kpiUserEvaluation.commanderId == ""
|
kpiReason.kpiUserPlanned.kpiUserEvaluation.commanderId == ""
|
||||||
? "DONE"
|
? "DONE"
|
||||||
: "COMMANDER";
|
: "COMMANDER";
|
||||||
} else if (user.trim().toUpperCase() == "COMMANDER") {
|
} else if (user.trim().toUpperCase() == "COMMANDER") {
|
||||||
kpiReason.reasonCommander = requestBody.reason;
|
kpiReason.reasonCommander = requestBody.reason == null ? "" : requestBody.reason;
|
||||||
kpiReason.status =
|
kpiReason.status =
|
||||||
kpiReason.kpiUserPlanned.kpiUserEvaluation.commanderHighId == null ||
|
kpiReason.kpiUserPlanned.kpiUserEvaluation.commanderHighId == null ||
|
||||||
kpiReason.kpiUserPlanned.kpiUserEvaluation.commanderHighId == ""
|
kpiReason.kpiUserPlanned.kpiUserEvaluation.commanderHighId == ""
|
||||||
? "DONE"
|
? "DONE"
|
||||||
: "COMMANDERHIGH";
|
: "COMMANDERHIGH";
|
||||||
} else if (user.trim().toUpperCase() == "COMMANDERHIGH") {
|
} else if (user.trim().toUpperCase() == "COMMANDERHIGH") {
|
||||||
kpiReason.reasonCommanderHigh = requestBody.reason;
|
kpiReason.reasonCommanderHigh = requestBody.reason == null ? "" : requestBody.reason;
|
||||||
kpiReason.status = "DONE";
|
kpiReason.status = "DONE";
|
||||||
}
|
}
|
||||||
kpiReason.lastUpdateUserId = request.user.sub;
|
kpiReason.lastUpdateUserId = request.user.sub;
|
||||||
|
|
@ -187,7 +187,7 @@ export class kpiReasonController extends Controller {
|
||||||
kpiReason.kpiUserPlanned.kpiUserEvaluation.evaluatorId == ""
|
kpiReason.kpiUserPlanned.kpiUserEvaluation.evaluatorId == ""
|
||||||
? "DONE"
|
? "DONE"
|
||||||
: "EVALUATOR";
|
: "EVALUATOR";
|
||||||
kpiReason.reason = requestBody.reason;
|
kpiReason.reason = requestBody.reason == null ? "" : requestBody.reason;
|
||||||
kpiReason.lastUpdateUserId = request.user.sub;
|
kpiReason.lastUpdateUserId = request.user.sub;
|
||||||
kpiReason.lastUpdateFullName = request.user.name;
|
kpiReason.lastUpdateFullName = request.user.name;
|
||||||
await this.kpiUserEvaluationReasonPlan.save(kpiReason);
|
await this.kpiUserEvaluationReasonPlan.save(kpiReason);
|
||||||
|
|
@ -322,21 +322,21 @@ export class kpiReasonController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (user.trim().toUpperCase() == "EVALUATOR") {
|
if (user.trim().toUpperCase() == "EVALUATOR") {
|
||||||
kpiReason.reasonEvaluator = requestBody.reason;
|
kpiReason.reasonEvaluator = requestBody.reason == null ? "" : requestBody.reason;
|
||||||
kpiReason.status =
|
kpiReason.status =
|
||||||
kpiReason.kpiUserRole.kpiUserEvaluation.commanderId == null ||
|
kpiReason.kpiUserRole.kpiUserEvaluation.commanderId == null ||
|
||||||
kpiReason.kpiUserRole.kpiUserEvaluation.commanderId == ""
|
kpiReason.kpiUserRole.kpiUserEvaluation.commanderId == ""
|
||||||
? "DONE"
|
? "DONE"
|
||||||
: "COMMANDER";
|
: "COMMANDER";
|
||||||
} else if (user.trim().toUpperCase() == "COMMANDER") {
|
} else if (user.trim().toUpperCase() == "COMMANDER") {
|
||||||
kpiReason.reasonCommander = requestBody.reason;
|
kpiReason.reasonCommander = requestBody.reason == null ? "" : requestBody.reason;
|
||||||
kpiReason.status =
|
kpiReason.status =
|
||||||
kpiReason.kpiUserRole.kpiUserEvaluation.commanderHighId == null ||
|
kpiReason.kpiUserRole.kpiUserEvaluation.commanderHighId == null ||
|
||||||
kpiReason.kpiUserRole.kpiUserEvaluation.commanderHighId == ""
|
kpiReason.kpiUserRole.kpiUserEvaluation.commanderHighId == ""
|
||||||
? "DONE"
|
? "DONE"
|
||||||
: "COMMANDERHIGH";
|
: "COMMANDERHIGH";
|
||||||
} else if (user.trim().toUpperCase() == "COMMANDERHIGH") {
|
} else if (user.trim().toUpperCase() == "COMMANDERHIGH") {
|
||||||
kpiReason.reasonCommanderHigh = requestBody.reason;
|
kpiReason.reasonCommanderHigh = requestBody.reason == null ? "" : requestBody.reason;
|
||||||
kpiReason.status = "DONE";
|
kpiReason.status = "DONE";
|
||||||
}
|
}
|
||||||
kpiReason.lastUpdateUserId = request.user.sub;
|
kpiReason.lastUpdateUserId = request.user.sub;
|
||||||
|
|
@ -375,7 +375,7 @@ export class kpiReasonController extends Controller {
|
||||||
kpiReason.kpiUserRole.kpiUserEvaluation.evaluatorId == ""
|
kpiReason.kpiUserRole.kpiUserEvaluation.evaluatorId == ""
|
||||||
? "DONE"
|
? "DONE"
|
||||||
: "EVALUATOR";
|
: "EVALUATOR";
|
||||||
kpiReason.reason = requestBody.reason;
|
kpiReason.reason = requestBody.reason == null ? "" : requestBody.reason;
|
||||||
kpiReason.lastUpdateUserId = request.user.sub;
|
kpiReason.lastUpdateUserId = request.user.sub;
|
||||||
kpiReason.lastUpdateFullName = request.user.name;
|
kpiReason.lastUpdateFullName = request.user.name;
|
||||||
await this.kpiUserEvaluationReasonRole.save(kpiReason);
|
await this.kpiUserEvaluationReasonRole.save(kpiReason);
|
||||||
|
|
@ -512,21 +512,21 @@ export class kpiReasonController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (user.trim().toUpperCase() == "EVALUATOR") {
|
if (user.trim().toUpperCase() == "EVALUATOR") {
|
||||||
kpiReason.reasonEvaluator = requestBody.reason;
|
kpiReason.reasonEvaluator = requestBody.reason == null ? "" : requestBody.reason;
|
||||||
kpiReason.status =
|
kpiReason.status =
|
||||||
kpiReason.kpiUserSpecial.kpiUserEvaluation.commanderId == null ||
|
kpiReason.kpiUserSpecial.kpiUserEvaluation.commanderId == null ||
|
||||||
kpiReason.kpiUserSpecial.kpiUserEvaluation.commanderId == ""
|
kpiReason.kpiUserSpecial.kpiUserEvaluation.commanderId == ""
|
||||||
? "DONE"
|
? "DONE"
|
||||||
: "COMMANDER";
|
: "COMMANDER";
|
||||||
} else if (user.trim().toUpperCase() == "COMMANDER") {
|
} else if (user.trim().toUpperCase() == "COMMANDER") {
|
||||||
kpiReason.reasonCommander = requestBody.reason;
|
kpiReason.reasonCommander = requestBody.reason == null ? "" : requestBody.reason;
|
||||||
kpiReason.status =
|
kpiReason.status =
|
||||||
kpiReason.kpiUserSpecial.kpiUserEvaluation.commanderHighId == null ||
|
kpiReason.kpiUserSpecial.kpiUserEvaluation.commanderHighId == null ||
|
||||||
kpiReason.kpiUserSpecial.kpiUserEvaluation.commanderHighId == ""
|
kpiReason.kpiUserSpecial.kpiUserEvaluation.commanderHighId == ""
|
||||||
? "DONE"
|
? "DONE"
|
||||||
: "COMMANDERHIGH";
|
: "COMMANDERHIGH";
|
||||||
} else if (user.trim().toUpperCase() == "COMMANDERHIGH") {
|
} else if (user.trim().toUpperCase() == "COMMANDERHIGH") {
|
||||||
kpiReason.reasonCommanderHigh = requestBody.reason;
|
kpiReason.reasonCommanderHigh = requestBody.reason == null ? "" : requestBody.reason;
|
||||||
kpiReason.status = "DONE";
|
kpiReason.status = "DONE";
|
||||||
}
|
}
|
||||||
kpiReason.lastUpdateUserId = request.user.sub;
|
kpiReason.lastUpdateUserId = request.user.sub;
|
||||||
|
|
@ -565,7 +565,7 @@ export class kpiReasonController extends Controller {
|
||||||
kpiReason.kpiUserSpecial.kpiUserEvaluation.evaluatorId == ""
|
kpiReason.kpiUserSpecial.kpiUserEvaluation.evaluatorId == ""
|
||||||
? "DONE"
|
? "DONE"
|
||||||
: "EVALUATOR";
|
: "EVALUATOR";
|
||||||
kpiReason.reason = requestBody.reason;
|
kpiReason.reason = requestBody.reason == null ? "" : requestBody.reason;
|
||||||
kpiReason.lastUpdateUserId = request.user.sub;
|
kpiReason.lastUpdateUserId = request.user.sub;
|
||||||
kpiReason.lastUpdateFullName = request.user.name;
|
kpiReason.lastUpdateFullName = request.user.name;
|
||||||
await this.kpiUserEvaluationReasonSpecial.save(kpiReason);
|
await this.kpiUserEvaluationReasonSpecial.save(kpiReason);
|
||||||
|
|
@ -702,21 +702,21 @@ export class kpiReasonController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (user.trim().toUpperCase() == "EVALUATOR") {
|
if (user.trim().toUpperCase() == "EVALUATOR") {
|
||||||
kpiReason.reasonEvaluator = requestBody.reason;
|
kpiReason.reasonEvaluator = requestBody.reason == null ? "" : requestBody.reason;
|
||||||
kpiReason.status =
|
kpiReason.status =
|
||||||
kpiReason.kpiUserDevelopment.kpiUserEvaluation.commanderId == null ||
|
kpiReason.kpiUserDevelopment.kpiUserEvaluation.commanderId == null ||
|
||||||
kpiReason.kpiUserDevelopment.kpiUserEvaluation.commanderId == ""
|
kpiReason.kpiUserDevelopment.kpiUserEvaluation.commanderId == ""
|
||||||
? "DONE"
|
? "DONE"
|
||||||
: "COMMANDER";
|
: "COMMANDER";
|
||||||
} else if (user.trim().toUpperCase() == "COMMANDER") {
|
} else if (user.trim().toUpperCase() == "COMMANDER") {
|
||||||
kpiReason.reasonCommander = requestBody.reason;
|
kpiReason.reasonCommander = requestBody.reason == null ? "" : requestBody.reason;
|
||||||
kpiReason.status =
|
kpiReason.status =
|
||||||
kpiReason.kpiUserDevelopment.kpiUserEvaluation.commanderHighId == null ||
|
kpiReason.kpiUserDevelopment.kpiUserEvaluation.commanderHighId == null ||
|
||||||
kpiReason.kpiUserDevelopment.kpiUserEvaluation.commanderHighId == ""
|
kpiReason.kpiUserDevelopment.kpiUserEvaluation.commanderHighId == ""
|
||||||
? "DONE"
|
? "DONE"
|
||||||
: "COMMANDERHIGH";
|
: "COMMANDERHIGH";
|
||||||
} else if (user.trim().toUpperCase() == "COMMANDERHIGH") {
|
} else if (user.trim().toUpperCase() == "COMMANDERHIGH") {
|
||||||
kpiReason.reasonCommanderHigh = requestBody.reason;
|
kpiReason.reasonCommanderHigh = requestBody.reason == null ? "" : requestBody.reason;
|
||||||
kpiReason.status = "DONE";
|
kpiReason.status = "DONE";
|
||||||
}
|
}
|
||||||
kpiReason.lastUpdateUserId = request.user.sub;
|
kpiReason.lastUpdateUserId = request.user.sub;
|
||||||
|
|
@ -755,7 +755,7 @@ export class kpiReasonController extends Controller {
|
||||||
kpiReason.kpiUserDevelopment.kpiUserEvaluation.evaluatorId == ""
|
kpiReason.kpiUserDevelopment.kpiUserEvaluation.evaluatorId == ""
|
||||||
? "DONE"
|
? "DONE"
|
||||||
: "EVALUATOR";
|
: "EVALUATOR";
|
||||||
kpiReason.reason = requestBody.reason;
|
kpiReason.reason = requestBody.reason == null ? "" : requestBody.reason;
|
||||||
kpiReason.lastUpdateUserId = request.user.sub;
|
kpiReason.lastUpdateUserId = request.user.sub;
|
||||||
kpiReason.lastUpdateFullName = request.user.name;
|
kpiReason.lastUpdateFullName = request.user.name;
|
||||||
await this.kpiUserEvaluationReasonDevelopment.save(kpiReason);
|
await this.kpiUserEvaluationReasonDevelopment.save(kpiReason);
|
||||||
|
|
@ -896,21 +896,21 @@ export class kpiReasonController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (user.trim().toUpperCase() == "EVALUATOR") {
|
if (user.trim().toUpperCase() == "EVALUATOR") {
|
||||||
kpiReason.reasonEvaluator = requestBody.reason;
|
kpiReason.reasonEvaluator = requestBody.reason == null ? "" : requestBody.reason;
|
||||||
kpiReason.status =
|
kpiReason.status =
|
||||||
kpiReason.kpiUserCapacity.kpiUserEvaluation.commanderId == null ||
|
kpiReason.kpiUserCapacity.kpiUserEvaluation.commanderId == null ||
|
||||||
kpiReason.kpiUserCapacity.kpiUserEvaluation.commanderId == ""
|
kpiReason.kpiUserCapacity.kpiUserEvaluation.commanderId == ""
|
||||||
? "DONE"
|
? "DONE"
|
||||||
: "COMMANDER";
|
: "COMMANDER";
|
||||||
} else if (user.trim().toUpperCase() == "COMMANDER") {
|
} else if (user.trim().toUpperCase() == "COMMANDER") {
|
||||||
kpiReason.reasonCommander = requestBody.reason;
|
kpiReason.reasonCommander = requestBody.reason == null ? "" : requestBody.reason;
|
||||||
kpiReason.status =
|
kpiReason.status =
|
||||||
kpiReason.kpiUserCapacity.kpiUserEvaluation.commanderHighId == null ||
|
kpiReason.kpiUserCapacity.kpiUserEvaluation.commanderHighId == null ||
|
||||||
kpiReason.kpiUserCapacity.kpiUserEvaluation.commanderHighId == ""
|
kpiReason.kpiUserCapacity.kpiUserEvaluation.commanderHighId == ""
|
||||||
? "DONE"
|
? "DONE"
|
||||||
: "COMMANDERHIGH";
|
: "COMMANDERHIGH";
|
||||||
} else if (user.trim().toUpperCase() == "COMMANDERHIGH") {
|
} else if (user.trim().toUpperCase() == "COMMANDERHIGH") {
|
||||||
kpiReason.reasonCommanderHigh = requestBody.reason;
|
kpiReason.reasonCommanderHigh = requestBody.reason == null ? "" : requestBody.reason;
|
||||||
kpiReason.status = "DONE";
|
kpiReason.status = "DONE";
|
||||||
}
|
}
|
||||||
kpiReason.lastUpdateUserId = request.user.sub;
|
kpiReason.lastUpdateUserId = request.user.sub;
|
||||||
|
|
@ -949,7 +949,7 @@ export class kpiReasonController extends Controller {
|
||||||
kpiReason.kpiUserCapacity.kpiUserEvaluation.evaluatorId == ""
|
kpiReason.kpiUserCapacity.kpiUserEvaluation.evaluatorId == ""
|
||||||
? "DONE"
|
? "DONE"
|
||||||
: "EVALUATOR";
|
: "EVALUATOR";
|
||||||
kpiReason.reason = requestBody.reason;
|
kpiReason.reason = requestBody.reason == null ? "" : requestBody.reason;
|
||||||
kpiReason.lastUpdateUserId = request.user.sub;
|
kpiReason.lastUpdateUserId = request.user.sub;
|
||||||
kpiReason.lastUpdateFullName = request.user.name;
|
kpiReason.lastUpdateFullName = request.user.name;
|
||||||
await this.kpiUserEvaluationReasonCapacity.save(kpiReason);
|
await this.kpiUserEvaluationReasonCapacity.save(kpiReason);
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ export class KpiUserDevelopmentController extends Controller {
|
||||||
}
|
}
|
||||||
|
|
||||||
const chkName = await this.kpiUserDevelopmentRepository.findOne({
|
const chkName = await this.kpiUserDevelopmentRepository.findOne({
|
||||||
where: { name: requestBody.name},
|
where: { name: requestBody.name },
|
||||||
});
|
});
|
||||||
if (chkName) {
|
if (chkName) {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "มีชื่อนี้ในระบบแล้ว");
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "มีชื่อนี้ในระบบแล้ว");
|
||||||
|
|
@ -120,10 +120,10 @@ export class KpiUserDevelopmentController extends Controller {
|
||||||
const chkName = await this.kpiUserDevelopmentRepository.find({
|
const chkName = await this.kpiUserDevelopmentRepository.find({
|
||||||
where: {
|
where: {
|
||||||
id: Not(id),
|
id: Not(id),
|
||||||
name: requestBody.name
|
name: requestBody.name,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
if (chkName && chkName.length > 0) {
|
if (chkName && chkName.length > 0) {
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "มีชื่อนี้ในระบบแล้ว");
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "มีชื่อนี้ในระบบแล้ว");
|
||||||
}
|
}
|
||||||
|
|
@ -190,6 +190,7 @@ export class KpiUserDevelopmentController extends Controller {
|
||||||
evaluationId: getKpiUserDevelopment.kpiUserEvaluation.id,
|
evaluationId: getKpiUserDevelopment.kpiUserEvaluation.id,
|
||||||
target: getKpiUserDevelopment.target,
|
target: getKpiUserDevelopment.target,
|
||||||
summary: getKpiUserDevelopment.summary,
|
summary: getKpiUserDevelopment.summary,
|
||||||
|
point: getKpiUserDevelopment.point,
|
||||||
name: getKpiUserDevelopment.name,
|
name: getKpiUserDevelopment.name,
|
||||||
achievement10: getKpiUserDevelopment.achievement10,
|
achievement10: getKpiUserDevelopment.achievement10,
|
||||||
achievement5: getKpiUserDevelopment.achievement5,
|
achievement5: getKpiUserDevelopment.achievement5,
|
||||||
|
|
@ -223,6 +224,7 @@ export class KpiUserDevelopmentController extends Controller {
|
||||||
evaluationId: item.kpiUserEvaluation.id,
|
evaluationId: item.kpiUserEvaluation.id,
|
||||||
target: item.target,
|
target: item.target,
|
||||||
summary: item.summary,
|
summary: item.summary,
|
||||||
|
point: item.point,
|
||||||
name: item.name,
|
name: item.name,
|
||||||
achievement10: item.achievement10,
|
achievement10: item.achievement10,
|
||||||
achievement5: item.achievement5,
|
achievement5: item.achievement5,
|
||||||
|
|
|
||||||
|
|
@ -200,6 +200,8 @@ export class KpiUserPlannedController extends Controller {
|
||||||
unit: getKpiUserPlanned.unit,
|
unit: getKpiUserPlanned.unit,
|
||||||
meaning: getKpiUserPlanned.meaning,
|
meaning: getKpiUserPlanned.meaning,
|
||||||
formula: getKpiUserPlanned.formula,
|
formula: getKpiUserPlanned.formula,
|
||||||
|
summary: getKpiUserPlanned.summary,
|
||||||
|
point: getKpiUserPlanned.point,
|
||||||
achievement1: getKpiUserPlanned.achievement1,
|
achievement1: getKpiUserPlanned.achievement1,
|
||||||
achievement2: getKpiUserPlanned.achievement2,
|
achievement2: getKpiUserPlanned.achievement2,
|
||||||
achievement3: getKpiUserPlanned.achievement3,
|
achievement3: getKpiUserPlanned.achievement3,
|
||||||
|
|
@ -239,6 +241,7 @@ export class KpiUserPlannedController extends Controller {
|
||||||
unit: item.unit,
|
unit: item.unit,
|
||||||
meaning: item.meaning,
|
meaning: item.meaning,
|
||||||
formula: item.formula,
|
formula: item.formula,
|
||||||
|
summary: item.summary,
|
||||||
point: item.point,
|
point: item.point,
|
||||||
achievement:
|
achievement:
|
||||||
item.point === 1
|
item.point === 1
|
||||||
|
|
|
||||||
|
|
@ -202,6 +202,8 @@ export class KpiUserRoleController extends Controller {
|
||||||
unit: getKpiUserRole.unit,
|
unit: getKpiUserRole.unit,
|
||||||
meaning: getKpiUserRole.meaning,
|
meaning: getKpiUserRole.meaning,
|
||||||
formula: getKpiUserRole.formula,
|
formula: getKpiUserRole.formula,
|
||||||
|
summary: getKpiUserRole.summary,
|
||||||
|
point: getKpiUserRole.point,
|
||||||
achievement1: getKpiUserRole.achievement1,
|
achievement1: getKpiUserRole.achievement1,
|
||||||
achievement2: getKpiUserRole.achievement2,
|
achievement2: getKpiUserRole.achievement2,
|
||||||
achievement3: getKpiUserRole.achievement3,
|
achievement3: getKpiUserRole.achievement3,
|
||||||
|
|
@ -242,6 +244,7 @@ export class KpiUserRoleController extends Controller {
|
||||||
unit: item.unit,
|
unit: item.unit,
|
||||||
meaning: item.meaning,
|
meaning: item.meaning,
|
||||||
formula: item.formula,
|
formula: item.formula,
|
||||||
|
summary: item.summary,
|
||||||
point: item.point,
|
point: item.point,
|
||||||
achievement:
|
achievement:
|
||||||
item.point === 1
|
item.point === 1
|
||||||
|
|
|
||||||
|
|
@ -224,6 +224,7 @@ export class KpiUserSpecialController extends Controller {
|
||||||
unit: getKpiUserSpecial.unit,
|
unit: getKpiUserSpecial.unit,
|
||||||
meaning: getKpiUserSpecial.meaning,
|
meaning: getKpiUserSpecial.meaning,
|
||||||
formula: getKpiUserSpecial.formula,
|
formula: getKpiUserSpecial.formula,
|
||||||
|
summary: getKpiUserSpecial.summary,
|
||||||
point: getKpiUserSpecial.point,
|
point: getKpiUserSpecial.point,
|
||||||
achievement:
|
achievement:
|
||||||
getKpiUserSpecial.point === 1
|
getKpiUserSpecial.point === 1
|
||||||
|
|
@ -276,6 +277,7 @@ export class KpiUserSpecialController extends Controller {
|
||||||
unit: item.unit,
|
unit: item.unit,
|
||||||
meaning: item.meaning,
|
meaning: item.meaning,
|
||||||
formula: item.formula,
|
formula: item.formula,
|
||||||
|
summary: item.summary,
|
||||||
point: item.point,
|
point: item.point,
|
||||||
achievement:
|
achievement:
|
||||||
item.point === 1
|
item.point === 1
|
||||||
|
|
|
||||||
|
|
@ -217,4 +217,5 @@ export class UpdateKpiSpecial {
|
||||||
export class KpiUserSpecialDataPoint {
|
export class KpiUserSpecialDataPoint {
|
||||||
id: string;
|
id: string;
|
||||||
point: number;
|
point: number;
|
||||||
|
summary: number;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,14 @@ export class KpiUserEvaluationReasonCapacity extends EntityBase {
|
||||||
})
|
})
|
||||||
reason: string;
|
reason: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "คะแนน",
|
||||||
|
length: 255,
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
score: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "หมายเหตุ ผู้ประเมิน",
|
comment: "หมายเหตุ ผู้ประเมิน",
|
||||||
|
|
@ -77,7 +85,9 @@ export class KpiUserEvaluationReasonCapacity extends EntityBase {
|
||||||
|
|
||||||
export class updateKpiUserReasonEvaluation {
|
export class updateKpiUserReasonEvaluation {
|
||||||
@Column()
|
@Column()
|
||||||
reason: string;
|
reason?: string | null;
|
||||||
@Column()
|
@Column()
|
||||||
topic?: string | null;
|
topic?: string | null;
|
||||||
|
@Column()
|
||||||
|
score?: string | null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,14 @@ export class KpiUserEvaluationReasonDevelopment extends EntityBase {
|
||||||
})
|
})
|
||||||
reason: string;
|
reason: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "คะแนน",
|
||||||
|
length: 255,
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
score: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "หมายเหตุ ผู้ประเมิน",
|
comment: "หมายเหตุ ผู้ประเมิน",
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,14 @@ export class KpiUserEvaluationReasonPlan extends EntityBase {
|
||||||
})
|
})
|
||||||
reason: string;
|
reason: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "คะแนน",
|
||||||
|
length: 255,
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
score: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "หมายเหตุ ผู้ประเมิน",
|
comment: "หมายเหตุ ผู้ประเมิน",
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,14 @@ export class KpiUserEvaluationReasonRole extends EntityBase {
|
||||||
})
|
})
|
||||||
reason: string;
|
reason: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "คะแนน",
|
||||||
|
length: 255,
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
score: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "หมายเหตุ ผู้ประเมิน",
|
comment: "หมายเหตุ ผู้ประเมิน",
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,14 @@ export class KpiUserEvaluationReasonSpecial extends EntityBase {
|
||||||
})
|
})
|
||||||
reason: string;
|
reason: string;
|
||||||
|
|
||||||
|
@Column({
|
||||||
|
nullable: true,
|
||||||
|
comment: "คะแนน",
|
||||||
|
length: 255,
|
||||||
|
default: null,
|
||||||
|
})
|
||||||
|
score: string;
|
||||||
|
|
||||||
@Column({
|
@Column({
|
||||||
nullable: true,
|
nullable: true,
|
||||||
comment: "หมายเหตุ ผู้ประเมิน",
|
comment: "หมายเหตุ ผู้ประเมิน",
|
||||||
|
|
|
||||||
22
src/migration/1718715171176-update_table_kpi_add_summary.ts
Normal file
22
src/migration/1718715171176-update_table_kpi_add_summary.ts
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||||
|
|
||||||
|
export class UpdateTableKpiAddSummary1718715171176 implements MigrationInterface {
|
||||||
|
name = 'UpdateTableKpiAddSummary1718715171176'
|
||||||
|
|
||||||
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluationReasonPlan\` ADD \`score\` varchar(255) NULL COMMENT 'คะแนน'`);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluationReasonRole\` ADD \`score\` varchar(255) NULL COMMENT 'คะแนน'`);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluationReasonCapacity\` ADD \`score\` varchar(255) NULL COMMENT 'คะแนน'`);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluationReasonDevelopment\` ADD \`score\` varchar(255) NULL COMMENT 'คะแนน'`);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluationReasonSpecial\` ADD \`score\` varchar(255) NULL COMMENT 'คะแนน'`);
|
||||||
|
}
|
||||||
|
|
||||||
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluationReasonSpecial\` DROP COLUMN \`score\``);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluationReasonDevelopment\` DROP COLUMN \`score\``);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluationReasonCapacity\` DROP COLUMN \`score\``);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluationReasonRole\` DROP COLUMN \`score\``);
|
||||||
|
await queryRunner.query(`ALTER TABLE \`kpiUserEvaluationReasonPlan\` DROP COLUMN \`score\``);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue