Calm motion: animations on this site only fade, with no movement
Approval flow
The steps of a request, with approvers and their decisions
Shows who must sign off a request, in which order, and what each person decided. If it is the turn of the reader, they can approve or reject. For steps that one person goes through, use the stepper.
Basic
Waiting for: Producer review
- Edit is finalApprovedAll must approve
- Budi SantosoApproved15 Nov, 16:20
- Producer reviewWaitingOne approval is enough
- Ana PutriWaiting
- Citra DewiWaiting“I listen tonight.”
- Sponsor checkWaitingAll must approve
- Sponsor teamWaiting
stepsis a list of steps in order. Each step has anid, atitle, a list ofapprovers, and arule.- Each approver has a
name, and an optionalavatar,decision,note, andtime. The decision isapproved,rejected, orpending. - With the rule
all(default), every approver must approve. Withany, one approval is enough. One rejection rejects the step. - The current step is the first step that is not approved. The line at the top says what the flow waits for, or that it is done or stopped.
meis the name of the reader. If the reader is a waiting approver of the current step, a note field and the Approve and Reject buttons show. A decision emitsdecidewith the step id, the decision, and the note. Save it, then updatesteps.- Each step and each decision has a mark and a word, so the state does not rest on the color. Change the words with
labelsor a label pack:title,approved,rejected,pending,approve,reject,note,all,any,done,stopped, andwaiting(a function of the step).
Usage
ts
import { BlessApprovalFlow } from "blessing-ui";API
Props
| Name | Type | Default | Description |
|---|---|---|---|
steps* | BlessApprovalStep[] | — | |
me | string | — | the name of the reader: if they are a waiting approver of the current step, they get the buttons |
labels | Partial<Record<BlessDecision, string> & { title: string; approve: string; reject: string; note: string; all: string; any: string; done: string; stopped: string; waiting: (step: string) => string; }> | — |
Events
| Name | Payload | Description |
|---|---|---|
decide | [stepId: string, decision: "approved" | "rejected", note: string] |