Stock count
A React block (a whole screen) in Beamline's Inventory app.
A shelf counted. Count: the products on it with counted units, not counted (an empty field that changes nothing) kept apart from a counted zero, expected quantities and the difference shown, or hidden for a blind count, filtered by counted or not, a product found on the shelf added by hand (not expected here), the progress and Save. Review: each difference from → to, matches counted, products not counted named as left alone, and Apply; when stock moved while counting, those products' expected quantities update and are said, every count is kept, and nothing applies until applied again; a refusal keeps the counts; without the permission to apply, the count is saved for review.
Use it for
- Counting a shelf, bin or location and applying the differences to stock.
- Anywhere 'not checked' must stay apart from 'checked and zero', and a change made meanwhile must not lose what was entered.
Not for
- Picking orders or scanning codes (scan-station).
- The history of stock moves (stock-history).
- Assigning serial numbers (serial-allocation).
Anatomy
- header: Back to counting (in review), the product's mark, the title, the request and location with its due date
- count: Show (all, not counted, counted with counts), the blind-count note; the lines: product with SKU, lot and added by hand, expected, counted with its unit, difference; add a product found here
- review: the number of differences, each product from → to with the difference and moved-meanwhile, matches, not counted and left alone
- summary: counted of total with its bar (what an empty field means a hint beside it), moved or refused said, Save and Review differences, or Apply, or the permission said with Save
States
- line: not counted (empty); counted zero; matches; more; fewer; not expected here (added by hand)
- blind count: expected and difference hidden while counting, shown in review
- filter: all; not counted; counted; nothing to show (empty state)
- save: saving; saved; refused with the reason (counts kept)
- apply: no differences (close the count); applying; stock moved meanwhile (expected updated, counts kept, apply again); refused with the reason (counts kept); applied
- no permission to apply: said, Save kept
- loading: shaped skeletons
- phone: the summary over the lines, each line's expected and difference under it
- right to left: the layout mirrors
- reduced motion: through the tokens
Keyboard
- Arrows within Show; Tab through each counted field (arrows step the number), the add select and Add, then Save and Review; in review, Back and Apply
Motion
The progress bar eases to its new length. Nothing runs at rest.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
request (required) | CountRequest | — | |
defaultLines (required) | CountLine[] | — | |
productOptions | { sku: string; product: string; unit: string; }[] | — | Products that can be added by hand when found on the shelf. |
onSave | ((lines: CountLine[]) => Promise<unknown>) | — | Save the counts as they are (a draft others can review). |
onApply | ((lines: CountLine[]) => Promise<void | { moved?: { lineId: string; expected: number; }… | — | Apply the counted lines. Resolve with `moved` when stock changed meanwhile: those lines' new expected quantities are shown, every count kept, and nothing applied until the counter applies again. Reject to keep everything. |
canApply | boolean | — | false: the person can count and save, not apply. |
loading | boolean | — | |
defaultStep | "count" | "review" | — | |
product | string | — | Your product's name, shown as its mark. |
className | string | — | Classes on the documented visual root; no override by default. |
ref | Ref<HTMLDivElement> | — | Receives the documented native target or imperative handle; omitted by default. |
Built from
- Avatar
- Badge
- Button
- Empty state
- Label
- Number field
- Segmented control
- Select
- Skeleton
- Spinner
- Text morph
- Tooltip
Dependencies
lucide-react
Import
import { StockCount } from "@beamline/stock-count";
Get it
Stock count is part of Beamline UI. Install the parts you need in your React app as compiled packages or editable source. Get Beamline · Connect your agent
More in Inventory
- Inventory counts: Recurring stock counts from plan to shelf: a phone-first count of one occurrence where an untouched part reads not counted and a zero reads counted, none…
- Goods receiving: Goods received against purchase orders and invoices. Cards grouped by purchase order or invoice, each line once whichever way (a line keeps both sources…
- Purchase order desk: Purchase orders for stock from draft to closed. The list of orders with status (ready for review on warning, approved, ordered and partly received on…
- Restock desk: Restocking from suppliers' own shops. Items low on stock (below the minimum on danger, at it on warning, unknown said) beside the chosen item with how…
- Stock alerts: Alerts on stock counts and expiry dates. Counts of alerts gone off (danger) and close (warning) in the header. A table: item and type, the rule in words…
- Inventory finder: Find stock and act on what's found. A rail of filters: name or SKU; folders with or without their subfolders (folders the person can't see said as not…
- Item setup: Setting items up for scanning and records. Barcodes: scanned codes waiting to be linked, each with its symbology, when and who; Look it up brings a…
- Bulk item edit: Many items corrected at once. Pick a folder, with its subfolders or not (fixed once anything is edited), up to a limit said. The items in a grid: name…
- Kit builder: A kit (bundle) made of standalone products, and how many its parts' stock can make. Sell as a kit; the parts in one kit with units per kit, removable…
- Serial allocation: A receipt line's serial numbers. Serials generated from a first serial and how many (its digits counted up, padding kept; a first serial without digits…
- Stock moves: Where stock went, and moving it. The ledger lists movements newest first: moves on info, stock added on success, stock taken out on warning; each with…
- Scan station: A warehouse scanner, phone-first. Home: one scan field that also takes typing (and says so when the scanner isn't connected), each code named as what it…
- Pack station: A packing bench. Scanner, scale and printer each said, on the warning tone when away. Find the shipment by scanning or typing its number (none found…
- Shipment split: An order's lines split across shipments. A table of lines with what was ordered and a column per shipment (new ones marked); a line already shipped can't…
- Route plan: A day's delivery routes in the service's zone. The day at a glance: routes, routes without a driver (warning), stops running late (danger), stops done…
- Job materials: Materials sent out to jobs and pick lists. Jobs: the list (draft, active on info, completed on success) beside the chosen job with its site, dates (the…
- Service tasks: A fleet shop's maintenance setup. Tasks: active and archived, searchable, main tasks and their subtasks told apart in words, archiving refused while…
- Owner records: Who a customer is and what they own, at the front desk. New customer: name, phone and email checked as typed against existing customers; each likely…
- Sample storage: Where physical items are kept (rooms, freezers, shelves, racks, boxes) and acting on several at once. The storage tree is browsed apart from moving: Move…
- Sample ledger: Materials used in a record and the containers they came from, plus pooling. Subtracting a used amount writes a stock movement with its unit and the…