Payroll run
A React block (a whole screen) in Beamline's HR & payroll app.
A pay period from report to submission, one payroll account at a time (a worker on two accounts is on both runs, never combined): the workers on one money scale, each bar split into hours, commission and tips, each part named on itself where its name fits, and said in words (clocked or scheduled hours × rate, commission on what), a name pressed opening that pay step by step (explainable-total); a worker taken out of the run with the reason, the totals and the debit on Submit rolling with it; a report changed since review drawing each changed worker's old pay as a mark and their new bar until recalculated, Submit waiting; taxes, take-home, employer contributions and the debit only once the provider has quoted (never $0: not quoted said, ask again); the cutoff in the provider's time zone, and here (with its weekday) only when the zones differ; Submit repeating account, pay date and debit; submitted, processing and paid kept apart as their own receipts. One more part travels with it: PayrollHistory, past runs as evidence: by pay date with period, status and total cost; a run's figures as one sum that adds up (gross, less tax withheld, take-home; plus employer contributions, the total cost), the bank's debit said apart when it doesn't match; a worker's statement with this run and the year to date, leave in words (Unlimited, 24 hours left), Back to the same row.
Use it for
- Reviewing and submitting a pay run to a payroll provider: salons, spas, clinics, restaurants, studios, any hourly-and-commission team.
- Checking how each worker's pay was reached, and that what is submitted is what was reviewed.
- PayrollHistory: checking what past runs cost and reconciling them with the bank; answering a worker about their pay to date.
Not for
- Time clock or schedule editing.
- Invoices to contractors.
Anatomy
- header: the product's mark, the title and the payroll account (one run each)
- sheet head: the account, period and locations; the stages (stepper): Review, Submitted, Processing, Paid, each with its receipt's time
- changed report (status): how many workers' pay changed, and Recalculate
- workers: each a row with the name (a button opening the pay's steps), role and the other account they're also paid on, the gross (a rolling figure), the In this run switch, the bar on the run's one scale (hours, commission, tips, named where they fit; a dashed mark at the old pay when the report changed; hollow when out) and the basis in words (or Not in this run: the reason); a row changing height glides the rows below
- a worker's pay opened: explainable-total with hours, commission, tips and tax withheld (the provider's quote)
- totals (aside, sticky; first on a phone): workers, gross, tax withheld, take-home, employer contributions, the debit; Not quoted yet in place of any figure without a quote, with Ask again when the provider couldn't answer
- dates: the pay date and the cutoff in the provider's time zone with its time here
- Submit: repeats the account, pay date and debit; says what it waits for (the quote, the recalculation) instead
- PayrollHistory: Past runs (pay date, period · status, total cost); the open run: Paid on …, account · period · status, the sum, the bank's debit (matches / more / less / not shown yet), its workers; a statement: Back to the run, the worker, This run and Year to date for gross, tax withheld, take-home, Leave in words
States
- review: the run editable; Submit when quoted and recalculated
- report changed: old pay marked, new bars drawn, Submit waits for Recalculate
- quote pending or unavailable: Not quoted yet (never $0); Ask again; Submit waits
- a worker out of the run: hollow bar and its reason; the totals and debit roll
- submitted: the receipt's time and who; processing waits for the provider; paid lands on the pay date, each said apart
- submit refused: nothing sent, said under Submit
- look only (canRun false): switches and actions disabled, the permission said
- loading: shaped skeletons; no run: an empty state
- phone: the totals first, then the workers
- right to left: bars fill from the right; words keep their order
- reduced motion: bars and figures change at once
- PayrollHistory: a bank debit that doesn't reconcile; not shown yet; no past runs; loading
Keyboard
- Tab through the account, each worker's name (Enter opens the pay's steps) and switch, Recalculate, Ask again and Submit
Motion
Bars glide to new pay by translate (each layer reaching to where its part ends) when a report is recalculated or a worker is taken out; the figures roll (slot-text). Nothing runs at rest; reduced motion changes at once.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
runs | PayRun[] | — | The runs, one per payroll account, controlled with onRunsChange; or defaultRuns. A provider's later news (processing, paid) arrives as new runs. |
defaultRuns | PayRun[] | — | The starting runs when uncontrolled. |
onRunsChange | (runs: PayRun[]) => void | — | After a worker is taken in or out, a recalculation, a new quote or a submit. |
account | string | — | The open run's id (one per payroll account). |
defaultAccount | string | — | The run open at first. |
onAccountChange | (id: string) => void | — | Another account chosen. |
onRecalculate | (runId: string) => Promise<PayRun> | — | Take the changed report into the run; resolve with the run recalculated (its new quote too). |
onRequote | (runId: string) => Promise<Record<string, WorkerQuote>> | — | Ask the provider for the tax quote again; resolve with it, reject when it still can't answer. |
onSubmit | (runId: string) => Promise<unknown> | — | Submit the run to the provider; resolve when it has it. Processing and paid arrive later as new runs. |
by | string | — | Who is submitting, written on the receipt. |
timeZone (required) | string | — | Where the salon is: receipts are said in its time, and the provider's cutoff in this time too when it differs. |
currency (required) | string | — | ISO 4217 code ("USD"). |
canRun | boolean | — | false: the person may look but not change or submit the run. |
loading | boolean | — | Shaped skeletons while the run loads. |
now | number | — | The clock, for the receipt the block writes itself. Default the device's. |
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. |
PayrollHistory: runs / defaultOpen / currency | PastRun[] / string / string | — | Past runs newest first, each with its workers' current and year-to-date pay, the employer's contributions and the bank's debit (null while not seen). history.ts has runFigures for your server. |
Built from
- Avatar
- Button
- Empty state
- Explainable total
- Label
- Number field
- Select
- Skeleton
- Slider
- Slot text
- Spinner
- Stepper
- Switch
- Tooltip
Dependencies
lucide-react
Import
import { PayrollRun, PayrollHistory } from "@beamline/payroll-run";
Get it
Payroll run 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 HR & payroll
- Shift planner: A workplace's week of staff shifts against what it needs: a row per person with their week's hours against their contract, each day a 24-hour track with…
- Shift rotations: Rotating shift patterns from pattern to people: a pattern of one to four weeks painted day by day with a shift template, a rest day or nothing (pick the…
- Roster publishing: The week's roster before it goes out: areas down the side and days across, each shift a chip with who works it and its hours, its state its tone (not…
- My shift: The worker's own shift on their phone: today drawn to scale (the plan's areas as blocks on an hour axis, under them what was worked: on-plan time in…
- Timesheet review: Timesheets for a manager: the day's counts at the head (scheduled, on shift, late, on break, to approve), the ones that filter being buttons, an…
- Hours ledger: One worker's pay cycle of shifts, for the worker or their payroll admin: the wall-clock span and the paid hours as separate columns, a night shift…
- Payroll cycles: The client's side of an outsourced payroll across countries: every entity's current cycle on one board, its stage drawn as steps, the one thing that…
- Payroll approvals: Payroll approvals for a company paying through a payroll provider. Expenses are split by whose move it is (you, another approver, the employee answering…
- Benefit changes: An employee's benefit changes after a life event. The centre puts their turn first: each task (a proof to upload, with its deadline in the warning tint…
- Hiring pipeline: A recruiting team's pipeline across every open job. Stage groups (reviewing, interviewing, closing) are counted across jobs above job sections that fold…
- Recruiter home: A recruiter's own work, in one place. Upcoming interviews with who sits in, today's first; feedback owed, overdue first and on the danger tone, written…
- Stage reports: Reports on how applications move through stages, built from each application's stage intervals. By week: applications present in each stage (or from each…
- Link booking: A candidate's booking link for one stage of one job: a column with the job, the stage's length, who they meet (each with their role), where and what the…
- Team & members: The people page of a workspace: seats used against the plan, members and pending invitations in one list with search and a role filter, role changes that…