Skip to content

Components · Workflow

ApprovalQueue

Approval workflow queue. Surfaces pending approvals with SLA badges, batch action support, and one-click approve/reject.

Key points

  • SLA badges show urgency — green for fresh, copper for nearing deadline, red for overdue
  • Batch actions let approvers handle multiple items at once when policies allow
  • Configurable sort: by SLA urgency, by submission time, or by submitter

Import

import { ApprovalQueue } from '@flexischeduler/scheduling-components';

Basic usage

<ApprovalQueue
  approvalType="event_change"
  showSlaBadges
  enableBatchActions
  onApproved={(approval) => toast(`Approved ${approval.id}`)}
/>

Reference

Props

Name

Type

Description

approvalType

required

string

Approval type from your template (e.g. "event_change", "schedule_override")

assignedTo
string

Filter to approvals assigned to a specific user

status
"pending" | "approved" | "rejected"

default: "pending"

Status filter

showSlaBadges
boolean

default: true

Show urgency badges based on SLA deadlines

enableBatchActions
boolean

default: false

Show batch select and bulk-approve/reject controls

sortBy
"slaUrgency" | "submittedAt" | "submitter"

default: "slaUrgency"

Sort order

maxEntries
number

default: 50

Max approvals rendered

Events

Event

Payload

Fires when

onApproved(approval: Approval) => void

User approved a single item

onRejected(approval: Approval, reason: string) => void

User rejected a single item

onBatchAction(approvals: Approval[], action: "approve" | "reject") => void

Batch action applied (requires enableBatchActions)

Slots

Slot

Description

empty

Rendered when the queue is empty

entry

Custom render for a single approval entry

Filtered queue

For per-user "my approvals" surfaces, filter by assignedTo and sort by SLA urgency:

<ApprovalQueue
  approvalType="event_change"
  assignedTo={currentUserId}
  status="pending"
  sortBy="slaUrgency"
/>

Batch actions need policy support

Some approval types are configured to require individual review — batch approve is disallowed at the template level. The component reads this configuration and disables batch controls automatically when the type doesn’t allow them, even if you set enableBatchActions.