Dashboard¶
Source: pharmanet-web/src/pages/Dashboard/Dashboard.jsx
Overview¶
Pharmacy-level KPIs and analytics for the seller.
KPIs¶
| Metric | Source |
|---|---|
| Total Products | dashboardService.getStats() |
| Total Orders | dashboardService.getStats() |
| Total Revenue (ETB) | dashboardService.getStats() |
| Pending Prescriptions | dashboardService.getStats() |
Each KPI shows: current value, trend arrow, and percentage change.
Charts¶
| Chart | Type | Data Source |
|---|---|---|
| Revenue Overview | AreaChart + LineChart | Recent orders |
| Sales by Category | PieChart | Order items |
| Daily Sales Volume | BarChart | Daily totals |
Components¶
| Component | File | Description |
|---|---|---|
StatsCards |
components/dashboard/StatsCards.jsx |
KPI grid |
RevenueChart |
components/dashboard/RevenueChart.jsx |
Revenue area chart |
SalesChart |
components/dashboard/SalesChart.jsx |
Sales bar chart |
QuickActions |
components/dashboard/QuickActions.jsx |
Common tasks |
RecentActivity |
components/dashboard/RecentActivity.jsx |
Recent orders |
Data Flow¶
useEffect(() => {
dispatch(fetchDashboardStats());
dispatch(fetchDashboardOverview());
}, [dispatch]);