Stock alerts

A React block (a whole screen) in Beamline's Inventory app.

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 (above, at or above, below, at or below a value, or at or below the item's minimum with that minimum said; days before expiry for dates), how far from going off in units or days (gone off, or unknown when the count is), when it last went off or never, who hears; filtered by type and state (gone off, close, not close, never gone off). Picked alerts revise together in one editor: when it goes off and who hears (roles and people; nobody refused); review lists every alert's rule now → after; at or below the minimum sets each item's minimum to the value given and lists those minimums old → new, while an ordinary threshold leaves them alone; alerts it can't apply to are left out and said; saving answers per alert, one changed by someone else meanwhile left as it was; saving rules is said apart from message delivery. New alerts for items that have none use the same editor.

Use it for

  • Low-stock and expiry alerts managed in one place, revised in bulk with every change shown first.
  • Where an alert that rewrites item settings must say so before saving.

Not for

Anatomy

  • header: the tool's mark, Stock alerts, gone off, close, New alert
  • toolbar: type and state as switches (state a menu on a phone), Revise
  • table: pick, item and type, the rule, how far, last went off, who hears
  • editor: items (new), when, value or new minimum, who hears as role and people chips; review with now → after, minimums changing, left out; Save; saved and skipped

States

  • no alerts, none matching, gone off, close, not close, unknown count, never gone off
  • editing, nobody to tell, reviewing, minimums overwritten, left out, saving, refused, saved with some skipped
  • phone: the editor first, the table scrolls sideways
  • right to left: mirrored
  • reduced motion: through the tokens

Keyboard

  • Tab through the filters, each row's pick, Revise, and the editor's fields

Motion

Nothing runs at rest.

Props

PropTypeDefaultDescription
rulesAlertRule[]—
defaultRulesAlertRule[]—
onRulesChange((r: AlertRule[]) => void)—
items (required)AlertItem[]—
roles (required)string[]—
people (required)string[]—
onSave (required)(req: { ruleIds: string[]; itemIds: string[]; expectedRevisions: Record<string, number>…—Saves the patch onto these alerts (or new ones for these items); resolve per alert. Reject with why nothing saved.
defaultPickedstring[]—
defaultEditingboolean—
productstring—
classNamestring—Classes on the documented visual root; no override by default.
styleCSSProperties—Inline styles on the documented visual root; no overrides by default.
refRef<HTMLDivElement>—Receives the documented native target or imperative handle; omitted by default.

Built from

Dependencies

lucide-react

Import

import { StockAlerts } from "@beamline/stock-alerts";

Get it

Stock alerts 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

  • Stock count: 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…
  • 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…
  • 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…

Part of Beamline UI: polished, editable React components and complete screens for custom applications. Build your own style from any look; tokens, fonts, radii, motion; not only colours.