Function: useOrders()
useOrders(
options):UseOrdersReturn
Defined in: composables/react/useOrders.ts:132
useOrders — order list, search, PDF download and reorder flow.
Parameters
options
see UseOrdersOptions.
Returns
order list, pagination state and async actions — see UseOrdersReturn.
Remarks
GraphQL integration: services are built per-call via createServices(graphqlClient).
Most calls go through services.order (OrderService) — fetchOrders calls
getOrders (scoped by userId, optional companyIds and statuses), getOrderById
calls getOrder, downloadPdf / downloadQuotePdf call getOrderPDF / getQuotePDF
(decoding the base64 result client-side into a download), and setQuoteStatus calls
setOrderStatus. reorder resolves a cart via the shared initCart flow then calls
services.cart.addItemToCart (CartService) once per parent order item. Pagination
is delegated to usePagination. All calls require an authenticated session.