orders collection requests - BevvyTech/BrewskiDocs GitHub Wiki

Orders – Collection Requests

Overview

  • Route: /orders/collection-requests
  • Purpose: Operations staff can review off-trade pickup enquiries captured via the public marketplace form, monitor notification status, and resend emails to brewery contacts when required.

Core Interactions

  • Filter requests by status (pending, notified) and admin district; pagination mirrors the API contract (page, pageSize, sort, direction).
  • View key request details: postcode, district, submitted message, notification status, last sent timestamp, and notified team names.
  • Resend notifications per request (owner/admin only). Each resend triggers POST /offtrade/collection-requests/:id/retry, updates notifiedAt, and logs offtrade.notification.retry activity entries.
  • Manual refresh re-fetches GET /offtrade/collection-requests so operators can pull the latest submissions without leaving the view.

Data Dependencies

  • List: GET /offtrade/collection-requests
  • Retry: POST /offtrade/collection-requests/:id/retry

Permissions & Notes

  • All team members may view the list; only owners/admins see the “Resend” action enabled.
  • Missing offTradeContactEmail surfaces an API error which is bubbleed through the snackbar—ensure teams configure the contact address in settings.
  • The page honours the active team selection from the global context; switching teams automatically reloads the dataset.
  • Feature flag admin.orders.collection-requests (disabled by default) must be enabled to expose this route and its navigation entry via Settings → Feature Flags.
⚠️ **GitHub.com Fallback** ⚠️