feat(POS-FIX-8): completed feature

This commit is contained in:
chattie
2026-08-24 07:39:32 +02:00
parent 2467a02dd4
commit e15918058f
11 changed files with 314 additions and 10 deletions

View File

@@ -93,6 +93,12 @@ export const posApi = {
const tail = qs.toString();
return apiFetch<T>(`/pos/sales${tail ? `?${tail}` : ''}`);
},
/** Delete a pending parked sale and restore inventory. */
deleteSale: <T>(orderId: string) =>
apiFetch<T>(`/pos/sales/${encodeURIComponent(orderId)}`, { method: 'DELETE' }),
/** List order items (used for recovering a parked sale). */
listOrderItems: <T>(orderId: string) =>
apiFetch<T>(`/pos/sales/${encodeURIComponent(orderId)}/items`),
/** Email the immutable generated receipt. */
emailReceipt: <T>(orderId: string, email: string) =>
apiFetch<T>(`/pos/sales/${encodeURIComponent(orderId)}/receipt/email`, {