Production plan
A React block (a whole screen) in Beamline's Manufacturing app.
A production plan by month: each product's starting stock, forecast demand, replenishment and ending stock, every ending rolling into the next month's start and unknown forecasts carried as not known, never 0. The figures read as figures (a faint dotted underline marks the ones that can be changed; the field arrives with the pointer or focus): forecasts are typed or stepped with the arrow keys in their cells and the suggestions recalculate (said while they do; a refused forecast is put back with the reason); a replenishment set by hand is marked and goes back to the suggestion in one press; ending stock is drawn against the safety line and said in words when it dips under it or runs out. What is already ordered is said per month (to order, short, over); Order opens the order first, warning when it would arrive after the stock runs out on what is already ordered, and creates nothing until Create returns its number. A product's planning settings (make or buy, supplier, safety stock, minimum order, lead time per variant, how orders start) save without creating an order. A phone shows one period at a time, stepped from the column head.
Use it for
- Planning a workshop's or a small factory's make and buy quantities month by month against a forecast, with a planner who orders from the plan.
- Anywhere an edited forecast must visibly change later months' stock, and a hand-set figure must stay distinguishable from the system's suggestion.
Not for
- A read-only look at one item's stock weeks ahead with an order date to drag (stock-horizon).
- Receiving deliveries against a purchase order (purchase-orders).
- The day's work at the shop floor (shop-floor).
Anatomy
- header: the product's mark, the title and when the plan was calculated
- grid: a column per period with the row names pinned while the periods scroll; per product a head (name, unit, make or buy and supplier, Recalculating while it does, planning settings) and five rows
- starting stock: the first is the count on hand, each next one the previous ending
- forecast demand: a number field per period, typed or stepped; empty is not known
- replenishment: the suggestion in its field, or a figure set by hand marked Set by hand with Back to the suggestion
- ending stock: the figure and a slim bar against the safety line on the product's own scale, with Below safety or Runs out in words
- ordered: what is on order against the plan (To order, ordered and short, ordered and over), with Order on a short month when the planner orders by hand, or how orders start otherwise
- order review (sheet): quantity (rounded up to the minimum order, said), supplier when bought, arrival date, the runs-out warning, Cancel and Create order
- planning settings (sheet): route, supplier, safety stock, minimum order, lead time, how orders start, each variant's lead time and minimum order (empty is not set); Save settings
States
- forecast loaded; an input edited; recalculating (the suggestions faded and the head says so); a refused forecast put back with the reason
- a manual override marked; reset to the suggestion
- under-ordered, over-ordered, met: in words on the ordered row
- not known: a missing count or forecast carried forward as not known
- order draft; late arrival warned; creating; refused (the review stays open with the reason); created (the number and the arrival said, the ordered row rises)
- settings: buying without a supplier refused in place; a variant's limit left empty stays not set; saving; saved with no order created; refused with the reason
- look only (canEdit false): figures without fields, no Order, the permission said
- loading: shaped skeletons; no products: an empty state
- phone: the grid scrolls sideways under the pinned row names; the sheets open full width
- right to left: the pinned column and the bars mirror
- reduced motion: through the tokens
- figures at rest (edit on hover or focus)
- phone: one period at a time
Keyboard
- Tab through each product's settings, then its demand and replenishment fields period by period
- In a field: ↑/↓ by one, Shift by ten, Enter commits; the reset and Order are buttons
- Escape closes a sheet without saving
Motion
Suggestions fade while they recalculate and come back when the answer arrives; the sheets slide in as the sheet does. Nothing runs at rest.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
periods (required) | PlanPeriod[] | — | |
products | PlanProduct[] | — | |
defaultProducts | PlanProduct[] | — | |
onProductsChange | ((products: PlanProduct[]) => void) | — | |
asOf | string | — | When the plan was calculated, ISO date. |
onForecastChange | ((productId: string, periodId: string, demand: number | null) => Promise<void | (number… | — | A forecast changed: resolve with the product's new suggestions (one per period), or reject to put it back. |
onOverride | ((productId: string, periodId: string, value: number | null) => Promise<unknown>) | — | A replenishment set by hand (a number) or back to the suggestion (null); reject to put it back. |
onOrder | ((draft: PlanOrderDraft) => Promise<{ number: string; }>) | — | Create one order; resolve with its number. Reject to keep the draft open with your reason. |
onPolicySave | ((productId: string, policy: PlanPolicy, variants: PlanVariant[]) => Promise<unknown>) | — | Save a product's planning settings; creates no order. Reject to keep the sheet open with your reason. |
canEdit | boolean | — | false: the person may read the plan but not change it or order. |
loading | boolean | — | |
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
Dependencies
lucide-react
Import
import { ProductionPlan } from "@beamline/production-plan";
Get it
Production plan 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 Manufacturing
- Shop floor: A workshop's shop floor at one workstation: each job is a card at its work centre with why it isn't ready said in words (parts short, or the previous…
- Production and lots: Stock made and stored, with every movement traceable. A batch of a recipe, read as a batch sheet: the recipe, batches (in halves) and day as one sentence…
- Print scheduler: A print shop's production schedule. The week by station: each station's day holds its runs, with a load bar and minutes used against the station's…
- Plan readiness: A solar plan on its way to a permit. The design checks (fire setback from the ridge, string voltage in the cold, roof load, eave and rake setbacks, the…
- Design inputs: What a solar design is checked against, and what the home really uses. Code standards and site conditions (building, electrical and fire codes, wind…
- Solar quote: A residential solar quote. The system's price at its rate per watt with adders, discounts and incentives each switched on or off: discounts come off one…
- Roof layout: The roof of a solar design. The roof in plan with every face's panels drawn as they lie under its roof type's rules (projected from the slope), each…
- Electrical design: The electrical side of a solar design. The existing service set up from a named way of connecting to it (a load-side breaker or a supply-side tap), the…
- Battery sizing: A home battery sized beside its solar. The model and how many with capacity, power and installed price; how it runs (kept full for an outage, storing…
- Field conditions: A farm's fields and what each one's conditions are. The fields as a searchable list (each with its outline, crop, area and the layer's value, or Not…
- Grazing plan: Mobs on a grazing rotation, on the farm's map: with a map base, its parcels are the paddocks, each filled by where it stands in the chosen mob's plan (on…
- Run of show: One service or event plan's order, run more than once: sections and items with each occurrence's start time in its own column, each item's length dragged…
- Sound library: A library of sounds (or any media a person auditions before using): a search by words and #tags with facets as filters, a live "3 filters · 12 results"…
- Tag manager: Tags for one or several items at once (sounds, photos, documents). Nested tag groups are edited in place (rename, new tag), and a folded group still says…