Skip to content

Implement full Sales page with KPIs, AI, and invoice management#2

Open
coder-contrib-bot wants to merge 1 commit into
mainfrom
claude-code/sales-page/x7k2m9pf
Open

Implement full Sales page with KPIs, AI, and invoice management#2
coder-contrib-bot wants to merge 1 commit into
mainfrom
claude-code/sales-page/x7k2m9pf

Conversation

@coder-contrib-bot
Copy link
Copy Markdown
Collaborator

Summary\n\n- Sales Repository (sales_repository.dart): Data layer with SalesInvoiceModel, SalesItemModel, and repository methods (getAll, getById, create, recordPayment, aiChat)\n- Sales Provider (sales_provider.dart): Riverpod state management with filtered invoices, KPI computation (total sales, cash/credit %, unpaid amounts), search, and status/type filters\n- Sales Page (sales_page.dart): Full Revenue Engine Control Center with:\n - Search bar, New Sale button, AI button, refresh, alerts badge\n - KPI row (Total Sales, Invoices, Cash %, Credit %, Unpaid)\n - AI Insight panel with dynamic insights\n - Payment status filters (All/Paid/Partial/Unpaid) + type filters (Cash/Credit)\n - Invoice cards with status color bar, payment progress, quick actions (View/Pay/AI)\n- Sale Detail Drawer (sale_detail_drawer.dart): Right-side panel with 3 tabs:\n - Overview: financial summary, payment progress, invoice details\n - AI Insights: contextual questions about the invoice\n - Actions: record payment, print, edit, return, AI analysis\n- Create Sale Dialog (create_sale_dialog.dart): 4-step wizard:\n 1. Customer selection (or walk-in) + warehouse\n 2. Product line items with quantity, unit type, price, discount\n 3. Payment details (cash/credit/mixed) + discount + notes\n 4. Review & confirm with auto stock deduction notice\n\n## AI Agent\n\nThis PR was created by Claude Code (AI Agent).\n- GIT_AUTHOR_NAME: Claude Code\n- GIT_AUTHOR_EMAIL: noreply@anthropic.com\n\n## Test plan\n\n- [ ] Verify sales page loads and fetches invoices from /api/sales\n- [ ] Test KPI cards display correct totals\n- [ ] Test status and type filters work correctly\n- [ ] Test search by invoice number and customer name\n- [ ] Test clicking an invoice opens the detail drawer\n- [ ] Test Create Sale 4-step wizard flow\n- [ ] Test Record Payment dialog and provider refresh\n- [ ] Test AI dialog sends queries to /api/ai/chat\n\n🤖 Generated with Claude Code

…gement

- Add sales_repository.dart with models for invoices/items and API methods
- Add sales_provider.dart with filtered list, KPI computation, and status enums
- Rewrite sales_page.dart with search, KPI cards, AI insight panel, status/type
  filters, invoice list with payment progress, record payment dialog, and AI dialog
- Add sale_detail_drawer.dart with Overview/AI Insights/Actions tabs
- Add create_sale_dialog.dart with 4-step flow: Customer > Products > Payment > Confirm

GIT_AUTHOR_NAME: Claude Code (AI Agent)
GIT_AUTHOR_EMAIL: noreply@anthropic.com

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant