A trip's expenses from both sides. The employee sees a policy check on every item, with the fix on the row: a reason for a dinner over the meal limit, a receipt for the taxi. The manager sees the policy agent's suggestion, returns single items, reads the comments and approves what is left through an approval prompt. On a phone the decision is a bar at the bottom and returning an item is a swipe.
On this page
Examples
Installation
Installation is part of Pro
Pro components install from a licensed registry. The live preview stays open to everyone.
Props
- report
ExpenseReportData- title, period, employee, items, status (draft, submitted, approved, denied, paid) and comments.
- view
"employee"|"manager"- Default
"employee" - Whose side it shows.
- policy
ReportPolicy- Default
$50 meals, receipts over $25 - mealLimit, mealCategory and receiptOver. policyFlags(item, policy) gives the same checks in your code.
- onReason / onAttachReceipt
(id, reason) / (id) => void- Employee: the fixes on a flagged row.
- onAddItem / onSubmit
() => void / () => Promise- Employee: Add expense and the sticky Submit. Submit stays off while a fix is missing.
- suggestion
PolicySuggestion- Manager: the agent's title, detail and the items it would return. They start out returned.
- agent
Actor- Default
Policy agent - Who wrote the suggestion, for the approval prompt.
- onDecision
({ decision, approved, returned, total }) => void- Manager: Approve or Deny.
- onComment
(text) => void- A comment box under the comments.
- categories / currency / locale
-- Default
defaults - As in the other expense blocks.
| Prop | Type | Default | Description |
|---|---|---|---|
| report | ExpenseReportData | - | title, period, employee, items, status (draft, submitted, approved, denied, paid) and comments. |
| view | "employee" | "manager" | "employee" | Whose side it shows. |
| policy | ReportPolicy | $50 meals, receipts over $25 | mealLimit, mealCategory and receiptOver. policyFlags(item, policy) gives the same checks in your code. |
| onReason / onAttachReceipt | (id, reason) / (id) => void | - | Employee: the fixes on a flagged row. |
| onAddItem / onSubmit | () => void / () => Promise | - | Employee: Add expense and the sticky Submit. Submit stays off while a fix is missing. |
| suggestion | PolicySuggestion | - | Manager: the agent's title, detail and the items it would return. They start out returned. |
| agent | Actor | Policy agent | Who wrote the suggestion, for the approval prompt. |
| onDecision | ({ decision, approved, returned, total }) => void | - | Manager: Approve or Deny. |
| onComment | (text) => void | - | A comment box under the comments. |
| categories / currency / locale | - | defaults | As in the other expense blocks. |
When to use
When to use
- Submitting a trip's expenses against a policy, and approving or returning them as a manager.
- Any approval of a list of money items where an agent checks the rules first.
When not to use
- A single agent action waiting for a yes or no: use Approval Prompt.
- Just the transactions: use Transactions List.
Using with AI
Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:
- Add the Knowns UI Expense Report to my app and wire it to my own data.
- I need submitting a trip's expenses against a policy, and approving or returning them as a manager. Set that up with the Knowns UI Expense Report.
- Which Expense Report props do I need for a minimal setup? Show me a short example.
With the server connected, your assistant calls get_component({ name: "expense-report" }) and search_docs({ query: "expense report" }). Pro props, full examples and source come back once your license key is in the MCP config.