no message

This commit is contained in:
Bright 2024-04-22 13:39:34 +07:00
parent 1c7d62e149
commit 3356ceb22c

View file

@ -24,7 +24,6 @@ import { KpiPeriod } from "../entities/kpiPeriod";
import { KpiUserEvaluation, createKpiUserEvaluation, updateKpiUserEvaluation } from "../entities/kpiUserEvaluation";
import { Like, In } from "typeorm";
import CallAPI from "../interfaces/call-api";
import { Any } from "typeorm/browser";
@Route("api/v1/kpi/user/evaluation")
@Tags("kpiUserEvaluation")
@ -166,9 +165,7 @@ export class KpiUserEvaluationController extends Controller {
{ lastName: Like(`%${keyword}%`) },
],
)
.andWhere(period == undefined && period == null && period == ""
? "1=1"
: { "kpiPeriod.durationKPI" : In([period]) })
.andWhere(period ? "kpiPeriod.durationKPI LIKE :period" : "1=1", { period: `%${period}%` })
.orderBy("kpiUserEvaluation.createdAt", "ASC")
.skip((page - 1) * pageSize)
.take(pageSize)