Invoice Management
When managing invoices:
- Track — Define invoice data shape in the canvas:
- Fields: client, amount, status (Draft/Sent/Paid/Overdue), dueDate, createdAt
- Build canvas — Invoice management section (
write_filecanvas TSX):
- KPIs: total outstanding, total paid (30d), overdue count
- Table: invoices with client, amount, status badge, due date
- Buttons: Create Invoice, Mark Paid, Send Reminder (handled as local state in canvas)
- Create — When user asks to create an invoice:
- Parse client, amount, and due date from natural language
- Add the new row to the canvas data and re-write the file
- Follow up — On heartbeat, check for overdue invoices:
- Alert via
send_messageif any invoices are past due - Log overdue status to memory
- Report — Weekly summary of cash flow (paid vs outstanding)