Skip to content

approval

One card per row waiting for a decision, with Approve and Reject, such as an order an agent may not place on its own.

source names a source of the screen whose rows wait for a decision (at most 20 cards); title and text are the columns each card shows. approve and reject each set one column to a value on that row (label defaults to Approve and Reject). Filter the source with where so only the waiting rows show; once decided, a row leaves it. Each decision is a write with the form token, and the card says what it will set before it does.

When to use

Use it when

  • An agent asked a person to decide, such as an order over $500.

  • A change waits for a second person, such as raising an agent's budget.

  • A short queue of requests one person works through, one card each.

Use another block when

An order waiting for a manager

New starter laptop for R. Patel

Procurement agent

approval:
  source: pending
  title: subject
  text: requester
  approve: { label: Approve the order, column: status, value: Approved }
  reject: { label: Send back, column: status, value: Needs a person }
<a id="approval-1"></a>

- **New starter laptop for R. Patel** — Procurement agent · sel=48231 · "Approve the order" #approval-1.approve · "Send back" #approval-1.reject

- #approval-1.approve "Approve the order": POST /a/catalog/{screen}/act/approval-1/approve · sel=the card's row id; sets status = Approved · approval: no · cost: write
- #approval-1.reject "Send back": POST /a/catalog/{screen}/act/approval-1/reject · sel=the card's row id; sets status = Needs a person · approval: no · cost: write

Turning on a new agent

Facilities agent

Books meeting rooms and logs broken devices

approval:
  source: drafts
  title: name
  text: summary
  approve: { label: Turn on, column: state, value: 'On' }
  reject: { label: Keep as a draft, column: state, value: Draft }
<a id="approval-1"></a>

- **Facilities agent** — Books meeting rooms and logs broken devices · sel=7 · "Turn on" #approval-1.approve · "Keep as a draft" #approval-1.reject

- #approval-1.approve "Turn on": POST /a/catalog/{screen}/act/approval-1/approve · sel=the card's row id; sets state = On · approval: no · cost: write
- #approval-1.reject "Keep as a draft": POST /a/catalog/{screen}/act/approval-1/reject · sel=the card's row id; sets state = Draft · approval: no · cost: write

A budget raise

Procurement

Budget 80% used on the 9th; asks for $180 a month

approval:
  source: raises
  title: agent
  text: reason
  approve: { column: state, value: approved }
  reject: { column: state, value: declined }
<a id="approval-1"></a>

- **Procurement** — Budget 80% used on the 9th; asks for $180 a month · sel=3 · "Approve" #approval-1.approve · "Reject" #approval-1.reject

- #approval-1.approve "Approve": POST /a/catalog/{screen}/act/approval-1/approve · sel=the card's row id; sets state = approved · approval: no · cost: write
- #approval-1.reject "Reject": POST /a/catalog/{screen}/act/approval-1/reject · sel=the card's row id; sets state = declined · approval: no · cost: write

States

  • ready

    the source's rows, drawn

  • empty

    the source has no rows: an Empty part saying so

  • error

    the source failed: the block shows the source's sentence; the page still answers 200

ActionNeedsDoesReversibleConfirm pageCost
seta selection of rows, or the rowsets the column to the value on those rowsyeswhen declaredwrite
JSON Schema

Search

esc

Go to