feat: order revision, rial wage from variant, product tags; drop user-app-v2
Admin order edit with category chips and timeline; customer checkout charges variant rialWage; product tags; retire the unused user-app-v2 tree. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -138,9 +138,13 @@ export class CatalogService {
|
||||
const where: Prisma.ProductWhereInput = { isActive: true, images: { some: {} } };
|
||||
|
||||
if (query.search?.trim()) {
|
||||
// `contains`, as the apps' own title filter did. Case-insensitive is a
|
||||
// no-op for Persian but matches how every other search in this API reads.
|
||||
where.title = { contains: query.search.trim(), mode: 'insensitive' };
|
||||
// Title OR product code — same as the app search box (SearchView).
|
||||
// Case-insensitive is a no-op for Persian but matches other API searches.
|
||||
const term = query.search.trim();
|
||||
where.OR = [
|
||||
{ title: { contains: term, mode: 'insensitive' } },
|
||||
{ productCode: { contains: term, mode: 'insensitive' } },
|
||||
];
|
||||
}
|
||||
if (query.categoryId) where.categoryId = query.categoryId;
|
||||
// Apps' filter sheet allows several brands at once. Accept a single id or
|
||||
@@ -248,6 +252,9 @@ export class CatalogService {
|
||||
|
||||
out.push({
|
||||
...product,
|
||||
// Explicit so list cards can show admin-assigned labels even if a
|
||||
// future select() omits the field from the spread.
|
||||
tags: product.tags ?? [],
|
||||
variants: mappedVariants,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user