1import{p as i,j as e,Z as x,a2 as o,M as l,ak as s}from"./index-Db8-vjIs.js";function p(){const{invoices:r,loading:n}=i(),a=[...r].sort((t,d)=>t.invoice_date<d.invoice_date?1:-1);return e.jsxs(e.Fragment,{children:[e.jsx(x,{title:"Dossiers",subtitle:`${r.length} dossiers · one per invoice`}),e.jsx("div",{className:"px-4 sm:px-8 py-6 sm:py-8",children:e.jsx(o,{children:n&&r.length===0?e.jsx("div",{className:"text-sm text-muted-foreground py-12 text-center",children:"Loading dossiersâ¦"}):r.length===0?e.jsx("div",{className:"text-sm text-muted-foreground py-12 text-center",children:"No invoices yet. Add one from the Invoices page."}):e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{className:"bg-primary",children:e.jsxs("tr",{className:"text-[11px] uppercase tracking-wider text-primary-foreground",children:[e.jsx("th",{className:"text-left font-medium px-2 py-2",children:"Address"}),e.jsx("th",{className:"text-left font-medium px-2 py-2",children:"City"}),e.jsx("th",{className:"text-left font-medium px-2 py-2",children:"Property"}),e.jsx("th",{className:"text-left font-medium px-2 py-2",children:"Invoice #"}),e.jsx("th",{className:"text-left font-medium px-2 py-2",children:"Date"}),e.jsx("th",{className:"text-left font-medium px-2 py-2",children:"Type"}),e.jsx("th",{className:"text-right font-medium px-2 py-2",children:"Amount"}),e.jsx("th",{className:"text-left font-medium px-2 py-2",children:"Status"})]})}),e.jsx("tbody",{children:a.slice(0,100).map(t=>{const d=Number(t.amount_excl_vat),c=[t.street,t.number].filter(Boolean).join(" ");return e.jsxs("tr",{className:"border-t border-border/60 hover:bg-secondary/40",children:[e.jsx("td",{className:"px-2 py-3 font-medium",children:c||"â"}),e.jsx("td",{className:"px-2 py-3 text-muted-foreground",children:t.city}),e.jsx("td",{className:"px-2 py-3 font-mono text-[11px] text-muted-foreground",children:t.property_code}),e.jsx("td",{className:"px-2 py-3 num",children:t.invoice_number}),e.jsx("td",{className:"px-2 py-3 num text-muted-foreground",children:t.invoice_date}),e.jsx("td",{className:"px-2 py-3 text-muted-foreground",children:t.revenue_type}),e.jsx("td",{className:["px-2 py-3 text-right num font-medium",d<0?"text-destructive":""].join(" "),children:l(d)}),e.jsx("td",{className:"px-2 py-3",children:t.is_credit_note?e.jsx(s,{variant:"destructive",children:"Credit"}):t.status==="approved"?e.jsx(s,{variant:"success",children:"Approved"}):t.status==="rejected"?e.jsx(s,{variant:"destructive",children:"Rejected"}):t.status==="excluded"?e.jsx(s,{variant:"muted",children:"Excluded"}):e.jsx(s,{variant:"warning",children:"Review"})})]},t.id)})})]})})})]})}export{p as component};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.