Payroll cycles
A React block (a whole screen) in Beamline's HR & payroll app.
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 stage asks of you, and the cutoff in the entity's own time zone with how long is left (a day away in the warning tint, passed in the danger tint). A cycle opens to its package: figures and files, each file downloaded on its own (downloading approves nothing), Approve bound to the revision on screen and confirmed with entity, period, headcount and total; a newer revision replaces it and approves nothing. Issues are reported several at once, each answered with its own request number or reason, and rejecting the package is a separate box. Who pays what keeps your funding and the provider's pay-out apart, your "I've paid" a declaration until confirmed, and an old status said until refreshed. The entity's record keeps identity, payroll facts and setup apart, each missing setup item saying what it holds up. A request to the provider stays scoped to an entity and a cycle.
Use it for
- A company paying people in several countries through a payroll provider: what each entity's cycle needs from you, before its cutoff.
- Approving a provider's payroll package, reporting issues on it, funding it, and keeping each legal entity's setup complete.
Not for
- Running your own pay period from hours, commission and tips (payroll-run).
- One request's approval route under a policy (approval-route).
- Expenses and contractor submissions waiting for a decision (payroll-approvals).
Anatomy
- header: the product's mark and title
- board: All / Waiting on you, then a card per cycle: entity and period, the stage as five steps in one hue, the stage's name, the cutoff with time left (or the pay date), the next action
- detail: entity and period, Ask the provider, the stages as a stepper, tabs Package, Who pays, Entity
- package: revision and when prepared, its state, figures (people paid, gross, employer costs, total to fund), files each with Download, Report issues, Approve revision n with the confirmation
- issues: each issue's where and what, Add another issue, Also reject this package, Send
- who pays: the status's age with Refresh, You pay and the provider pays, each obligation's tick, amount, due date and state, I've paid
- entity: identity with Edit (a sheet), payroll facts, setup with what each missing item holds up
- support: entity and cycle, what it's about, details, general support apart, Send, the receipt
States
- cycles: loading, none, none waiting on you
- a cutoff more than two days away, under two days (warning), passed (danger)
- stage: collecting changes, package to review, waiting for your funds, paying out, paid; setup missing puts Finish setup first
- package: none yet; waiting for approval; confirming; approving; approved; refused with the reason; replaced by a newer revision (nothing approved); a new package asked for
- file: downloading, downloaded, failed
- issues: drafting, sending, each sent with its reference or refused with its reason, nothing sent, rejected with them
- obligation: to do, late, declared (who and when), confirmed; declaring; declare failed; status old, refreshing, refresh failed
- entity: setup complete or n of m done; editing; saving; refused (draft kept)
- support: scope set, a cycle cleared by a new entity (said), sending, failed (draft kept), sent with its reference
- phone: the board, then one cycle with Back
- right to left: mirrors
Keyboard
- Tab through the filter, each cycle and its next action, the tabs, the files, Report issues and Approve; the confirmation starts on Cancel
Motion
None of its own.
Props
| Prop | Type | Default | Description |
|---|---|---|---|
entities (required) | PayrollEntity[] | — | |
cycles (required) | PayrollCycle[] | null | — | Each entity's current cycle; null while loading. |
packages | PayrollPackage[] | — | The packages the provider prepared, one per cycle at its latest known revision. |
obligations | Obligation[] | — | |
statusAsOf | string | — | When the payment statuses were last read (ISO instant). Older than 15 minutes is said until refreshed. |
onApprove | ((cycleId: string, revision: number) => Promise<ApproveAnswer>) | — | Approve exactly this revision. Resolve "replaced" with the newer package when one exists; nothing is approved. |
onDownload | ((cycleId: string, deliverableId: string) => Promise<void>) | — | Download one deliverable; downloading approves nothing. Reject to say it failed. |
onReportIssues | ((cycleId: string, revision: number, issues: IssueDraft[], reject: boolean) => Promise<… | — | Send issues on a revision, and reject the package only when `reject` is true. |
onDeclarePaid | ((obligationId: string) => Promise<{ by: string; at: string; }>) | — | Record that you paid an obligation: a declaration with who and when, not a receipt. |
onRefreshStatus | (() => Promise<{ obligations: Obligation[]; asOf: string; }>) | — | Read the payment statuses again. |
onSaveEntity | ((entity: PayrollEntity) => Promise<PayrollEntity>) | — | Save an entity's identity; resolve with the entity as saved, reject to keep the draft (said). |
onSupportRequest | ((request: SupportRequest) => Promise<{ reference: string; }>) | — | Send a request to the provider; resolve with its reference. |
onGeneralSupport | (() => void) | — | Not about a payroll cycle: your general support. |
now | string | — | The moment the board is read at (ISO instant); defaults to now. |
defaultCycle | string | null | — | |
defaultTab | Tab | — | |
defaultIssuesOpen | boolean | — | Opens the issues form on the package at the start. |
defaultSupportOpen | boolean | — | Opens the support request at the start, scoped to the chosen cycle. |
provider | string | — | The provider's name, said where it acts. |
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
- Alert Dialog
- Avatar
- Button
- Checkbox
- Copy button
- Description list
- Dialog
- Dropdown menu
- Empty state
- Input
- Label
- Radio cards
- Segmented control
- Select
- Sheet
- Skeleton
- Spinner
- Stepper
- Tabs
- Text morph
- Textarea
- Tooltip
Dependencies
lucide-react
Import
import { PayrollCycles, STAGES } from "@beamline/payroll-cycles";
Get it
Payroll cycles 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 run: 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…
- 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…