Dashboard
The Vendor Dashboard provides a comprehensive overview of business performance, revenue metrics, and recent activity.
Overview
The dashboard displays key performance indicators tailored to the user's role:
- Owners/Managers: Full business metrics
- Cashiers: Till-specific summary
- Accountants: Financial overview
Dashboard Components
Revenue Summary
┌─────────────────────────────────────────────────────────┐
│ Today's Revenue │
│ E 12,450.00 │
│ ▲ 15% vs yesterday │
├─────────────────────────────────────────────────────────┤
│ POS Payments Top-ups Withdrawals Fees │
│ E 8,200 E 3,500 E 750 E 120 │
└─────────────────────────────────────────────────────────┘Metric Cards
| Metric | Description |
|---|---|
| Today's Revenue | Total income for current day |
| Transactions | Number of transactions today |
| Active Tills | Currently open tills |
| Pending | Transactions awaiting completion |
Time Period Filters
| Period | Data Shown |
|---|---|
| Today | Current day |
| Week | Last 7 days |
| Month | Last 30 days |
| Custom | Date range picker |
Dashboard Data
| Field | Description |
|---|---|
| totalRevenue | Total revenue for period |
| posRevenue | Revenue from POS payments |
| topupRevenue | Revenue from top-ups |
| withdrawalRevenue | Revenue from withdrawals |
| feeRevenue | Fee income |
| transactionCount | Number of transactions |
| activeTills | Active till count |
| pendingCount | Pending transactions |
| recentTransactions | List of recent transactions |
| revenueChart | Chart data points |
Revenue Breakdown
By Transaction Type
| Type | Icon | Color |
|---|---|---|
| POS | point_of_sale | Blue |
| Top-ups | add_circle | Green |
| Withdrawals | remove_circle | Orange |
| Fees | percent | Purple |
Revenue Chart
Line chart showing revenue over time with:
- Curved lines
- Data points
- Shaded area below line
- Grid and axis labels
Recent Activity
Transaction List
Shows the 10 most recent transactions:
| Column | Description |
|---|---|
| Type | Payment/Topup/Withdrawal |
| Customer | User name or phone |
| Amount | Transaction value |
| Time | Timestamp |
| Status | Completed/Pending/Failed |
Quick Actions
Dashboard quick access buttons:
| Action | Permission | Navigation |
|---|---|---|
| New Payment | pos | POS screen |
| Top-up | topup | Top-up screen |
| Withdrawal | withdraw | Withdrawal screen |
| View All | transactions | Transaction list |
Till Summary (Sub-users)
Cashiers see their assigned till's performance:
| Field | Description |
|---|---|
| Till Name | Name of assigned till |
| Balance | Current float balance |
| Transactions | Transaction count |
| Session Start | When session started |
Auto-Refresh
Dashboard refreshes automatically every 30 seconds to show current data.
API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/vendor/dashboard | GET | Dashboard metrics |
/vendor/dashboard/chart | GET | Revenue chart data |
/vendor/transactions/recent | GET | Recent transactions |
/vendor/tills/summary | GET | Till summaries |
Related Files
| File | Purpose |
|---|---|
lib/screens/dashboard/dashboard_screen.dart | Dashboard screen |
lib/controllers/dashboard_controller.dart | Dashboard controller |
lib/widgets/revenue_summary.dart | Revenue summary widget |
lib/widgets/revenue_chart.dart | Revenue chart widget |
lib/widgets/recent_activity.dart | Recent activity widget |
lib/widgets/quick_actions.dart | Quick actions widget |