Add special orders admin UI and product specials tools.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Alireza Hassani
2026-10-12 23:09:31 +03:30
co-authored by Cursor
parent b103e330ef
commit d63e3a83d5
33 changed files with 2731 additions and 73 deletions
+4
View File
@@ -18,6 +18,7 @@ export type ListProductsParams = {
categoryId?: string
minPrice?: number
maxPrice?: number
tag?: string
page?: number
pageSize?: number
}
@@ -41,6 +42,8 @@ export type CreateProductPayload = {
sellUnit: SellUnit
intro?: string
description?: string
/** null = ready immediately (no prep time) */
preparationHours?: number | null
tags?: string[]
mainImageUrl?: string
mainImageKey?: string
@@ -54,6 +57,7 @@ function buildQuery(params: ListProductsParams) {
const search = new URLSearchParams()
if (params.q?.trim()) search.set('q', params.q.trim())
if (params.categoryId) search.set('categoryId', params.categoryId)
if (params.tag?.trim()) search.set('tag', params.tag.trim())
if (params.minPrice !== undefined) search.set('minPrice', String(params.minPrice))
if (params.maxPrice !== undefined) search.set('maxPrice', String(params.maxPrice))
if (params.page) search.set('page', String(params.page))