recruit/candidate-client-decision · CandidateClientDecision

Client decision

A client's Yes or No on a candidate, with why: the action row of a card on a shortlist the client reviews.

Sam Lindqvist · RevOps Lead at Sample Analytics

Sam Lindqvist is waiting for the client's answer.

Install

With your coding agentInstall RecruiterOS/recruit-ui and add a client's yes or no, with a reason, to each card of a shortlist.
With the shadcn CLIpnpm dlx shadcn@latest add RecruiterOS/recruit-ui/recruit-workflows

Props

PropTypeWhat it does
candidateNamerequiredstringThe candidate's name as the dialog should say it.
decisionCandidateDecisionChoice | nullThe answer already recorded, if any.
reasonReactNodeThe reason recorded with it, shown under the answer.
onDeciderequired(decision: CandidateDecisionChoice, reason: string) => Promise<void>Saves the answer and its reason. The dialog stays open, its buttons disabled, until the promise settles, then closes. When the promise rejects, the buttons come back with an error line under them. The reason is an empty string when `reasonOptional` let the client answer without one.
suggestions{ yes?: readonly string[]; no?: readonly string[]; }One-tap reasons for each answer, already worded.
reasonOptionalbooleanLets the client answer without a reason: the dialog still asks why, and saves with none given. The reason is required without it.
reasonPromptCandidateClientDecisionReasonPromptHow the reason is asked for. `dialog` (the default) is a typed reason in `CandidateDecisionReasonDialog`. `sheet` is the voice-first `CandidateDecisionReasonSheet`: speaking is the default, a suggested reason is one tap, typing is a tap away, and Skip saves with no reason where `reasonOptional` allows it. The sheet holds itself on a saving state while `onDecide`'s promise is pending and, when it rejects, keeps the reason and says so there, so the row shows no error of its own. If the sheet can't be downloaded, the row asks in the dialog.
reasonSheetCandidateClientDecisionSheetProps | ((decision: CandidateDecisionChoice) => CandidateClientDecisionSheetProps)The sheet's own settings for `reasonPrompt="sheet"`, or a function of the answer being explained that returns them, for wording that names the answer.
readOnlybooleanShows the answer and takes none, for someone looking at a client's shortlist who can't answer for them: the recorded answer in words (`labels.readOnlyYes`, `labels.readOnlyNo`) with its reason, or `labels.unanswered`, and no Yes, No or Change. `onDecide` is never called.
disabledbooleanHolds Yes, No and Change without hiding them, such as while the page the row sits on is loading someone else. A reason being asked for when it turns on is dropped, and nothing is decided.
padding"default" | "none"`default` is the action row of a review card: inset like the card, under a keyline. `none` sits the row flush, with no keyline, in a container that already pads and rules it, such as a section of a profile.
labelsPartial<CandidateClientDecisionLabels>

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.