feat(F-189): completed feature
This commit is contained in:
@@ -66,6 +66,15 @@ export const posApi = {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(data),
|
||||
}),
|
||||
/** Apply a partial/full return to a POS sale. */
|
||||
createReturn: <T>(orderId: string, data: unknown) =>
|
||||
apiFetch<T>(`/pos/sales/${encodeURIComponent(orderId)}/returns`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify(data),
|
||||
}),
|
||||
/** List order items for a sale (used by the return UI). */
|
||||
listOrderItems: <T>(orderId: string) =>
|
||||
apiFetch<T>(`/pos/sales/${encodeURIComponent(orderId)}/items`),
|
||||
/** List POS sales for the session, optionally filtered by state. */
|
||||
listSales: <T>(params?: { state?: 'PENDING' | 'COMPLETED'; sessionId?: string }) => {
|
||||
const qs = new URLSearchParams();
|
||||
|
||||
Reference in New Issue
Block a user