fix: restore historical order visibility for HartOMat admins

This commit is contained in:
2026-04-06 19:24:09 +02:00
parent f13cb489c1
commit 2a00abe91f
6 changed files with 19 additions and 7 deletions
+9 -2
View File
@@ -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