Skip to content
GitHub
Browse the docs

Approvals and close

Approval chain

ApprovalChain

Approval in levels with amount limits and substitutes. An agent reads where it stands; only the right person decides.

The person sees

Waiting

  1. ManagerCan decide now: Kari, Per
  2. CFOWaiting
Install
booki_version=$(npm view @booki-aui/react@latest version) &&
ui_sdk_version=$(npm view "@booki-aui/react@$booki_version" peerDependencies.@ui-sdk/core) &&
pnpm add --save-exact "@booki-aui/core@$booki_version" "@booki-aui/react@$booki_version" "@booki-aui/styles@$booki_version" \
  "@ui-sdk/core@$ui_sdk_version" "@ui-sdk/react@$ui_sdk_version"

Try the bridge

Open this page in a browser and run the example in the console with a fresh preview. Read the current ref from the snapshot before acting.

Console
const { agent } = window
const entry = agent.snapshot().filter(
  (entry) => !entry.offPage && entry.component === "approval-chain",
)[0]
const { status, currentLevel, mayDecide } = entry
console.log({ status, currentLevel, mayDecide })

The demo reports pending at the Manager level. Kari and Per may decide.

Import from @booki-aui/react. For Booki's default styling, add import "@booki-aui/styles".