feat: paginate customer orders and polish the dashboard hero
Add paged orders API and infinite scroll, short order numbers, and align the guest invite card with the logged-in hero shell. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -143,7 +143,17 @@ export class CatalogService {
|
||||
where.title = { contains: query.search.trim(), mode: 'insensitive' };
|
||||
}
|
||||
if (query.categoryId) where.categoryId = query.categoryId;
|
||||
if (query.brandId) where.brandId = query.brandId;
|
||||
// Apps' filter sheet allows several brands at once. Accept a single id or
|
||||
// a comma-separated list (`?brandId=a,b`) so Search does not have to fake
|
||||
// multi-brand by loading the whole catalogue.
|
||||
if (query.brandId) {
|
||||
const brandIds = query.brandId
|
||||
.split(',')
|
||||
.map((s) => s.trim())
|
||||
.filter(Boolean);
|
||||
if (brandIds.length === 1) where.brandId = brandIds[0];
|
||||
else if (brandIds.length > 1) where.brandId = { in: brandIds };
|
||||
}
|
||||
if (query.collectionId) where.collections = { some: { collectionId: query.collectionId } };
|
||||
|
||||
// A product is in range when at least ONE of its variants is, which is what
|
||||
|
||||
Reference in New Issue
Block a user