Merge branch 'adiDev' into develop

This commit is contained in:
AdisakKanthawilang 2024-04-23 18:16:39 +07:00
commit 563a4dd314
3 changed files with 3 additions and 1 deletions

View file

@ -239,7 +239,7 @@ export class kpiCapacityController extends Controller {
: [{ name: Like(`%${keyword}%`) }, { description: Like(`%${keyword}%`) }],
)
.andWhere(type == undefined ? "1=1" : { type: type })
.orderBy("kpiCapacityDetail.level", "ASC")
.orderBy("kpiCapacity.createdAt", "ASC")
.skip((page - 1) * pageSize)
.take(pageSize)
.getManyAndCount();

View file

@ -152,6 +152,7 @@ export class kpiGroupController extends Controller {
const [kpiGroup, total] = await this.kpiGroupRepository.findAndCount({
...whereClause,
...(keyword ? {} : { skip: (page - 1) * pageSize, take: pageSize }),
order: { createdAt: "ASC" },
});
return new HttpSuccess({ data: kpiGroup, total });

View file

@ -246,6 +246,7 @@ export class kpiLinkController extends Controller {
)
.skip((page - 1) * pageSize)
.take(pageSize)
.orderBy("kpiLink.createdAt", "ASC")
.getManyAndCount();
if (!kpiLink) {