Ballmac UI home

Work order 1: repair job

A repair work order: customer, item and reported fault, five steps with one button to advance, parts and labour with subtotal, tax and total, a line form, one-click customer messages, and the history so far.

State

The normal view. Pick a state to see what the block shows while it loads, is empty or fails.

Open in v0 (opens in a new tab)

Installation

$ pnpm dlx shadcn@latest add @ballmac/workorder-1

Usage

Example: workorder-1-demo.tsx
"use client"

import { Workorder1 } from "@/components/ballmac/blocks/workorder-1/workorder-1"

export default function Workorder1Demo() {
  return <Workorder1 onAdvance={() => new Promise((r) => setTimeout(r, 400))} onAddLine={() => new Promise((r) => setTimeout(r, 300))} onMessage={() => new Promise((r) => setTimeout(r, 400))} />
}

States

Pass state and the block does the rest: skeletons that match its layout, a clear empty message, an error you can retry, and announcements for screen readers.

  • Loading

    Skeleton for the header, steps and totals under the page, announced as loading.

    state="loading"
  • No work order selected

    Says no work order is selected; pass order={null} and emptyState sets the copy.

    state="empty"
  • Could not load

    An alert saying nothing was changed, with Try again (onRetry). A failed advance, line or message says why.

    state="error"

Dependencies

Use with AI

A repair work order. <Workorder1 order={{ id, customer, item, issue, status: 'received' | 'diagnosing' | 'waiting-parts' | 'repairing' | 'ready', lines: [{ id, kind: 'part' | 'labour', description, qty, unit }], history: [{ id, time, text }] }} currency='USD' taxRate={0.2} messages={[{ id, label, text }]} onAdvance={(status) => Promise} onAddLine={(line) => Promise} onMessage={({ id, text }) => Promise} />. Totals are computed from the lines. Advancing, adding a line and messaging each update the screen and the history. With the shadcn MCP server set up (guide), ask your agent:

Add the Ballmac UI Work order 1: repair job (@ballmac/workorder-1) to this project with the shadcn MCP, then use it where it fits.

Use it for

  • A repair shop, workshop or service desk's job page
  • Any job with steps, billable lines and customer updates

Not for

  • A support ticket thread; use tickets-1
  • An invoice for sending; use invoice-1

Registry JSON: https://ui.ballmac.com/r/workorder-1.json

Free to use in personal and commercial projects.

Ballmac UI Pro

Need the whole screen, not one piece?

150 premium blocks (dashboards, settings, calendars, mail, shops, onboarding), a private shadcn registry and Figma tokens. Blocks that show data come with loading, empty and error states built in.

Not ready? Try three Pro blocks free

Leave your email and the blocks appear right here, ready to copy. Yours to use in any project.