fix
This commit is contained in:
parent
b8a13ef003
commit
cb26678af0
1 changed files with 6 additions and 1 deletions
|
|
@ -331,7 +331,12 @@ export class kpiPeriodController extends Controller {
|
|||
const kpiUserEvaluation = await this.kpiUserEvaluationRepository.find({
|
||||
where: { kpiPeriodId: id },
|
||||
});
|
||||
|
||||
if (kpiUserEvaluation && kpiUserEvaluation.length > 0) {
|
||||
throw new HttpError(
|
||||
HttpStatusCode.NOT_FOUND,
|
||||
"ไม่สามารถลบรอบการประเมินนี้ได้ เนื่องจากพบรายการผู้รับการประเมินในรอบนี้",
|
||||
);
|
||||
}
|
||||
const kpiUserRole = await this.kpiUserRoleRepository.find({
|
||||
where: { kpiRoleId: In(kpiRole.map((x) => x.id)) },
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue