Skip to main content

Function: usePurchaseAuthorizationRequests()

usePurchaseAuthorizationRequests(options): UsePurchaseAuthorizationRequestsReturn

Defined in: composables/react/usePurchaseAuthorization.ts:490

usePurchaseAuthorizationRequests — review queue for carts awaiting purchase authorization (accept or reject).

Parameters

options

UsePurchaseAuthorizationRequestsOptions

see UsePurchaseAuthorizationRequestsOptions.

Returns

UsePurchaseAuthorizationRequestsReturn

request list, modal state and handlers — see UsePurchaseAuthorizationRequestsReturn.

Remarks

GraphQL integration: all backend calls go through services.cart (CartService), built per-call via createServices(graphqlClient). loadCarts calls getCarts filtered by CartStatus.PENDING_PURCHASE_AUTHORIZATION and the company id; handleViewCart calls getCart for the full cart detail; handleAcceptRequest calls acceptPurchaseAuthorizationRequest (passing the accepting contact id); handleDeleteRequest calls deleteCart. All calls require an authenticated session; onAcceptRequest / onDeleteRequest fully override their default calls.