Roster publishing

A React block (a whole screen) in Beamline's HR & payroll app.

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 published, changed since published) keyed over the week with counts. Publishing leads with what goes out (shifts and people told) and its reach as one sentence, its controls opened on request: the areas chosen, changes only or the whole week, every part of a shift linked across areas pulled in with it (said in the panel and outlined on the grid), who will be told and whether they must confirm, and the count of shifts and people on the button. Published with messages still on their way is said apart from published, a shift your app refuses is named while the rest go out, and swap requests both people agreed to sit beside it with the roster after the swap in words; a stale swap changes nothing. Shifts chosen on the week open the tools: fill open shifts from your app's proposal (each person with why, gaps left open with theirs), link one person's shifts of a day into one (the time between them said), ask eligible people to cover a shift (first to claim gets it; an undelivered message named), and copy last week as unpublished shifts, skipping copies that clash. Nothing there publishes.

Use it for

  • A manager sending a week's shifts to staff: cafés, shops, warehouses, care homes, events.
  • Anywhere a publish must show its reach first (what goes, who is told) and a partial failure must name what didn't go.

Not for

Anatomy

  • header: the product's mark, the title and the week
  • key over the week: Not published and Changed since published with their counts, and the outline for what goes out; grid: areas down, days across (the area column pinned when the week scrolls); each shift a chip with who (or Open shift) and hours, its state its tone (said in its name), linked parts marked n/N; what the publish carries outlined
  • tools (top of the side): how many shifts are chosen, Fill N open shifts, Link N shifts, Ask someone to cover, Copy last week, Clear; each opens its proposal or form in place with Cancel and its apply
  • publish panel: the count of shifts and people told, the linked parts pulled in, the reach as one sentence (what, where, who is told, confirm) with Change what goes out opening the areas (checkboxes), What to publish, Tell people and Ask people to confirm; Publish N shifts
  • the outcome: shifts published, messages on their way, confirmations outstanding, the shifts refused with why
  • requests: each swap with who agreed, the roster after it in words, Decline and Approve swap

States

  • no changes to publish; areas chosen; scope widened by linked shifts (said, outlined); nobody told (confirmation off); publishing
  • published with deliveries pending; confirmations outstanding; a partial failure naming each refused shift; nothing published (the reason)
  • swap waiting; approved (the grid shows it, marked changed); declined (nothing changed); stale (refused, nothing changed)
  • tools: chosen shifts filled (inverted plate); a fill proposal with people and reasons, shifts left open with theirs; a link preview with the time between parts; a cover form with ineligible people disabled and why; asked, with undelivered messages named; a copy preview with clashes skipped; applied, never published; a refusal changes nothing
  • look only: no panel controls, the permission said
  • loading: shaped skeletons; no shifts: an empty state
  • phone: the grid scrolls sideways under the pinned areas; the panel and requests below
  • right to left: the grid and panel mirror
  • reduced motion: through the tokens

Keyboard

  • Each shift chip is a toggle button (Enter or Space chooses it for the tools)
  • Tab through the area checkboxes, the two radio groups (arrows inside), the switch and Publish; then each request's Decline and Approve swap
  • Each shift chip is read with who, when, where and whether it is published

Motion

Nothing moves beyond the parts' own feedback. Nothing runs at rest.

Props

PropTypeDefaultDescription
areas (required)RosterArea[]—
days (required)string[]—The seven days shown, ISO dates, Monday first (or your week's first day).
shiftsRosterShift[]—
defaultShiftsRosterShift[]—
onShiftsChange((shifts: RosterShift[]) => void)—
requestsSwapRequest[]—
onPublish((draft: PublishDraft) => Promise<void | PublishResult>)—Publish the chosen shifts; resolve with what failed (the rest are published), or reject when nothing was.
onSwap((requestId: string, decision: "approve" | "decline") => Promise<unknown>)—Approve or decline a swap; reject (a changed shift) to change nothing.
canPublishboolean—
loadingboolean—
productstring—Your product's name, shown as its mark.
classNamestring—Classes on the documented visual root; no override by default.
refRef<HTMLDivElement>—Receives the documented native target or imperative handle; omitted by default.
onAutofill((shiftIds: string[]) => Promise<AutofillProposal>)—Propose people for chosen open shifts; your app applies its rules (availability, training, hours).
onLink((shiftIds: string[], linkId: string) => Promise<unknown>)—Join one person's shifts into one linked shift; reject (a shift changed meanwhile) to keep them apart.
eligibleFor((shiftId: string) => { name: string; reason?: string | undefined; }[])—Who can be asked to cover a shift, and why someone can't.
onAskCover((shiftId: string, people: string[], message: string) => Promise<void | { failed?: stri…—Ask people to cover a shift (the first to claim gets it); resolve with any whose message failed.
previousWeekRosterShift[]—Last week's shifts, offered as unpublished copies one week later.
onCopy((copies: RosterShift[]) => Promise<unknown>)—
defaultSelectedstring[]—Shifts chosen for the tools when the screen opens.

Built from

Dependencies

lucide-react

Import

import { RosterPublish } from "@beamline/roster-publish";

Get it

Roster publishing 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…
  • 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 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…

Part of Beamline UI: polished, editable React components and complete screens for custom applications. Build your own style from any look; tokens, fonts, radii, motion; not only colours.