Align admin orders with the shop pre-order flow.

Admins create product-based pre-orders, price real line items, reach final approval after cash or checks, and only ship eligible orders.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-10 21:41:09 +03:30
co-authored by Cursor
parent 37cb1ad859
commit f68fd820e7
12 changed files with 411 additions and 153 deletions
+6 -2
View File
@@ -228,7 +228,7 @@ export const customersApi = {
/* ── Orders ────────────────────────────────────────────────── */
export type AdminCreateOrderPayload = {
companyId: string
companyId?: string
customerId?: string
customerName?: string
customerPhone?: string
@@ -237,10 +237,13 @@ export type AdminCreateOrderPayload = {
settlementType?: SettlementMethod
meterage?: number
notes?: string
items?: Array<{ productId: string; meterage: number; notes?: string }>
}
export type OrderItemPricingPayload = {
id: string
id?: string
productId?: string
requestedMeterage?: number
confirmedMeterage?: number
unitPrice?: number
supplyPrice?: number
@@ -250,6 +253,7 @@ export type UpdateOrderPricingPayload = {
items: OrderItemPricingPayload[]
shippingCost?: number
note?: string
deletedItemIds?: string[]
}
export type ApiOrder = Order & {