251208:1625 Frontend: to be complete admin panel, Backend: tobe recheck all task
Spec Validation / validate-markdown (push) Has been cancelled
Spec Validation / validate-diagrams (push) Has been cancelled
Spec Validation / check-todos (push) Has been cancelled

This commit is contained in:
admin
2025-12-08 16:25:56 +07:00
parent dcd126d704
commit 863a727756
64 changed files with 5956 additions and 1256 deletions
@@ -208,10 +208,10 @@ export class ShopDrawingService {
const {
projectId,
mainCategoryId,
subCategoryId,
// subCategoryId, // Unused
search,
page = 1,
pageSize = 20,
limit = 20,
} = searchDto;
const query = this.shopDrawingRepo
@@ -225,10 +225,6 @@ export class ShopDrawingService {
query.andWhere('sd.mainCategoryId = :mainCategoryId', { mainCategoryId });
}
if (subCategoryId) {
query.andWhere('sd.subCategoryId = :subCategoryId', { subCategoryId });
}
if (search) {
query.andWhere(
new Brackets((qb) => {
@@ -241,8 +237,8 @@ export class ShopDrawingService {
query.orderBy('sd.updatedAt', 'DESC');
const skip = (page - 1) * pageSize;
query.skip(skip).take(pageSize);
const skip = (page - 1) * limit;
query.skip(skip).take(limit);
const [items, total] = await query.getManyAndCount();
@@ -262,8 +258,8 @@ export class ShopDrawingService {
meta: {
total,
page,
pageSize,
totalPages: Math.ceil(total / pageSize),
limit,
totalPages: Math.ceil(total / limit),
},
};
}