diff --git a/client/src/index.css b/client/src/index.css index 5f0d551..5cb5846 100644 --- a/client/src/index.css +++ b/client/src/index.css @@ -372,6 +372,10 @@ th { .table-wrap thead { display: none; } + .table-wrap tbody, + .table-wrap tfoot { + display: block; + } .table-wrap tr { display: flex; flex-direction: column; @@ -394,6 +398,9 @@ th { padding-top: 0.5rem; border-top: 1px solid var(--border); } + .table-wrap td.bar-cell { + display: none; + } } .inventory-card-mobile { diff --git a/client/src/pages/Reports.jsx b/client/src/pages/Reports.jsx index 87e5950..42f0ecb 100644 --- a/client/src/pages/Reports.jsx +++ b/client/src/pages/Reports.jsx @@ -106,17 +106,17 @@ export default function Reports() { {data.salesByProduct.map((row) => ( - {row.product_name} - {row.units_sold} - ${Number(row.revenue).toFixed(2)} + {row.product_name} + {row.units_sold} + ${Number(row.revenue).toFixed(2)} ))} - Total - {data.salesByProduct.reduce((s, r) => s + r.units_sold, 0)} - ${data.salesByProduct.reduce((s, r) => s + r.revenue, 0).toFixed(2)} + Total + {data.salesByProduct.reduce((s, r) => s + r.units_sold, 0)} + ${data.salesByProduct.reduce((s, r) => s + r.revenue, 0).toFixed(2)} @@ -138,9 +138,9 @@ export default function Reports() { {data.topCustomers.map((row) => ( - {row.customer_name} - {row.order_count} - ${Number(row.total_spent).toFixed(2)} + {row.customer_name} + {row.order_count} + ${Number(row.total_spent).toFixed(2)} ))} {data.topCustomers.length === 0 && ( @@ -169,10 +169,10 @@ export default function Reports() { const maxRevenue = Math.max(...data.revenueOverTime.map((r) => r.revenue), 1); return data.revenueOverTime.map((row) => ( - {row.date} - {row.order_count} - ${Number(row.revenue).toFixed(2)} - + {row.date} + {row.order_count} + ${Number(row.revenue).toFixed(2)} +
{data.orderStatusBreakdown.map((row) => ( - {row.status} - {row.count} + {row.status} + {row.count} ))} {data.orderStatusBreakdown.length === 0 && ( @@ -266,14 +266,14 @@ export default function Reports() { const lowStock = row.low_stock_threshold > 0 && row.current_stock <= row.low_stock_threshold; return ( - {row.product_name} - + {row.product_name} + {row.current_stock} {lowStock && ' (low)'} - {row.total_restocked} - {row.total_sold} - {row.restock_count} + {row.total_restocked} + {row.total_sold} + {row.restock_count} ); })}