Add Purchases Chart page — weekly table view of invoices by supplier
Backend endpoint /api/reports/purchases/weekly existed but had no frontend. Adds PurchasesCalendar page under Invoices > Purchases Chart: 7-day columns, one row per supplier, each cell lists invoice chips (number + total) linking to the invoice detail. Daily totals row in footer, prev/next week navigation. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
0d6ca9b979
commit
12aef0adb1
3 changed files with 340 additions and 1 deletions
|
|
@ -3,7 +3,7 @@ import {
|
|||
LayoutDashboard, Upload, FileText, Search, List, AlertCircle,
|
||||
ShoppingCart, TrendingUp, BarChart2, PieChart, Activity, RefreshCw,
|
||||
Calendar, Users, Hotel, BookOpen, Wheat, ChefHat, UtensilsCrossed,
|
||||
Menu, ShieldCheck, Package, Settings, ChevronRight,
|
||||
Menu, ShieldCheck, Package, Settings, ChevronRight, TableProperties,
|
||||
} from 'lucide-react'
|
||||
import { useAuth } from './AuthGate'
|
||||
import { can } from '../types'
|
||||
|
|
@ -46,6 +46,7 @@ export default function Layout() {
|
|||
<SidebarSection label="Invoices">
|
||||
<NavItem to="/upload" label="Upload" icon={Upload} />
|
||||
<NavItem to="/invoices" label="Invoices" icon={FileText} />
|
||||
<NavItem to="/purchases-calendar" label="Purchases Chart" icon={TableProperties} />
|
||||
<NavItem to="/search/invoices" label="Search" icon={Search} />
|
||||
<NavItem to="/search/line-items" label="Line Items" icon={List} />
|
||||
{can(user, 'disputes') && <NavItem to="/disputes" label="Disputes" icon={AlertCircle} />}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue