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
approvalTyperequired
stringApproval type from your template (e.g. "event_change", "schedule_override")
assignedTostringFilter to approvals assigned to a specific user
status"pending" | "approved" | "rejected"default: "pending"
Status filter
showSlaBadgesbooleandefault: true
Show urgency badges based on SLA deadlines
enableBatchActionsbooleandefault: false
Show batch select and bulk-approve/reject controls
sortBy"slaUrgency" | "submittedAt" | "submitter"default: "slaUrgency"
Sort order
maxEntriesnumberdefault: 50
Max approvals rendered
Events
Event
Payload
Fires when
onApproved(approval: Approval) => voidUser approved a single item
onRejected(approval: Approval, reason: string) => voidUser rejected a single item
onBatchAction(approvals: Approval[], action: "approve" | "reject") => voidBatch action applied (requires enableBatchActions)
Slots
Slot
Description
emptyRendered when the queue is empty
entryCustom 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
enableBatchActions.