PageSourceSearch

https://tranchi.ai/assets/cCKpumk0h.js

js tranchi.ai collected 2026-10-05 13:07:29 UTC 28,302 bytes, 6 lines download raw bytes

1import{j as e}from"./cCu9EUtGE.js";import{K as te,u as ae,b as ce,t as y,c as f,q as P,y as M,A as le,C as R,Y as w,z as S,J as k,S as ne,B as j,ao as ie,ap as O,E as re,at as de,D as $,e as B,f as U,g as H,aG as oe}from"./main-ChIfZBRY.js";import{r as d}from"./cCaBsG04v.js";import{I as xe}from"./cBWgbmwzJ.js";import{T as pe}from"./cQwn8bioA.js";import{S as me}from"./cB7vKw-_5.js";import{R as ge}from"./cwXAQ1uW_.js";import{F as q}from"./cDYE-d59o.js";import{C as he,a as Ce}from"./cH9jmF9dx.js";import{E as ue}from"./cDRLAcWAI.js";import"./cmI-Al9UM.js";/**
2 * @license lucide-react v0.453.0 - ISC
3 *
4 * This source code is licensed under the ISC license.
5 * See the LICENSE file in the root directory of this source tree.
6 */const I=te("History",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]]);function L({status:t}){const n={pending:{bg:"rgba(245, 158, 11, 0.1)",text:"#D97706",label:"Pending",icon:R},pro_approved:{bg:"rgba(34, 197, 94, 0.1)",text:"#16A34A",label:"Pro",icon:w},full_access_only:{bg:"rgba(99, 102, 241, 0.1)",text:"#6366F1",label:"Full Access",icon:S},rejected:{bg:"rgba(239, 68, 68, 0.1)",text:"#DC2626",label:"Rejected",icon:k}},c=n[t]||n.pending,r=c.icon;return e.jsxs("span",{"data-loc":"client/src/pages/AdminQC.tsx:50",className:"inline-flex items-center gap-1 text-[10px] font-bold px-2 py-0.5 rounded-full uppercase",style:{background:c.bg,color:c.text},children:[e.jsx(r,{"data-loc":"client/src/pages/AdminQC.tsx:54",className:"h-3 w-3"}),c.label]})}function E({status:t}){const n={pending:{bg:"rgba(245, 158, 11, 0.1)",text:"#D97706",label:"Pending"},pass:{bg:"rgba(34, 197, 94, 0.1)",text:"#16A34A",label:"Turnkey"},fail:{bg:"rgba(239, 68, 68, 0.1)",text:"#DC2626",label:"Needs Repair"},skip:{bg:"rgba(107, 114, 128, 0.1)",text:"#6B7280",label:"Skipped"}},c=n[t]||n.pending;return e.jsx("span",{"data-loc":"client/src/pages/AdminQC.tsx:69",className:"text-[10px] font-bold px-2 py-0.5 rounded-full uppercase",style:{background:c.bg,color:c.text},children:c.label})}function Ae({deal:t,isSelected:n,isExpanded:c,onToggleSelect:r,onToggleExpand:o,onOverride:m,onViewAudit:l}){const A=t.price?`$${Number(t.price).toLocaleString("en-US")}`:"—",h=t.cashFlow?`$${Number(t.cashFlow).toLocaleString("en-US")}/mo`:"—",Q=t.dscrRatio?Number(t.dscrRatio).toFixed(2):"—";return e.jsxs(e.Fragment,{children:[e.jsxs("tr",{"data-loc":"client/src/pages/AdminQC.tsx:103",className:"border-b border-gray-100 hover:bg-gray-50/50 transition-colors",children:[e.jsx("td",{"data-loc":"client/src/pages/AdminQC.tsx:104",className:"py-3 px-3",children:e.jsx("input",{"data-loc":"client/src/pages/AdminQC.tsx:105",type:"checkbox",checked:n,onChange:r,className:"rounded border-gray-300"})}),e.jsx("td",{"data-loc":"client/src/pages/AdminQC.tsx:112",className:"py-3 px-3",children:e.jsx("button",{"data-loc":"client/src/pages/AdminQC.tsx:113",onClick:o,className:"text-gray-400 hover:text-gray-700 transition-colors",children:c?e.jsx(de,{"data-loc":"client/src/pages/AdminQC.tsx:114",className:"h-4 w-4"}):e.jsx(O,{"data-loc":"client/src/pages/AdminQC.tsx:114",className:"h-4 w-4"})})}),e.jsx("td",{"data-loc":"client/src/pages/AdminQC.tsx:117",className:"py-3 px-3",children:e.jsxs("div",{"data-loc":"client/src/pages/AdminQC.tsx:118",children:[e.jsx("p",{"data-loc":"client/src/pages/AdminQC.tsx:119",className:"text-sm font-medium text-gray-900 max-w-[250px] truncate",children:t.address}),e.jsxs("p",{"data-loc":"client/src/pages/AdminQC.tsx:120",className:"text-[10px] text-gray-400",children:[t.market||"—"," · ",t.propertyType||"—"]})]})}),e.jsx("td",{"data-loc":"client/src/pages/AdminQC.tsx:123",className:"py-3 px-3 text-sm font-medium text-gray-900",children:A}),e.jsx("td",{"data-loc":"client/src/pages/AdminQC.tsx:124",className:"py-3 px-3 text-sm font-medium",style:{color:Number(t.cashFlow)>=300?"#16A34A":"#DC2626"},children:h}),e.jsx("td",{"data-loc":"client/src/pages/AdminQC.tsx:127",className:"py-3 px-3 text-sm text-gray-700",children:Q}),e.jsx("td",{"data-loc":"client/src/pages/AdminQC.tsx:128",className:"py-3 px-3",children:e.jsx(L,{"data-loc":"client/src/pages/AdminQC.tsx:128",status:t.qcStatus})}),e.jsx("td",{"data-loc":"client/src/pages/AdminQC.tsx:129",className:"py-3 px-3",children:e.jsx(E,{"data-loc":"client/src/pages/AdminQC.tsx:129",status:t.conditionStatus})}),e.jsx("td",{"data-loc":"client/src/pages/AdminQC.tsx:130",className:"py-3 px-3",children:e.jsxs("div",{"data-loc":"client/src/pages/AdminQC.tsx:131",className:"flex items-center gap-1",children:[t.qcStatus!=="pro_approved"&&e.jsx("button",{"data-loc":"client/src/pages/AdminQC.tsx:133",onClick:()=>m("approve_pro"),className:"p-1 rounded hover:bg-green-50 text-green-600 transition-colors",title:"Ap
6prove for Pro",children:e.jsx(w,{"data-loc":"client/src/pages/AdminQC.tsx:138",className:"h-4 w-4"})}),t.qcStatus!=="full_access_only"&&e.jsx("button",{"data-loc":"client/src/pages/AdminQC.tsx:142",onClick:()=>m("approve_full_access"),className:"p-1 rounded hover:bg-indigo-50 text-indigo-600 transition-colors",title:"Approve for Full Access",children:e.jsx(S,{"data-loc":"client/src/pages/AdminQC.tsx:147",className:"h-4 w-4"})}),t.qcStatus!=="rejected"&&e.jsx("button",{"data-loc":"client/src/pages/AdminQC.tsx:151",onClick:()=>m("reject"),className:"p-1 rounded hover:bg-red-50 text-red-600 transition-colors",title:"Reject",children:e.jsx(k,{"data-loc":"client/src/pages/AdminQC.tsx:156",className:"h-4 w-4"})}),e.jsx("button",{"data-loc":"client/src/pages/AdminQC.tsx:159",onClick:l,className:"p-1 rounded hover:bg-gray-100 text-gray-400 transition-colors",title:"View Audit Trail",children:e.jsx(I,{"data-loc":"client/src/pages/AdminQC.tsx:164",className:"h-4 w-4"})})]})})]}),c&&e.jsx("tr",{"data-loc":"client/src/pages/AdminQC.tsx:170",className:"bg-gray-50/80",children:e.jsx("td",{"data-loc":"client/src/pages/AdminQC.tsx:171",colSpan:9,className:"px-6 py-4",children:e.jsxs("div",{"data-loc":"client/src/pages/AdminQC.tsx:172",className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/AdminQC.tsx:174",className:"space-y-2",children:[e.jsx("h4",{"data-loc":"client/src/pages/AdminQC.tsx:175",className:"text-xs font-semibold text-gray-500 uppercase tracking-wider",children:"Property Details"}),e.jsxs("div",{"data-loc":"client/src/pages/AdminQC.tsx:176",className:"text-sm space-y-1",children:[e.jsxs("p",{"data-loc":"client/src/pages/AdminQC.tsx:177",children:[e.jsx("span",{"data-loc":"client/src/pages/AdminQC.tsx:177",className:"text-gray-500",children:"Beds/Baths:"})," ",t.bedrooms||"—","/",t.bathrooms||"—"]}),e.jsxs("p",{"data-loc":"client/src/pages/AdminQC.tsx:178",children:[e.jsx("span",{"data-loc":"client/src/pages/AdminQC.tsx:178",className:"text-gray-500",children:"Sq Ft:"})," ",t.squareFeet?t.squareFeet.toLocaleString("en-US"):"—"]}),e.jsxs("p",{"data-loc":"client/src/pages/AdminQC.tsx:179",children:[e.jsx("span",{"data-loc":"client/src/pages/AdminQC.tsx:179",className:"text-gray-500",children:"Rent:"})," ",t.monthlyRent?`$${Number(t.monthlyRent).toLocaleString("en-US")}/mo`:"—"]}),e.jsxs("p",{"data-loc":"client/src/pages/AdminQC.tsx:180",children:[e.jsx("span",{"data-loc":"client/src/pages/AdminQC.tsx:180",className:"text-gray-500",children:"Category:"})," ",t.dealCategory?.replace("_"," ")||"on market"]}),e.jsxs("p",{"data-loc":"client/src/pages/AdminQC.tsx:181",children:[e.jsx("span",{"data-loc":"client/src/pages/AdminQC.tsx:181",className:"text-gray-500",children:"Batch:"})," ",t.batchId||"—"]}),t.zillowUrl&&e.jsxs("a",{"data-loc":"client/src/pages/AdminQC.tsx:183",href:t.zillowUrl,target:"_blank",rel:"noopener noreferrer",className:"inline-flex items-center gap-1 text-blue-600 hover:underline text-xs",children:[e.jsx(ue,{"data-loc":"client/src/pages/AdminQC.tsx:184",className:"h-3 w-3"})," View on Zillow"]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/AdminQC.tsx:191",className:"space-y-2",children:[e.jsx("h4",{"data-loc":"client/src/pages/AdminQC.tsx:192",className:"text-xs font-semibold text-gray-500 uppercase tracking-wider",children:"Condition & QC"}),e.jsxs("div",{"data-loc":"client/src/pages/AdminQC.tsx:193",className:"text-sm space-y-1",children:[e.jsxs("p",{"data-loc":"client/src/pages/AdminQC.tsx:194",children:[e.jsx("span",{"data-loc":"client/src/pages/AdminQC.tsx:194",className:"text-gray-500",children:"Condition:"})," ",e.jsx(E,{"data-loc":"client/src/pages/AdminQC.tsx:194",status:t.conditionStatus})]}),t.conditionNotes&&e.jsx("p",{"data-loc":"client/src/pages/AdminQC.tsx:196",className:"text-xs text-gray-600 bg-white rounded p-2 border border-gray-200",children:t.conditionNotes}),t.repairEstimate&&e.jsxs("p",{"data-loc":"client/src/pages/AdminQC.tsx:199",children:[e.jsx("span",{"data-loc":"client/src/pages/AdminQC.tsx:199",className:"text-gray-500",children:"Repair Est:"})," ",t.repairEstimate]}),t.qcNotes&&e.jsxs("div",{"data-loc":"client/src/pages/AdminQC.tsx:202",children:[e.jsx("span",{"data-loc":"client/src/pages/AdminQC.tsx:203",className:"text-gray-500 text-xs",children:"QC Notes:"}),e.jsx("p",{"data-loc":"client/src/pages/AdminQC.tsx:204",className:"text-xs text-gray-600 bg-white rounded p-2 border border-gray-200 mt-1",children:t.qcNotes})]})]})]}),e.jsxs("div",{"data-loc":"client/src/pages/AdminQC.tsx:211",className:"space-y-2",children:[e.jsx("h4",{"data-loc":"client/src/pages/AdminQC.tsx:212",className:"text-xs font-semibold text-gray-500 uppercase tracking-wider",children:"Photos"}),t.imageUrls&&t.imageUrls.length>0?e.jsx("div",{"data-loc":"client/src/pages/AdminQC.tsx:214",className:"grid grid-cols-3 gap-1",children:t.imageUrls.slice(0,6).map((C,x)=>e.jsx("img",{"data-loc":"client/src/pages/AdminQC.tsx:216",src:C,alt:`Property ${x+1}`,className:"w-full h-16 object-cover rounded border border-gray-200",onError:p=>{p.target.style.display="none"}},x))}):e.jsx("p",{"data-loc":"client/src/pages/AdminQC.tsx:226",className:"text-xs text-gray-400",children:"No photos available"})]})]})})})]})}function je({dealId:t,open:n,onClose:c}){const r=d.useMemo(()=>({dealId:t}),[t]),{data:o,isLoading:m}=y.adminQC.getDealAuditLog.useQuery(r,{enabled:n&&t!==null});return e.jsx($,{"data-loc":"client/src/pages/AdminQC.tsx:254",open:n,onOpenChange:c,children:e.jsxs(B,{"data-loc":"client/src/pages/AdminQC.tsx:255",className:"max-w-lg",children:[e.jsx(U,{"data-loc":"client/src/pages/AdminQC.tsx:256",children:e.jsxs(H,{"data-loc":"client/src/pages/AdminQC.tsx:257",className:"flex items-center gap-2",children:[e.jsx(I,{"data-loc":"client/src/pages/AdminQC.tsx:258",className:"h-5 w-5 text-gray-500"}),"Audit Trail - Deal #",t]})}),e.jsx("div",{"data-loc":"client/src/pages/AdminQC.tsx:262",className:"max-h-[400px] overflow-y-auto",children:m?e.jsx("div",{"data-loc":"client/src/pages/AdminQC.tsx:264",className:"flex justify-center py-8",children:e.jsx(P,{"data-loc":"client/src/pages/AdminQC.tsx:265",className:"h-5 w-5 animate-spin text-gray-400"})}):o&&o.length>0?e.jsx("div",{"data-loc":"client/src/pages/AdminQC.tsx:268",className:"space-y-3",children:o.map(l
6=>e.jsxs("div",{"data-loc":"client/src/pages/AdminQC.tsx:270",className:"border border-gray-200 rounded-lg p-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/AdminQC.tsx:271",className:"flex items-center justify-between mb-1",children:[e.jsx("span",{"data-loc":"client/src/pages/AdminQC.tsx:272",className:"text-xs font-semibold text-gray-700",children:l.adminName||"Admin"}),e.jsx("span",{"data-loc":"client/src/pages/AdminQC.tsx:273",className:"text-[10px] text-gray-400",children:new Date(l.createdAt).toLocaleString("en-US")})]}),e.jsxs("div",{"data-loc":"client/src/pages/AdminQC.tsx:277",className:"flex items-center gap-2 text-xs",children:[e.jsx(L,{"data-loc":"client/src/pages/AdminQC.tsx:278",status:l.previousQcStatus}),e.jsx("span",{"data-loc":"client/src/pages/AdminQC.tsx:279",className:"text-gray-400",children:"→"}),e.jsx(L,{"data-loc":"client/src/pages/AdminQC.tsx:280",status:l.newQcStatus})]}),l.notes&&e.jsx("p",{"data-loc":"client/src/pages/AdminQC.tsx:283",className:"text-xs text-gray-600 mt-2 bg-gray-50 rounded p-2",children:l.notes})]},l.id))}):e.jsx("p",{"data-loc":"client/src/pages/AdminQC.tsx:289",className:"text-sm text-gray-400 text-center py-8",children:"No audit history for this deal."})})]})})}function Qe({open:t,onClose:n,action:c,dealCount:r,onConfirm:o}){const[m,l]=d.useState(""),A={approve_pro:{label:"Approve for Pro",color:"#16A34A"},approve_full_access:{label:"Approve for Full Access",color:"#6366F1"},reject:{label:"Reject",color:"#DC2626"},revert_to_pending:{label:"Revert to Pending",color:"#D97706"}},h=A[c]||A.reject;return e.jsx($,{"data-loc":"client/src/pages/AdminQC.tsx:324",open:t,onOpenChange:n,children:e.jsxs(B,{"data-loc":"client/src/pages/AdminQC.tsx:325",className:"max-w-md",children:[e.jsx(U,{"data-loc":"client/src/pages/AdminQC.tsx:326",children:e.jsxs(H,{"data-loc":"client/src/pages/AdminQC.tsx:327",children:[h.label," - ",r," deal",r>1?"s":""]})}),e.jsxs("div",{"data-loc":"client/src/pages/AdminQC.tsx:331",className:"space-y-4",children:[e.jsxs("p",{"data-loc":"client/src/pages/AdminQC.tsx:332",className:"text-sm text-gray-600",children:["This action will override the QC status for ",r," deal",r>1?"s":"",". An audit record will be created."]}),e.jsxs("div",{"data-loc":"client/src/pages/AdminQC.tsx:336",children:[e.jsx("label",{"data-loc":"client/src/pages/AdminQC.tsx:337",className:"text-sm font-medium text-gray-700 mb-1 block",children:"Notes (optional)"}),e.jsx(pe,{"data-loc":"client/src/pages/AdminQC.tsx:340",value:m,onChange:Q=>l(Q.target.value),placeholder:"Reason for override...",rows:3})]})]}),e.jsxs(oe,{"data-loc":"client/src/pages/AdminQC.tsx:348",children:[e.jsx(j,{"data-loc":"client/src/pages/AdminQC.tsx:349",variant:"outline",onClick:n,children:"Cancel"}),e.jsx(j,{"data-loc":"client/src/pages/AdminQC.tsx:350",onClick:()=>{o(m),l("")},style:{background:h.color,color:"white"},children:h.label})]})]})})}function Pe(){ae("QC Override - Admin");const{user:t,loading:n}=ce(),[c,r]=d.useState("all"),[o,m]=d.useState("all"),[l,A]=d.useState("all"),[h,Q]=d.useState(""),[C,x]=d.useState(1),[p,N]=d.useState(new Set),[G,V]=d.useState(new Set),[v,D]=d.useState({open:!1,action:"",dealIds:[]}),[T,z]=d.useState({open:!1,dealId:null}),J=d.useMemo(()=>({qcStatus:c,dealCategory:o,conditionStatus:l,search:h||void 0,page:C,pageSize:25}),[c,o,l,h,C]),{data:a,isLoading:K,refetch:F}=y.adminQC.listDeals.useQuery(J,{enabled:t?.role==="admin",staleTime:15e3}),{data:u,refetch:_}=y.adminQC.qcStats.useQuery(void 0,{enabled:t?.role==="admin",staleTime:3e4}),X=y.adminQC.overrideDeal.useMutation({onSuccess:s=>{f.success(`Deal #${s.dealId}: ${s.previousStatus} → ${s.newStatus}`),F(),_()},onError:s=>f.error("Override failed",{description:s.message})}),Y=y.adminQC.bulkOverride.useMutation({onSuccess:s=>{f.success(`${s.count} deals updated to ${s.newStatus}`),N(new Set),F(),_()},onError:s=>f.error("Bulk override failed",{description:s.message})}),b=(s,g)=>{D({open:!0,action:s,dealIds:g})},Z=s=>{const{action:g,dealIds:i}=v;i.length===1?X.mutate({dealId:i[0],action:g,notes:s||void 0}):Y.mutate({dealIds:i,action:g,notes:s||void 0}),D({open:!1,action:"",dealIds:[]})},W=s=>{N(g=>{const i=new Set(g);return i.has(s)?i.delete(s):i.add(s),i})},ee=()=>{a?.deals&&(p.size===a.deals.length?N(new Set):N(new Set(a.deals.map(s=>s.id))))},se=s=>{V(g=>{const i=new Set(g);return i.has(s)?i.delete(s):i.add(s),i})};return n?e.jsx("div",{"data-loc":"client/src/pages/AdminQC.tsx:470",className:"min-h-screen flex items-center justify-center bg-gray-50",children:e.jsx(P,{"data-loc":"client/src/pages/AdminQC.tsx:471",className:"h-8 w-8 animate-spin text-[var(--navy-primary)]"})}):!t||t.role!=="admin"?e.jsxs("div",{"data-loc":"client/src/pages/AdminQC.tsx:478",className:"min-h-screen flex flex-col items-center justify-center bg-gray-50 gap-4",children:[e.jsx(me,{"data-loc":"client/src/pages/AdminQC.tsx:479",className:"w-12 h-12 text-red-400"}),e.jsx("h1",{"data-loc":"client/src/pages/AdminQC.tsx:480",className:"text-xl font-bold text-gray-900",children:"Access Denied"}),e.jsx(M,{"data-loc":"client/src/pages/AdminQC.tsx:481",href:"/",className:"text-sm text-blue-600 hover:underline",children:"Go Home"})]}):e.jsxs("div",{"data-loc":"client/src/pages/AdminQC.tsx:487",className:"min-h-screen bg-gray-50",style:{paddingTop:"80px"},children:[e.jsxs("div",{"data-loc":"client/src/pages/AdminQC.tsx:488",className:"max-w-7xl mx-auto px-4 md:px-8 pb-12",children:[e.jsxs("div",{"data-loc":"client/src/pages/AdminQC.tsx:490",className:"flex items-center justify-between mb-6",children:[e.jsxs("div",{"data-loc":"client/src/pages/AdminQC.tsx:491",children:[e.jsxs(M,{"data-loc":"client/src/pages/AdminQC.tsx:492",href:"/admin",className:"inline-flex items-center gap-1.5 text-sm text-gray-500 hover:text-gray-900 transition-colors mb-2",children:[e.jsx(le,{"data-loc":"client/src/pages/AdminQC.tsx:496",className:"h-4 w-4"}),"Back to Admin"]}),e.jsx("h1",{"data-loc":"client/src/pages/AdminQC.tsx:499",className:"text-2xl font-bold text-gray-900 tracking-tight",style:{fontFamily:"'DM Sans', sans-serif"},children:"QC Override"}),e.jsx("p",{"data-loc":"client/src/pages/AdminQC.tsx:502",className:"text-sm text-gray-500 mt-1",children:"Manually approve or reject deals with audit trail"})]}),e.jsx("button",{"data-loc":"client/src/pages/AdminQC.tsx:504",onClick:()=>{F(),_()},className:"p-2 rounded-lg border border-gray-200 hover:bg-gray-100 transition-colors",children:e.jsx(ge,{"data-loc":"client/src/pages/AdminQC.tsx:508",className:"w-4 h-4 text-gray-500"})})]}),u&&e.jsx("div",{"data-loc":"client/src/pages/AdminQC.tsx:514",className:"grid grid-cols-2 md:grid-cols-6 gap-3 mb-6",children:[{label:"Pending",value:u.pending,color:"#D97706",icon:R},{label:"Pro Approved",value:u.proApproved,color:"#16A34A",icon:w},{label:"Full Access",value:u.fullAccessOnly,color:"#6366F1",icon:S},{label:"Rejected",value:u.rejected,color:"#DC2626",icon:k},{label:"Total Deals",value:u.total,color:"#1a2b4a",icon:q},{label:"Overrides (7d)",value:u.recentOverrides,color:"#8B5CF6",icon:I}].map(s=>e.jsxs("div",{"data-loc":"client/src/pages/AdminQC.tsx:523",className:"bg-white rounded-xl p-4 border border-gray-200 hover:shadow-sm transition-shadow",children:[e.jsxs("div",{"data-loc":"client/src/pages/AdminQC.tsx:527",className:"flex items-center gap-2 mb-2",children:[e.jsx(s.icon,{"data-loc":"client/src/pages/AdminQC.tsx:528",className:"h-4 w-4",style:{color:s.color}}),e.jsx("span",{"data-loc":"client/src/pages/AdminQC.tsx:529",className:"text-[10px] font-semibold text-gray-500 uppercase",children:s.label})]}),e.jsx("p",{"data-loc":"client/src/pages/AdminQC.tsx:531",className:"text-2xl font-bold text-gray-900",children:s.value})]},s.label))}),e.jsxs("div",{"data-loc":"client/src/pages/AdminQC.tsx:538",className:"bg-white rounded-xl border border-gray-200 p-4 mb-4",children:[e.jsxs("div",{"data-loc":"client/src/pages/AdminQC.tsx:539",className:"flex flex-wrap items-center gap-3",children:[e.jsxs("div",{"data-loc":"client/src/pages/AdminQC.tsx:540",className:"flex items-center gap-2",children:[e.jsx(q,{"data-loc":"client/src/pages/AdminQC.tsx:541",className:"h-4 w-4 text-gray-400"}),e.jsxs("select",{"data-loc":"client/src/pages/AdminQC.tsx:542",value:c,onChange:s=>{r(s.target.value),x(1)},className:"text-sm border border-gray-200 rounded-lg px-3 py-1.5 bg-white",children:[e.jsx("option",{"data-loc":"client/src/pages/AdminQC.tsx:547",value:"all",children:"All QC Status"}),e.jsx("option",{"data-loc":"client/src/pages/AdminQC.tsx:548",value:"pending",children:"Pending"}),e.jsx("option",{"data-loc":"client/src/pages/AdminQC.tsx:549",value:"pro_approved",children:"Pro Approved"}),e.jsx("option",{"data-loc":"client/src/pages/AdminQC.tsx:550",value:"full_access_only",children:"Full Access"}),e.jsx("option",{"data-loc":"client/src/pages/AdminQC.tsx:551",value:"rejected",children:"Rejected"})]})]}),e.jsxs("select",{"data-loc":"client/src/pages/AdminQC.tsx:554",value:o,onChange:s=>{m(s.target.value),x(1)},className:"text-sm border border-gray-200 rounded-lg px-3 py-1.5 bg-white",children:[e.jsx("option",{"data-loc":"client/src/pages/AdminQC.tsx:559",value:"all",children:"All Categories"}),e.jsx("option",{"data-loc":"client/src/pages/AdminQC.tsx:560",value:"on_market",children:"On Mar
6ket"}),e.jsx("option",{"data-loc":"client/src/pages/AdminQC.tsx:561",value:"gov_seized",children:"Gov Seized"}),e.jsx("option",{"data-loc":"client/src/pages/AdminQC.tsx:562",value:"tax_lien",children:"Tax Lien"})]}),e.jsxs("select",{"data-loc":"client/src/pages/AdminQC.tsx:564",value:l,onChange:s=>{A(s.target.value),x(1)},className:"text-sm border border-gray-200 rounded-lg px-3 py-1.5 bg-white",children:[e.jsx("option",{"data-loc":"client/src/pages/AdminQC.tsx:569",value:"all",children:"All Conditions"}),e.jsx("option",{"data-loc":"client/src/pages/AdminQC.tsx:570",value:"pass",children:"Turnkey"}),e.jsx("option",{"data-loc":"client/src/pages/AdminQC.tsx:571",value:"fail",children:"Needs Repair"}),e.jsx("option",{"data-loc":"client/src/pages/AdminQC.tsx:572",value:"pending",children:"Pending"}),e.jsx("option",{"data-loc":"client/src/pages/AdminQC.tsx:573",value:"skip",children:"Skipped"})]}),e.jsxs("div",{"data-loc":"client/src/pages/AdminQC.tsx:575",className:"relative flex-1 min-w-[200px]",children:[e.jsx(ne,{"data-loc":"client/src/pages/AdminQC.tsx:576",className:"absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-gray-400"}),e.jsx(xe,{"data-loc":"client/src/pages/AdminQC.tsx:577",value:h,onChange:s=>{Q(s.target.value),x(1)},placeholder:"Search by address...",className:"pl-9 h-9"})]})]}),p.size>0&&e.jsxs("div",{"data-loc":"client/src/pages/AdminQC.tsx:588",className:"flex items-center gap-2 mt-3 pt-3 border-t border-gray-100",children:[e.jsxs("span",{"data-loc":"client/src/pages/AdminQC.tsx:589",className:"text-xs text-gray-500 font-medium",children:[p.size," selected:"]}),e.jsxs(j,{"data-loc":"client/src/pages/AdminQC.tsx:590",size:"sm",variant:"outline",className:"h-7 text-xs text-green-600 border-green-200 hover:bg-green-50",onClick:()=>b("approve_pro",Array.from(p)),children:[e.jsx(w,{"data-loc":"client/src/pages/AdminQC.tsx:592",className:"h-3 w-3 mr-1"})," Approve Pro"]}),e.jsxs(j,{"data-loc":"client/src/pages/AdminQC.tsx:594",size:"sm",variant:"outline",className:"h-7 text-xs text-indigo-600 border-indigo-200 hover:bg-indigo-50",onClick:()=>b("approve_full_access",Array.from(p)),children:[e.jsx(S,{"data-loc":"client/src/pages/AdminQC.tsx:596",className:"h-3 w-3 mr-1"})," Approve Full Access"]}),e.jsxs(j,{"data-loc":"client/src/pages/AdminQC.tsx:598",size:"sm",variant:"outline",className:"h-7 text-xs text-red-600 border-red-200 hover:bg-red-50",onClick:()=>b("reject",Array.from(p)),children:[e.jsx(k,{"data-loc":"client/src/pages/AdminQC.tsx:600",className:"h-3 w-3 mr-1"})," Reject"]}),e.jsxs(j,{"data-loc":"client/src/pages/AdminQC.tsx:602",size:"sm",variant:"outline",className:"h-7 text-xs text-amber-600 border-amber-200 hover:bg-amber-50",onClick:()=>b("revert_to_pending",Array.from(p)),children:[e.jsx(R,{"data-loc":"client/src/pages/AdminQC.tsx:604",className:"h-3 w-3 mr-1"})," Revert"]})]})]}),e.jsx("div",{"data-loc":"client/src/pages/AdminQC.tsx:611",className:"bg-white rounded-xl border border-gray-200 overflow-hidden",children:K?e.jsx("div",{"data-loc":"client/src/pages/AdminQC.tsx:613",className:"flex justify-center py-12",children:e.jsx(P,{"data-loc":"client/src/pages/AdminQC.tsx:614",className:"h-6 w-6 animate-spin text-gray-400"})}):a&&a.deals.length>0?e.jsxs(e.Fragment,{children:[e.jsx("div",{"data-loc":"client/src/pages/AdminQC.tsx:618",className:"overflow-x-auto",children:e.jsxs("table",{"data-loc":"client/src/pages/AdminQC.tsx:619",className:"w-full text-left",children:[e.jsx("thead",{"data-loc":"client/src/pages/AdminQC.tsx:620",children:e.jsxs("tr",{"data-loc":"client/src/pages/AdminQC.tsx:621",className:"border-b border-gray-100 bg-gray-50/50",children:[e.jsx("th",{"data-loc":"client/src/pages/AdminQC.tsx:622",className:"py-2.5 px-3 w-8",children:e.jsx("input",{"data-loc":"client/src/pages/AdminQC.tsx:623",type:"checkbox",checked:p.size===a.deals.length&&a.deals.length>0,onChange:ee,className:"rounded border-gray-300"})}),e.jsx("th",{"data-loc":"client/src/pages/AdminQC.tsx:630",className:"py-2.5 px-3 w-8"}),e.jsx("th",{"data-loc":"client/src/pages/AdminQC.tsx:631",className:"py-2.5 px-3 text-[10px] font-semibold text-gray-500 uppercase tracking-wider",children:"Address"}),e.jsx("th",{"data-loc":"client/src/pages/AdminQC.tsx:632",className:"py-2.5 px-3 text-[10px] font-semibold text-gray-500 uppercase tracking-wider",children:"Price"}),e.jsx("th",{"data-loc":"client/src/pages/AdminQC.tsx:633",className:"py-2.5 px-3 text-[10px] font-semibold text-gray-500 uppercase tracking-wider",children:"Cash Flow"}),e.jsx("th",{"data-loc":"client/src/pages/AdminQC.tsx:634",className:"py-2.5 px-3 text-[10px] font-semibold text-gray-500 uppercase tracking-wider",children:"DSCR"}),e.jsx("th",{"data-loc":"client/src/pages/AdminQC.tsx:635",className:"py-2.5 px-3 text-[10px] font-semibold text-gray-500 uppercase tracking-wider",children:"QC Status"}),e.jsx("th",{"data-loc":"client/src/pages/AdminQC.tsx:636",className:"py-2.5 px-3 text-[10px] font-semibold text-gray-500 uppercase tracking-wider",children:"Condition"}),e.jsx("th",{"data-loc":"client/src/pages/AdminQC.tsx:637",className:"py-2.5 px-3 text-[10px] font-semibold text-gray-500 uppercase tracking-wider",children:"Actions"})]})}),e.jsx("tbody",{"data-loc":"client/src/pages/AdminQC.tsx:640",children:a.deals.map(s=>e.jsx(Ae,{"data-loc":"client/src/pages/AdminQC.tsx:642",deal:s,isSelected:p.has(s.id),isExpanded:G.has(s.id),onToggleSelect:()=>W(s.id),onToggleExpand:()=>se(s.id),onOverride:g=>b(g,[s.id]),onViewAudit:()=>z({open:!0,dealId:s.id})},s.id))})]})}),e.jsxs("div",{"data-loc":"client/src/pages/AdminQC.tsx:658",className:"flex items-center justify-between px-4 py-3 border-t border-gray-100",children:[e.jsxs("p",{"data-loc":"client/src/pages/AdminQC.tsx:659",className:"text-xs text-gray-500",children:["Showing ",(a.page-1)*a.pageSize+1,"–",Math.min(a.page*a.pageSize,a.total)," of ",a.total]}),e.jsxs("div",{"data-loc":"client/src/pages/AdminQC.tsx:662",className:"flex items-center gap-1",children:[e.jsx("button",{"data-loc":"client/src/pages/AdminQC.tsx:663",onClick:()=>x(1),disabled:C===1,className:"p-1 rounded hover:bg-gray-100 disabled:opacity-30",children:e.jsx(he,{"data-loc":"client/src/pages/AdminQC.tsx:664",className:"h-4 w-4"})}),e.jsx("button",{"data-loc":"client/src/pages/AdminQC.tsx:666",onClick:()=>x(s=>Math.max(1,s-1)),disabled:C===1,className:"p-1 rounded hover:bg-gray-100 disabled:opacity-30",children:e.jsx(ie,{"data-loc":"client/src/pages/AdminQC.tsx:667",className:"h-4 w-4"})}),e.jsxs("span",{"data-loc":"client/src/pages/AdminQC.tsx:669",className:"text-xs text-gray-600 px-2",children:["Page ",a.page," of ",a.totalPages]}),e.jsx("button",{"data-loc":"client/src/pages/AdminQC.tsx:672",onClick:()=>x(s=>Math.min(a.totalPages,s+1)),disabled:C===a.totalPages,className:"p-1 rounded hover:bg-gray-100 disabled:opacity-30",children:e.jsx(O,{"data-loc":"client/src/pages/AdminQC.tsx:673",className:"h-4 w-4"})}),e.jsx("button",{"data-loc":"client/src/pages/AdminQC.tsx:675",onClick:()=>x(a.totalPages),disabled:C===a.totalPages,className:"p-1 rounded hover:bg-gray-100 disabled:opacity-30",children:e.jsx(Ce,{"data-loc":"client/src/pages/AdminQC.tsx:676",className:"h-4 w-4"})})]})]})]}):e.jsxs("div",{"data-loc":"client/src/pages/AdminQC.tsx:682",className:"text-center py-12",children:[e.jsx(re,{"data-loc":"client/src/pages/AdminQC.tsx:683",className:"h-8 w-8 text-gray-300 mx-auto mb-3"}),e.jsx("p",{"data-loc":"client/src/pages/AdminQC.tsx:684",className:"text-sm text-gray-400",children:"No deals match your filters."})]})})]}),e.jsx(Qe,{"data-loc":"client/src/pages/AdminQC.tsx:691",open:v.open,onClose:()=>D({open:!1,action:"",dealIds:[]}),action:v.action,dealCount:v.dealIds.length,onConfirm:Z}),e.jsx(je,{"data-loc":"client/src/pages/AdminQC.tsx:698",open:T.open,onClose:()=>z({open:!1,dealId:null}),dealId:T.dealId})]})}export{Pe as default};

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.