sort เรียงจากวันที่สร้าง

This commit is contained in:
AdisakKanthawilang 2024-11-08 10:42:04 +07:00 committed by Bright
parent c55edf33b1
commit 0c170928d1
2 changed files with 9 additions and 4 deletions

View file

@ -171,7 +171,7 @@ export class KpiUserEvaluationController extends Controller {
});
}),
)
.orderBy("kpiUserEvaluation.createdAt", "ASC")
.orderBy("kpiUserEvaluation.createdAt", "DESC")
.skip((requestBody.page - 1) * requestBody.pageSize)
.take(requestBody.pageSize)
.getManyAndCount();
@ -1050,7 +1050,7 @@ export class KpiUserEvaluationController extends Controller {
evaluationStatus: status == undefined ? "" : status.trim().toUpperCase(),
},
)
.orderBy("kpiUserEvaluation.createdAt", "ASC")
.orderBy("kpiUserEvaluation.createdAt", "DESC")
.skip((page - 1) * pageSize)
.take(pageSize)
.getManyAndCount();