fix: restore historical order visibility for HartOMat admins
This commit is contained in:
1 parent
f13cb489c1
commit
2a00abe91f
6 files changed
+19
-7
No files matched your search
@@ -2,6 +2,8 @@ import api from './client'
|
||||
import type { Product } from './products'
|
||||
import type { OutputType } from './outputTypes'
|
||||
|
||||
const DEFAULT_ORDER_LIMIT = 200
|
||||
|
||||
export interface RenderLog {
|
||||
renderer?: string
|
||||
type?: string
|
||||
@@ -132,7 +134,12 @@ export interface OrderDetail extends Order {
|
||||
}
|
||||
|
||||
export async function listOrders(params?: { status?: string; skip?: number; limit?: number }) {
|
||||
const res = await api.get<Order[]>('/orders', { params })
|
||||
const res = await api.get<Order[]>('/orders', {
|
||||
params: {
|
||||
...params,
|
||||
limit: params?.limit ?? DEFAULT_ORDER_LIMIT,
|
||||
},
|
||||
})
|
||||
return res.data
|
||||
}
|
||||
|
||||
@@ -149,7 +156,7 @@ export async function searchOrders(params: {
|
||||
statuses: params.statuses?.join(',') || '',
|
||||
date_from: params.date_from || '',
|
||||
date_to: params.date_to || '',
|
||||
limit: params.limit || 50,
|
||||
limit: params.limit ?? DEFAULT_ORDER_LIMIT,
|
||||
},
|
||||
})
|
||||
return res.data
|
||||
|
||||
Reference in new issue
Block a user