ValyroUI Русская версия

Approval Flow

Multi-stage approvals: sequential and parallel stages, decisions with reasons, history. Pro · Work and teams › Sales and processes

Installation

npx valyro-cli@latest login
npx valyro-cli@latest add approval-flow
npm install valyro-ui-pro

import 'valyro-ui-pro/styles.css';
import { ApprovalFlow } from 'valyro-ui-pro';

Props

PropTypeDefault
stagesApprovalStage[]Controlled stages; use with onStagesChange.
defaultStagesApprovalStage[]Initial stages when uncontrolled.
onStagesChange(stages: ApprovalStage[]) => voidCalled with the new stages when it changes.
historyApprovalHistoryEntry[]Controlled history; use with onHistoryChange.
defaultHistoryApprovalHistoryEntry[]Initial history when uncontrolled.
onHistoryChange(history: ApprovalHistoryEntry[]) => voidCalled with the new history when it changes.
currentUserIdstringApprover id of the person viewing; shows the decision bar when it is their turn.
onDecision(decision: ApprovalDecisionInput) => unknownCalled when the current user decides. May return a promise: the dialog waits and shows a rejection as an error; the stages and history update once it resolves.
onComment(comment: string) => unknownCalled with a new comment; it is added to the history as well.
titleReactNodeRequest title.
descriptionReactNodeRequest summary under the title (amount, vendor, links…).
requester{ name: string; src?: string }Who submitted the request: avatar and "Requested by" line in the header. Also the author of comments posted when the current user isn't one of the approvers.
hideHistorybooleanfalseHide the activity column.
localestringBCP 47 locale for numbers and dates; defaults to the ThemeProvider's, then the browser's.
labelsPartial<ApprovalFlowLabels>Overrides for the built-in English text; keys left out keep their defaults.

Related components

  • CRM Pipeline — Deal pipeline: stages, amounts and probabilities, drag between stages
  • Goal Tracker — OKRs: objectives and key results, statuses, confidence, check-ins with history
  • Onboarding Checklist — Onboarding checklist: progress, hints with CTAs, dismissal and celebration
  • Course Path Navigator — Course map: modules, locks, progress and skills, a list on narrow screens
  • Calendar View — Event calendar
  • Scheduler — Scheduler: day, week, month and resource timeline, drag and drop, recurrence
  • Kanban Board — Task board
  • Gantt Chart — Gantt charts with dependencies and drag to reschedule
  • Booking Slots — Meeting booking: calendar, slots in the guest’s time zone, form and confirmation
  • Team Members — Team members: roles, email invites, pending invitations, seat count
  • Org Chart — Org chart: zoomable, pannable tree with search and collapsible branches
  • Activity Feed — Activity feed

Previous: CRM Pipeline · Next: Goal Tracker · All Work and teams