Skip to content

Reports

Source: pharmanet-admin/src/pages/Reports/Reports.jsx

Tabs

Tab Component Description
Sales Report SalesReport Date-range sales with charts and totals
Product Performance ProductPerformance Top selling, low stock, most viewed
Seller Performance SellerPerformance Top sellers, ratings, commissions

Service

Source: pharmanet-admin/src/services/reports.js

Function Description
getSalesReport({startDate, endDate}) Revenue totals, daily breakdown, chart data
getProductPerformance({limit, sortBy}) Top/low/most-viewed products
getProductAnalytics(id) Single product: revenue, trend, recent orders
getSellerPerformance() Seller rankings, ratings, global stats
exportReport(type, params) Delegate to specific reporter

Components

Component File Description
SalesReport components/reports/SalesReport.jsx Date picker, chart, summary table
ProductPerformance components/reports/ProductPerformance.jsx Top/Low product tables
SellerPerformance components/reports/SellerPerformance.jsx Seller ranking table

Export

Reports support CSV and PDF export via ExportButtons:

  • xlsx package for spreadsheet export
  • jspdf + jspdf-autotable for PDF export