Merge branch 'develop' into adiDev

This commit is contained in:
AdisakKanthawilang 2024-05-08 14:04:22 +07:00
commit f3c66103a9
8 changed files with 203 additions and 3 deletions

View file

@ -72,6 +72,7 @@ export class kpiEvaluationController extends Controller {
@Query("page") page: number = 1,
@Query("pageSize") pageSize: number = 10,
@Query("keyword") keyword?: string,
@Query("status") status?: string,
) {
let whereClause: any = {};
@ -84,6 +85,9 @@ export class kpiEvaluationController extends Controller {
const [kpiEvaluation, total] = await this.kpiEvaluationRepository.findAndCount({
...whereClause,
...(status == null || status == undefined
? {}
: { evaluationStatus: status.trim().toUpperCase() }),
...(keyword ? {} : { skip: (page - 1) * pageSize, take: pageSize }),
order: {
level: "DESC",

View file

@ -127,7 +127,7 @@ export class KpiUserEvaluationController extends Controller {
kpiUserEvaluation.lastName = x.lastName;
})
.catch((x) => {});
kpiUserEvaluation.evaluationStatus = "PENDING";
kpiUserEvaluation.evaluationStatus = "NEW";
kpiUserEvaluation.evaluationResults = "PENDING";
kpiUserEvaluation.createdUserId = request.user.sub;
kpiUserEvaluation.createdFullName = request.user.name;