shop stock - BevvyTech/BrewskiDocs GitHub Wiki
Shows packaged availability for every beer that can be sold through the Shop. The page lives inside the Shop navigation group and exposes two second-level tabs:
-
In stock (
/shop/stock): default view listing beers (managed or manual inventory) that currently have stock available. UsesGET /beers/stockwithout extras so only beers with positive totals are returned. -
All beers (
/shop/stock/all): same layout but passesincludeEmpty=true, letting operators surface beers with zero on-hand stock so they can top-up manual counts or prep packaging runs. - Both tabs show a
Manage stockaction for each beer. Manual-inventory beers open an editor to update unit counts per container (writes to/inventory/manual/overrides); managed beers display read-only packaging totals.
- Data source:
GET /beers/stockfiltered by the active team and search string. Managed beers aggregate packaging lots; manual beers surface their storefront inventory variants. Both tab views passpage/pageSizeand consume the API’spage/totalmetadata so the shared pagination footer stays accurate. - Search box debounces queries (200 ms) and filters both sub-views.
- The “New beer” CTA mirrors the Beers module flow and opens the shared
AddBeerDialog, keeping post-create navigation in the core Beers area. - Each row links to
/beers/:beerIddetail. Container badges show per-packaging availability,inventoryModechip highlights Manual vs Managed handling, and empty-state messaging adapts to search vs default.
- Requires the user to belong to the active team; inventory counts honour the existing API auth.
- Manual inventory adjustments (Manage stock dialog) are available to any team member when the team runs in Shop or Hybrid mode; owners/admins retain access elsewhere.
- No dedicated feature flag — visibility comes from Shop operating mode and standard menu resolution logic.