recruit/candidate-add-to-job-popover · CandidateAddToJobPopover

Add to job popover

Adds one or more people to a job: pick the job and the stage they land at, then confirm. Optionally, have them assessed instead.

Riley Okafor · GTM Engineer

Pick a job and a stage, then confirm.

Install

With your coding agentInstall RecruiterOS/recruit-ui and add an add to job popover that picks the job and the stage.
With the shadcn CLIpnpm dlx shadcn@latest add RecruiterOS/recruit-ui/recruit-workflows

Props

PropTypeWhat it does
jobsrequiredreadonly CandidateAddToJobOption<TJob>[]The jobs people can be added to, in order.
stagesrequiredreadonly CandidateAddToJobOption<TStage>[]The stages they can land at, in order.
defaultStageTStageThe stage picked each time the popover opens. Defaults to the first stage, as does a value `stages` doesn't list.
defaultJobTJobThe job picked each time the popover opens, such as a suggested match. A value `jobs` doesn't list, such as a job the person was just added to and the host has since left out, counts as no pick.
countnumberHow many people this adds; the default heading says so when it is more than one.
onConfirmrequired(job: TJob, stage: TStage) => void | Promise<void>Adds the people to the picked job at the picked stage. The popover closes once it settles; if it throws, it stays open with its choices, so report the failure here.
assessorsreadonly CandidateAddToJobOption<TAssessor>[]Who or what can assess people for the job instead of a stage being set, such as a screening checklist. With `onAssess`, a toggle offers this second mode.
onAssess(job: TJob, assessor: TAssessor) => void | Promise<void>Adds the people to the job and has the picked assessor assess them.
assessIconElementTypeThe assess mode's glyph, on its toggle and submit button.
triggerReactNodeThe element that opens the popover. Defaults to an outline "Add to job" button.
align"start" | "center" | "end"Where the popover lines up with its trigger. Defaults to `start`.
emptyCandidateEmptyCopyThe empty state inside the job select when there are no jobs.
labelsPartial<CandidateAddToJobPopoverLabels>

Data

The component takes plain values and callbacks and keeps no records of its own. Pass it yours, from the Kith data layer or from a backend you already run.