Service tasks
A React block (a whole screen) in Beamline's Inventory app.
A fleet shop's maintenance setup. Tasks: active and archived, searchable, main tasks and their subtasks told apart in words, archiving refused while reminders use a task (said with how many); a task opened with its name (a duplicate refused), description, subtasks, default parts with quantities, the inspection it asks for and expected labour (unknown said), all said to be defaults that never mark parts used, and the provider codes grouped under it, where a code that moves from another task is said before saving. The meter field: set up beside the field as the driver meets it, where a required reading and a new photo hold back submitting, a reading below the last one is said, and a gallery photo from before the inspection doesn't count. Completion rules: what a work order needs to close (a meter reading with vehicle types excepted, every line done, the inspection, a repair priority, documents), for work orders opened after saving.
Use it for
- Setting up a vehicle or equipment shop: the tasks it does, how outside providers' codes map to them, the inspection's meter reading and what closes a work order.
- Anywhere an inspection must prove a fresh reading, and a policy change must not reach work already open.
Not for
- Running the work orders themselves (shop-floor).
- Planning stock and replenishment (production-plan).
- A general settings page (settings).
Anatomy
- header: the product's mark and the title
- tabs: Tasks, Meter field, Completion rules
- tasks list: Active and Archived with counts, search, each task with Task with N subtasks or Subtask of …, and reminders using it
- task: name as the title (edits in place; a duplicate refused there), Archive or Restore (with why not), description (edits in place), inspection and expected labour as a line of facts (a menu and a number in place), subtasks and default parts as lists (a part's quantity in place, remove on hover or focus, Add from a menu), the defaults note as a hint, provider codes with add and remove and what moves, Save
- meter field: label, help, required, second meter, new photo required (with what counts); beside it the field as the driver meets it: reading with unit, second reading or why not, Take the photo, Use a photo from the gallery, Submit inspection and what is still needed
- completion rules: meter reading with the excepted vehicle types, every line done, inspection, repair priority, show documents, require documents, the note on open work orders, Save
States
- task: active, archived; main with subtasks, subtask of others; archive refused while reminders use it; a duplicate name refused; unknown labour
- codes: none; mapped; moving from another task (said); cancel (Discard) changes nothing
- meter preview: reading missing; below the last reading; second meter absent; photo missing; gallery photo too old (said); fresh photo; submitted
- rules: meter with exceptions; documents required turns showing them on
- unsaved; saving; saved; refused with the reason (the draft kept)
- look only: no fields or Save, the permission said
- loading: shaped skeletons; no tasks: an empty state
- phone: the list, then the task with Back; the meter setup over its preview
- right to left: the layout mirrors
- reduced motion: through the tokens
Keyboard
- Arrows between the tabs; Tab through the list, the task's fields and its add selects, the preview's fields and buttons, the rules' switches, then Save
Motion
Nothing moves beyond the parts' own feedback. Nothing runs at rest.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
defaultTasks (required) | ServiceTask[] | — | |
partOptions | { part: string; unit: string; }[] | — | |
inspectionOptions | string[] | — | |
providerCodes | ProviderCode[] | — | Every provider code there is, mapped or not (a code belongs to one task at a time). |
defaultField (required) | MeterField | — | |
vehicle (required) | PreviewVehicle | — | |
defaultRules (required) | CompletionRules | — | |
vehicleTypes | string[] | — | |
onPhoto | ((source: "camera" | "gallery") => Promise<{ takenAt: string; }>) | — | A photo from the camera now, or from the phone's gallery (an older file); your app reads when it was taken. |
inspectionStartedAt | string | — | The time a new photo must be after (the inspection's start), ISO. |
onSaveTask | ((task: ServiceTask) => Promise<unknown>) | — | |
onArchive | ((taskId: string, archive: boolean) => Promise<unknown>) | — | |
onSaveField | ((field: MeterField) => Promise<unknown>) | — | |
onSaveRules | ((rules: CompletionRules) => Promise<unknown>) | — | |
defaultTab | "meter" | "rules" | "tasks" | — | |
defaultTaskId | string | — | |
canEdit | boolean | — | |
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
- Avatar
- Badge
- Button
- Dropdown menu
- Empty state
- Inline edit
- Input
- Label
- Multi-select
- Number field
- Segmented control
- Select
- Skeleton
- Spinner
- Switch
- Tabs
- Text morph
- Tooltip
Dependencies
lucide-react
Import
import { ServiceTasks } from "@beamline/service-tasks";
Get it
Service tasks 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…
- 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…
- 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…