# Print scheduler

A React block (a whole screen) in [Beamline](https://beamline.io/)'s [Manufacturing](https://beamline.io/components/apps/manufacturing) app. Live demo: https://beamline.io/components/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 minutes a day (capacity in minutes, never pieces), runs without an estimate counted apart instead of as zero, and over capacity said and marked; runs with no day, no station or neither wait in a tray saying what they do have. Run cards show the fields of the saved view in its order (customer, pieces, estimate, production due, status in its colour). A run opens its imprint beside the schedule: the job (opened elsewhere, a failure said), production due and customer due kept apart, sizes and total, and its runs: each with pieces, an estimate (empty is no estimate), a day, a station of the right kind and a status; the pieces must add up to the job's before saving (short or over said as you type), a day's capacity is checked as runs are placed, removing a run first says how many pieces the rest keep, and all runs save together, a save someone beat keeping the edits until Reload; notes and files by audience (shop only or customer can see), files the viewer can't see counted, never shown; closing returns focus to the run. Saved views: the cards' fields chosen and ordered, the work shown, an unsaved layout said, shared with the team only when allowed, and deleting staged until saved. Stations and statuses: minutes a day with the hours beside them and whole-minute validation, archiving a station with runs on it refused with the count; each work type's statuses with a label and colour, moved up and down, and archiving one with runs in it refused with the count.

## Use it for

- Scheduling jobs onto machines or stations by day against capacity in minutes, with runs split across days and stations.
- Setting up stations' daily capacity and the statuses work moves through.

## Not for

- Monthly stock planning ([production-plan](https://beamline.io/components/production-plan)).
- One workstation's queue on the floor ([shop-floor](https://beamline.io/components/shop-floor)).
- Staff shifts ([shift-planner](https://beamline.io/components/shift-planner)).

## Anatomy

- head: Schedule or Stations and statuses; saved view, work shown, Save view, Delete view
- schedule: the tray of runs not placed; days across, stations down, each cell's runs and load
- imprint: job and Open job, the two dues, sizes, runs (pieces, estimate, day, station, status, remove), the allocation, notes and files by audience, Save runs
- views dialog: name, who sees it, fields with move buttons
- setup: stations (name, work, minutes a day, archive); statuses per work type (label, colour, moves, archive)

## States

- runs: no day and no station, station only, day only, placed, no estimate, over capacity
- imprint: runs balanced, short, over; remove preview; saving, saved, conflict, failed; no mockup; files hidden; job unavailable
- views: unsaved layout, personal, team, team not allowed, delete staged, saved
- setup: invalid minutes, archive refused, archived, unsaved, saved

## Keyboard

- Every run is a button; placing a run is done with labelled fields in its imprint instead of dragging
- Fields in a view and statuses move with Move up and Move down buttons naming them

## Motion

Load bars grow to their new share. Nothing runs at rest.

## Props

| Prop | Type | Default | Description |
| --- | --- | --- | --- |
| `imprints` (required) | `Imprint[]` | — |  |
| `stations` (required) | `Station[]` | — |  |
| `workTypes` (required) | `WorkType[]` | — |  |
| `days` (required) | `string[]` | — | The days shown (ISO dates), usually a work week. |
| `views` | `SavedView[]` | — |  |
| `canShareTeam` | `boolean` | — | Whether this person may share views with the whole team. |
| `onSaveRuns` | `((imprintId: string, splits: Split[]) => Promise<unknown>)` | — | Saves one imprint's runs together; reject with ScheduleConflict if they changed meanwhile. |
| `onReloadImprints` | `(() => Imprint[])` | — | The imprints as saved now, after a conflict. |
| `onOpenJob` | `((jobId: string) => Promise<unknown>)` | — |  |
| `onSaveView` | `((v: SavedView) => Promise<unknown>)` | — |  |
| `onDeleteView` | `((id: string) => Promise<unknown>)` | — |  |
| `onSaveStations` | `((s: Station[]) => Promise<unknown>)` | — |  |
| `onSaveWorkTypes` | `((t: WorkType[]) => Promise<unknown>)` | — |  |
| `defaultView` | `PrintSchedulerView` | — |  |
| `defaultActiveView` | `string \| null` | — |  |
| `defaultOpen` | `{ imprintId: string; splitId?: string \| undefined; } \| null` | — | Initial open state when uncontrolled; defaults to false. |
| `locale` | `string` | — |  |
| `className` | `string` | — | Classes on the documented visual root; no override by default. |
| `style` | `CSSProperties` | — | Inline styles on the documented visual root; no overrides by default. |
| `ref` | `Ref<HTMLDivElement>` | — | Receives the documented native target or imperative handle; omitted by default. |

## Built from

- [segmented-control](https://beamline.io/components/segmented-control)
- select
- [multi-select](https://beamline.io/components/multi-select)
- [number-field](https://beamline.io/components/number-field)
- input
- checkbox
- [radio-group](https://beamline.io/components/radio-group)
- dialog
- sheet
- button

## Dependencies

`lucide-react`

## Import

```tsx
import { PrintScheduler } from "@beamline/print-scheduler";
```

## Get it

Print scheduler is part of Beamline UI. Install the parts you need in your React app as compiled packages or editable source. [Get Beamline](https://beamline.io/checkout?pack=complete) · [Connect your agent](https://beamline.io/connect)

## More in Manufacturing

- [Shop floor](https://beamline.io/components/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 plan](https://beamline.io/components/production-plan): A production plan by month: each product's starting stock, forecast demand, replenishment and ending stock, every ending rolling into the next month's…
- [Production and lots](https://beamline.io/components/production-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…
- [Plan readiness](https://beamline.io/components/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](https://beamline.io/components/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](https://beamline.io/components/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](https://beamline.io/components/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](https://beamline.io/components/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](https://beamline.io/components/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](https://beamline.io/components/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](https://beamline.io/components/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](https://beamline.io/components/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](https://beamline.io/components/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](https://beamline.io/components/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…

Part of [Beamline UI: polished, editable React components and complete screens for custom applications](https://beamline.io/). [Build your own style from any look; tokens, fonts, radii, motion; not only colours](https://beamline.io/docs/customize).
