import{j as e,H as i,L as x}from"./app-CAqQVdqj.js";import{A as n}from"./AuthenticatedLayout-CQEcc2iz.js";import{f as s}from"./utils-f31lc4sE.js";function m({leases:r}){const a=r.filter(t=>parseFloat(t.total_dues||0)>0);return e.jsxs(n,{header:e.jsx("h2",{className:"text-xl font-semibold leading-tight text-gray-800",children:"Tenant Dues Report"}),children:[e.jsx(i,{title:"Tenant Dues Report"}),e.jsx("div",{className:"py-12",children:e.jsxs("div",{className:"mx-auto max-w-7xl sm:px-6 lg:px-8 space-y-6",children:[e.jsx("div",{className:"bg-white shadow-sm sm:rounded-lg p-6",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h3",{className:"text-lg font-medium",children:"Tenants with Outstanding Dues"}),e.jsx(x,{href:route("reports.index"),className:"inline-flex items-center rounded-md bg-gray-200 px-4 py-2 text-sm font-medium text-gray-700 hover:bg-gray-300",children:"Back to Reports"})]})}),e.jsx("div",{className:"bg-white shadow-sm sm:rounded-lg overflow-hidden",children:e.jsx("div",{className:"p-6 text-gray-900",children:e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"min-w-full divide-y divide-gray-200",children:[e.jsx("thead",{className:"bg-gray-50",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500",children:"Tenant"}),e.jsx("th",{className:"px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-gray-500",children:"Shop#"}),e.jsx("th",{className:"px-4 py-3 text-right text-xs font-medium uppercase tracking-wider text-gray-500",children:"Rent Dues"}),e.jsx("th",{className:"px-4 py-3 text-right text-xs font-medium uppercase tracking-wider text-gray-500",children:"Security Deposit Due"}),e.jsx("th",{className:"px-4 py-3 text-right text-xs font-medium uppercase tracking-wider text-gray-500",children:"Total Dues"})]})}),e.jsxs("tbody",{className:"divide-y divide-gray-200 bg-white",children:[a.map((t,d)=>e.jsxs("tr",{className:"hover:bg-gray-50",children:[e.jsx("td",{className:"whitespace-nowrap px-4 py-4 text-sm font-medium text-gray-900",children:t.lease?.tenant?.name||"—"}),e.jsxs("td",{className:"whitespace-nowrap px-4 py-4 text-sm text-gray-900",children:["Shop ",t.lease?.shop?.shop_number||"—"]}),e.jsx("td",{className:"whitespace-nowrap px-4 py-4 text-sm text-right text-red-700",children:s(t.rent_dues)}),e.jsx("td",{className:"whitespace-nowrap px-4 py-4 text-sm text-right text-red-700",children:s(t.security_deposit_due)}),e.jsx("td",{className:"whitespace-nowrap px-4 py-4 text-sm text-right font-bold text-red-800",children:s(t.total_dues)})]},d)),a.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:"5",className:"px-4 py-4 text-center text-sm text-gray-500",children:"No outstanding dues found. All tenants are clear!"})})]})]})})})})]})})]})}export{m as default};
