PageSourceSearch

https://home.co.uk/build/assets/Index-CNDtv_Qe.js

js home.co.uk collected 2026-10-02 04:55:06 UTC 29,726 bytes, 1 lines download raw bytes

1import{r as m,c as H,o,a as X,w as L,b as t,d as f,u as b,h as g,f as n,t as a,g as r,F as u,j as V,n as S,e as wt,p as D,v as O,E as ht,y as it}from"./runtime-dom.esm-bundler-BFbfmLfl.js";import{l as $,r as at}from"./index.esm-C8-Okse2.js";import{_ as Ct}from"./AdminLayout-Cgk7W50i.js";import{S as St}from"./StatusTabs-Cjn4r7G8.js";import{L as kt}from"./layers-DhAcOZAq.js";import{C as Tt}from"./credit-card-Dn2M7EkH.js";import{R as lt}from"./receipt-CpHxGEW1.js";import{U as At}from"./users-DYBNM71i.js";import{C as rt}from"./clock-wtOYjiba.js";import{C as It}from"./circle-check-big-By0smEjZ.js";import{C as Pt}from"./circle-x-DYwMKyLl.js";import{T as Nt}from"./triangle-alert-P9kpP2tT.js";import{S as Bt}from"./shield-check-CDldKyok.js";import{X as Lt}from"./x-gRRgfAF8.js";import{T as Vt}from"./LoginModal-BMeMPme8.js";import{S as Dt}from"./search-DRuNnyPk.js";import{T as $t}from"./trash-2-CuFI4esy.js";import"./_commonjsHelpers-D6-XlEtG.js";import"./DashboardLayout-Czs4Ae1a.js";import"./pound-sterling-DallvfDR.js";import"./createLucideIcon-H8VPBXjN.js";import"./file-text-CxktRaAP.js";import"./app-Dvzl3QXw.js";/* empty css            */import"./echo-Cx0reEeH.js";import"./listingImageRemint-DdzXd0Qc.js";import"./chevron-left-BqH44XVe.js";import"./_plugin-vue_export-helper-DlAUqK2U.js";import"./piggy-bank-C2v63urG.js";import"./chevron-down-CV0HnoXa.js";import"./check-CYOYuDcY.js";import"./sparkles-B9lXBQmj.js";import"./circle-alert-ByG7DPjo.js";import"./house-BnH-U5r3.js";import"./key-round-CDOVxIO1.js";import"./shield-xlcuWJAH.js";import"./loader-circle-BOF4Rcg5.js";import"./SavePropertyModal-C2h6jxhG.js";import"./lock-BQyHxR7C.js";import"./map-pin-7NBWNz8E.js";import"./calculator-CW_pbNuI.js";import"./phone-_6yHEIlu.js";import"./camera-Dqs6fn23.js";import"./palette-BHFj3Xy0.js";import"./paintbrush-ChFJNe41.js";import"./wrench-DklhqLlS.js";import"./map-8n63qlK3.js";import"./compass-CH8J464A.js";import"./tag-BO3kPXxQ.js";import"./pin-Ck_QWSJO.js";import"./flag-1_ebRH_b.js";import"./target-CZ1Df2lJ.js";import"./flame-BPccTQZg.js";import"./zap-BONcfJMP.js";import"./rocket-DtFw-SME.js";import"./inbox-CFZTkSBv.js";import"./archive-BeRbhDRR.js";import"./box-390yTOQ1.js";import"./package-Bs-_yP79.js";import"./bookmark-BPpFaTpS.js";import"./star-DLmgYZpv.js";import"./square-check-big-Bg8cLZ7q.js";import"./folder-open-WStbupck.js";import"./folder-c0CtBhoz.js";import"./layout-grid-DSsqyLnZ.js";import"./minus-D_MNsdVR.js";import"./chevron-right-DQnPt1ZE.js";import"./folder-plus-7oO0Nbpu.js";import"./type-CyecaIdB.js";import"./plus-D8BOBnMI.js";import"./useMailBase-CRpcoWb6.js";import"./addressFormat-BzTudlB8.js";import"./HangoutCallWindow-CvgLhoKS.js";import"./useToast-B-YAj-IO.js";import"./Avatar-cwwpNdqk.js";import"./Icon-Bd2Gfizk.js";import"./video-off-DUi-TqVn.js";import"./video-DypzJN3I.js";import"./monitor-yKdQgZ09.js";import"./grip-vertical-Czq8Uo7j.js";import"./send-DBmxMqjs.js";import"./refresh-cw-BJBMRU9v.js";import"./circle-question-mark-BzZXs17c.js";import"./upload-C7tYkjtk.js";import"./AnimatedLogoMini-B6zedGia.js";/* empty css                                                                         */import"./tooltip-7U8-rvad.js";import"./circle-check-xzHgMljH.js";import"./file-search-Bn3ZsYEQ.js";import"./wallet-DfN8xEQC.js";import"./image-CU5BZ3Wb.js";import"./cpu-bOvzqt6k.js";import"./dialog-CW5w_wTh.js";import"./open-closed-CiJKRND1.js";import"./keyboard-CM8jW1Gj.js";import"./active-element-history-1SsHkF75.js";import"./disposables-JVzIyaVR.js";import"./description-CH7CIC-A.js";import"./transition-D0CE30sk.js";import"./receipt-text-CdpPiafr.js";import"./FollowUpTaskModal.vue_vue_type_script_setup_true_lang-CMXAHDky.js";import"./Button-tIgTMB06.js";import"./utils-Dj5kSLHa.js";import"./index-Cb8geMzt.js";import"./index-BUhRIvLQ.js";import"./index-CroEGN42.js";import"./check-check-BBacMcIT.js";import"./user-plus-BIIFrZm8.js";import"./SurveyorAvatar-COM6-DaG.js";import"./useTelephony-Gb9WDNb-.js";import"./phone-call-BrB6ewD1.js";import"./history-DpuVT1DJ.js";import"./phone-incoming-xz_1cgpx.js";import"./pause-DhX5YGt5.js";import"./save-DnETlemW.js";import"./users-round-G_G1fxZF.js";import"./useChatHub-efociDyw.js";import"./handshake-GPX40eLA.js";import"./eye-hgQz1Bz5.js";import"./bot-CxYjJeh9.js";import"./globe-BUoYScDl.js";import"./file-key-D00z6oeF.js";import"./user-x-CheJ_1T4.js";import"./message-circle-oPrxIruY.js";import"./award-DVmYzLJc.js";import"./menu-C8BKYvlP.js";import"./book-open-Dsi24aWS.js";import"./bell-BnmfLsAP.js";import"./gem-CM6kv8YR.js";import"./calendar-check-qXulTrFv.js";import"./settings-kph8Slzw.js";import"./log-out-CydYSR5l.js";import"./sliders-horizontal-jU65eH4z.js";import"./radio-BNkVfxOF.js";import"./plane-CGVQem9a.js";import"./film-BsJDSHaz.js";import"./printer-QRwqB39C.js";import"./pen-tool-z8iWES5d.js";import"./megaphone-DN1OxKmL.js";import"./map-pinned-DdKkn8oh.js";import"./library-DoVZTJ3d.js";import"./file-pen-line-D68orQJK.js";import"./list-checks--ElNPh6C.js";import"./play-CCXnbaPm.js";import"./activity-BSQ_zaAq.js";import"./code-xml-DNQCXKmA.js";import"./heart-pulse--V4ckXZW.js";import"./git-branch-hxJW-6BD.js";import"./pen-line-NGtLVT8C.js";import"./lightbulb-D3MrsQxk.js";import"./at-sign-d7fVKctX.js";import"./grid-2x2-D6YE8xw7.js";import"./circle-NE3so71u.js";import"./calendar-clock-BpBm_Pbs.js";import"./house-heart-BOl5N1QW.js";import"./layout-dashboard-BZkek7_4.js";/* empty css                                                                   */const Et={class:"mx-auto max-w-7xl space-y-6 px-4 py-6 sm:px-6 lg:px-8"},Ft={class:"flex items-center justify-between"},zt={class:"flex items-center gap-3"},Mt={class:"rounded-xl bg-gray-900 p-2.5"},Ot={class:"flex gap-1 border-b border-stone-200"},Ut={key:0,class:"flex items-center gap-2"},jt={class:"inline-flex items-center gap-2 rounded-full bg-stone-100 px-3 py-1.5 text-sm font-medium text-stone-600"},Gt={key:0,class:"text-stone-400"},Rt={key:1,class:"brand-box p-4"},Ht={class:"grid grid-cols-2 gap-4 sm:grid-cols-4"},Xt={class:"text-lg font-bold text-stone-900"},qt={class:"text-lg font-bold text-stone-900"},Yt={class:"text-lg font-bold text-stone-700"},Jt={class:"text-lg font-bold text-stone-900"},Kt={class:"brand-box p-4"},Qt={class:"grid grid-cols-2 gap-4 sm:grid-cols-4"},Wt={class:"text-lg font-bold text-stone-900"},Zt={class:"text-lg font-bold text-stone-900"},te={class:"text-lg font-bold text-amber-700"},ee={class:"text-lg font-bold text-stone-900"},se={class:"flex flex-wrap gap-2"},oe=["onClick"],ne={class:"opacity-70"},ie={key:3,class:"grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-5"},ae={class:"flex items-center gap-3"},le={class:"text-2xl font-bold text-stone-900"},re={class:"text-xs text-stone-500"},de={key:4,class:"brand-box p-4"},pe={class:"flex items-center gap-2 mb-3"},ue={class:"grid grid-cols-2 gap-4 sm:grid-cols-4"},me={class:"text-lg font-bold text-stone-900"},xe={class:"text-lg font-bold text-stone-900"},ce={class:"text-lg font-bold text-stone-700"},ve={class:"text-lg font-bold text-stone-900"},fe={key:5,class:"brand-box flex flex-wrap items-center justify-between gap-3 p-4"},be={class:"flex items-center gap-3"},ge={class:"text-lg font-bold text-stone-900"},_e={class:"text-xs text-stone-500"},ye={class:"brand-box p-4"},we={class:"flex flex-wrap items-center gap-3"},he={class:"relative flex-1 min-w-[200px]"},Ce={key:6,class:"brand-box overflow-x-auto"},Se={class:"min-w-full divide-y divide-stone-100"},ke={class:"divide-y divide-stone-100"},Te={class:"px-4 py-3"},Ae={class:"text-sm font-medium text-stone-900"},Ie={key:0,class:"text-xs text-stone-400"},Pe={class:"px-4 py-3"},Ne={key:0,class:"text-[10px] text-stone-400"},Be={class:"px-4 py-3 text-sm text-stone-600"},Le={key:1,class:"text-amber-600"},Ve={class:"px-4 py-3 text-right text-sm tabular-nums text-stone-700"},De={class:"px-4 py-3 text-right text-xs tabular-nums text-stone-500"},$e={class:"px-4 py-3 text-right text-sm font-semibold tabular-nums text-stone-900"},Ee={class:"px-4 py-3 text-sm"},Fe={class:"font-medium text-stone-900"},ze={key:0,class:"ml-1.5 text-[11px] text-amber-700"},Me={key:1,class:"ml-1.5 text-[11px] text-stone-400"},Oe=["href"],Ue={key:1,class:"text-stone-400"},je={key:2,class:"mt-0.5 max-w-[16rem] text-[11px] text-red-600"},Ge={class:"px-4 py-3 text-sm"},Re={key:0,class:"text-xs text-green-700"},He={key:0,class:"text-stone-400"},Xe=["disabled","onClick"],qe={key:2,class:"flex flex-col items-start gap-1.5"},Ye=["disabled","onClick"],Je=["onClick"],Ke={key:2,class:"flex flex-col gap-1.5"},Qe={class:"flex gap-2"},We=["disabled","onClick"],Ze={key:0,class:"max-w-[14rem] text-[11px] text-red-600"},ts={key:3,class:"text-xs text-stone-400"},es={key:0},ss={colspan:"8",class:"px-4 py-12 text-center text-sm text-stone-500"},os={key:7,class:"brand-box overflow-hidden"},ns={class:"min-w-full divide-y divide-stone-100"},is={class:"divide-y divide-stone-50"},as={class:"px-4 py-3"},ls={class:"text-xs text-stone-500"},rs={key:0,class:"text-[10px] text-stone-400"},ds={class:"px-4 py-3"},ps={class:"text-sm text-stone-700"},us={key:0,class:"text-xs text-stone-400"},ms={class:"px-4 py-3"},xs={key:0,class:"ml-1 inline-flex items-center rounded-full bg-red-50 px-2 py-0.5 text-[10px] font-medium text-red-600"},cs={key:1,class:"ml-1 inline-flex items-center rounded-full bg-stone-100 px-2.5 py-0.5 text-xs font-medium text-stone-500"},vs=["title"],fs={class:"px-4 py-3"},bs={class:"text-xs text-stone-500"},gs={key:0,class:"text-green-600"},_s={key:1,class:"text-amber-600"},ys={key:0,class:"ml-1.5 text-[11px] text-stone-400"},ws=["href"],hs=["disabled","onClick"],Cs={key:3,class:"mt-0.5 max-w-[16rem] text-[11px] text-red-600"},Ss={class:"text-xs text-stone-500"},ks={class:"px-4 py-3 text-sm text-stone-600"},Ts={key:0},As={key:8,class:"flex items-center justify-between"},Is={class:"text-sm text-stone-500"},Ps={class:"flex gap-1"},Ns=["innerHTML"],Pi={__name:"Index",props:{checks:{type:Object,required:!0},stats:{type:Object,default:()=>({})},revenue:{type:Object,default:()=>({})},filters:{type:Object,default:()=>({})},activeBranch:{type:Object,default:null},tab:{type:String,default:"all"},invoiceStatus:{type:String,default:"owed"},tabCounts:{type:Object,default:()=>({})},tabStats:{type:Object,default:()=>({})}},setup(l){const d=l,A=m(d.filters.search??""),k=m(d.filters.status??"all"),I=m(d.filters.date_from??""),P=m(d.filters.date_to??""),U=m(d.filters.branch_id??""),x=m(d.tab),T=m(d.invoiceStatus),j={owed:"Owed",paid:"Paid",all:"All"},dt={owed:"Nothing owed to agents right now.",paid:"No agent payouts marked paid yet.",all:"No invoice-route checks yet."},pt=H(()=>[{value:"all",label:"All",icon:kt,count:d.tabCounts.all??0}
1,{value:"stripe",label:"Stripe payments",icon:Tt,count:d.tabCounts.stripe??0},{value:"invoice",label:`Invoices payable · ${d.tabCounts.invoice_owed??0} owed`,icon:lt}]),ut=H(()=>[{value:"owed",label:j.owed,count:d.tabCounts.invoice_owed??0},{value:"paid",label:j.paid,count:d.tabCounts.invoice_paid??0},{value:"all",label:j.all,count:d.tabCounts.invoice_all??0}]);function q(i){x.value=i,T.value="owed",y()}function mt(i){T.value=i,y()}function y(){at.get(route("admin.aml.index"),{search:A.value||void 0,status:k.value!=="all"?k.value:void 0,date_from:I.value||void 0,date_to:P.value||void 0,branch_id:U.value||void 0,payout:x.value!=="all"?x.value:void 0,invoice_status:x.value==="invoice"&&T.value!=="owed"?T.value:void 0},{preserveState:!0,replace:!0})}function xt(){U.value="",y()}function ct(){A.value="",k.value="all",I.value="",P.value="",U.value="",y()}const G=m({}),c=m({}),w=m({});function v(i){return G.value[i.id]??i.agent_invoice??null}function E(i){const s=v(i);return!!(s!=null&&s.pending&&(s!=null&&s.stale))}function Y(i){return i.owes_agent_payout&&!v(i)||E(i)}async function R(i){var s,h;if(!c.value[i.id]){c.value={...c.value,[i.id]:!0},w.value={...w.value,[i.id]:null};try{const{data:C}=await it.post(route("admin.aml.agent-invoice.issue",{check:i.id}));G.value={...G.value,[i.id]:C.agent_invoice}}catch(C){w.value={...w.value,[i.id]:((h=(s=C.response)==null?void 0:s.data)==null?void 0:h.message)||"Failed to generate the invoice."}}finally{c.value={...c.value,[i.id]:!1}}}}function J(i){if(i.payout_method!=="invoice")return null;if(!i.is_paid)return"Invoice · awaiting client";const s=v(i)?" · invoiced":"";return(i.agent_paid_at?"Invoice · paid":i.agent_vat_registered===!0?`Invoice · owed ${p(i.agent_share)} incl. VAT`:`Invoice · owed ${p(i.agent_amount_due??i.agent_share)}${i.agent_vat>0?" (VAT covered by us)":""}`)+s}const F=m(null),z=m(""),M=m(!1),N=m(null);function vt(i){F.value=i.id,z.value="",N.value=null}async function ft(i){var s,h;if(!M.value){M.value=!0,N.value=null;try{await it.post(route("admin.aml.mark-agent-paid",{check:i.id}),{reference:z.value.trim()||null}),F.value=null,at.reload({preserveScroll:!0})}catch(C){N.value=((h=(s=C.response)==null?void 0:s.data)==null?void 0:h.message)||"Failed to mark the agent payout as paid."}finally{M.value=!1}}}function bt(i){return i.agent_vat?i.agent_vat_registered===!0?`${p(i.agent_vat)} (in share)`:`${p(i.agent_vat)} (we cover)`:"—"}function B(i){return i?new Date(i).toLocaleDateString("en-GB",{day:"numeric",month:"short",year:"numeric"}):"—"}function p(i){return i?"£"+(i/100).toFixed(2):"£0.00"}function K(i){return{pending:{label:"Pending",classes:"bg-stone-100 text-stone-600"},sent:{label:"Sent",classes:"bg-stone-100 text-stone-600"},in_progress:{label:"In Progress",classes:"bg-amber-100 text-amber-700"},complete:{label:"Submitted",classes:"bg-stone-100 text-stone-600"},approved:{label:"Approved",classes:"bg-green-100 text-green-700"},declined:{label:"Declined",classes:"bg-red-100 text-red-700"},review_needed:{label:"Needs Review",classes:"bg-orange-100 text-orange-700"},expired:{label:"Expired",classes:"bg-red-50 text-red-600"}}[i]??{label:i,classes:"bg-stone-100 text-stone-600"}}function gt(i){return i.check_type==="idv"}const _t=H(()=>[{label:"Total",value:d.stats.total??0,icon:At},{label:"Pending",value:d.stats.pending??0,icon:rt},{label:"Approved",value:d.stats.approved??0,icon:It},{label:"Declined",value:d.stats.declined??0,icon:Pt},{label:"Needs Review",value:d.stats.review_needed??0,icon:Nt},{label:"Expired",value:d.stats.expired??0,icon:rt}]);let Q=null;function yt(){clearTimeout(Q),Q=setTimeout(y,400)}return(i,s)=>(o(),X(Ct,{title:"AML Checks"},{default:L(()=>{var h,C,W,Z,tt,et,st,ot;return[t("div",Et,[t("div",Ft,[t("div",zt,[t("div",Mt,[f(b(Bt),{class:"size-5 text-white"})]),s[7]||(s[7]=t("div",null,[t("h1",{class:"text-xl font-semibold text-stone-900"},"AML Checks"),t("p",{class:"text-sm text-stone-500"},"All identity verification checks across agents")],-1))])]),t("div",Ot,[f(b($),{href:i.route("admin.aml.index"),class:"border-b-2 border-stone-900 px-4 py-2 text-sm font-medium text-stone-900"},{default:L(()=>[...s[8]||(s[8]=[g(" Checks ",-1)])]),_:1},8,["href"]),f(b($),{href:i.route("admin.aml.customers"),class:"border-b-2 border-transparent px-4 py-2 text-sm font-medium text-stone-500 hover:text-stone-700"},{default:L(()=>[...s[9]||(s[9]=[g(" Branches ",-1)])]),_:1},8,["href"])]),l.activeBranch?(o(),n("div",Ut,[t("span",jt,[g(" Filtered by: "+a(l.activeBranch.name),1),l.activeBranch.company_name?(o(),n("span",Gt," · "+a(l.activeBranch.company_name),1)):r("",!0),t("button",{onClick:xt,class:"rounded-full p-0.5 hover:bg-stone-200"},[f(b(Lt),{class:"size-3.5"})])])])):r("",!0),f(St,{"model-value":x.value,tabs:pt.value,"onUpdate:modelValue":q},null,8,["model-value","tabs"]),x.value==="stripe"?(o(),n("div",Rt,[t("div",Ht,[t("div",null,[s[10]||(s[10]=t("p",{class:"text-xs text-stone-500"},"Gross received",-1)),t("p",Xt,a(p((h=l.tabStats.stripe)==null?void 0:h.total_received)),1)]),t("div",null,[s[11]||(s[11]=t("p",{class:"text-xs text-stone-500"},"Platform fees",-1)),t("p",qt,a(p((C=l.tabStats.stripe)==null?void 0:C.total_fees)),1)]),t("div",null,[s[12]||(s[12]=t("p",{class:"text-xs text-stone-500"},"Net to agents",-1)),t("p",Yt,a(p((W=l.tabStats.stripe)==null?void 0:W.total_net)),1)]),t("div",null,[s[13]||(s[13]=t("p",{class:"text-xs text-stone-500"},"Paid checks",-1)),t("p",Jt,a(((Z=l.tabStats.stripe)==null?void 0:Z.paid_checks)??0),1)])])])):r("",!0),x.value==="invoice"?(o(),n(u,{key:2},[t("div",Kt,[t("div",Qt,[t("div",null,[s[14]||(s[14]=t("p",{class:"text-xs text-stone-500"},"Owed to agents",-1)),t("p",Wt,a(p((tt=l.tabStats.invoice)==null?void 0:tt.owed)),1)]),t("div",null,[s[15]||(s[15]=t("p",{class:"text-xs text-stone-500"},"VAT we cover",-1)),t("p",Zt,a(p((et=l.tabStats.invoice)==null?void 0:et.owed_vat_covered)),1)]),t("div",null,[s[16]||(s[16]=t("p",{class:"text-xs text-stone-500"},"Awaiting invoice",-1)),t("p",te,a(((st=l.tabStats.invoice)==null?void 0:st.owed_awaiting_invoice)??0),1)]),t("div",null,[s[17]||(s[17]=t("p",{class:"text-xs text-stone-500"},"Invoiced, to pay",-1)),t("p",ee,a(((ot=l.tabStats.invoice)==null?void 0:ot.owed_invoiced)??0),1)])])]),t("div",se,[(o(!0),n(u,null,V(ut.value,e=>(o(),n("button",{key:e.value,type:"button",onClick:_=>mt(e.value),class:S(["rounded-full border px-3 py-1.5 text-xs font-medium transition",T.value===e.value?"border-stone-900 bg-stone-900 text-white":"border-stone-200 text-stone-600 hover:bg-stone-50"])},[g(a(e.label)+" ",1),t("span",ne,"("+a(e.count)+")",1)],10,oe))),128))])],64)):r("",!0),x.value==="all"?(o(),n("div",ie,[(o(!0),n(u,null,V(_t.value,e=>(o(),n("div",{key:e.label,class:"brand-box p-4"},[t("div",ae,[(o(),X(wt(e.icon),{class:"size-6 shrink-0 text-stone-400","stroke-width":"1.75"})),t("div",null,[t("p",le,a(e.value),1),t("p",re,a(e.label),1)])])]))),128))])):r("",!0),x.value==="all"&&l.revenue.paid_checks>0?(o(),n("div",de,[t("div",pe,[f(b(Vt),{class:"size-4 text-stone-400"}),s[18]||(s[18]=t("h3",{class:"text-sm font-semibold text-stone-900"},"Revenue Summary",-1))]),t("div",ue,[t("div",null,[s[19]||(s[19]=t("p",{class:"text-xs text-stone-500"},"Total Received",-1)),t("p",me,a(p(l.revenue.total_received)),1)]),t("div",null,[s[20]||(s[20]=t("p",{class:"text-xs text-stone-500"},"Platform Fees",-1)),t("p",xe,a(p(l.revenue.total_fees)),1)]),t("div",null,[s[21]||(s[21]=t("p",{class:"text-xs text-stone-500"},"Net to Agents",-1)),t("p",ce,a(p(l.revenue.total_net)),1)]),t("div",null,[s[22]||(s[22]=t("p",{class:"text-xs text-stone-500"},"Paid Checks",-1)),t("p",ve,a(l.revenue.paid_checks),1)])])])):r("",!0),x.value==="all"&&l.revenue.agent_owed>0?(o(),n("div",fe,[t("div",be,[f(b(lt),{class:"size-6 shrink-0 text-stone-400","stroke-width":"1.75"}),t("div",null,[t("p",ge,a(p(l.revenue.agent_owed)),1),t("p",_e,[s[23]||(s[23]=g("Owed to agents (invoice)",-1)),l.revenue.agent_owed_vat>0?(o(),n(u,{key:0},[g(" · we cover "+a(p(l.revenue.agent_owed_vat))+" VAT",1)],64)):r("",!0)])])]),t("button",{onClick:s[0]||(s[0]=e=>q("invoice")),class:"rounded-xl border border-stone-200 px-3 py-2 text-xs font-medium text-stone-600 hover:bg-stone-50"}," Show owed checks ")])):r("",!0),t("div",ye,[t("div",we,[t("div",he,[f(b(Dt),{class:"absolute left-3 top-1/2 size-4 -translate-y-1/2 text-stone-400"}),D(t("input",{"onUpdate:modelValue":s[1]||(s[1]=e=>A.value=e),onInput:yt,type:"text",placeholder:"Search name, email, or reference...",class:"w-full rounded-xl border border-stone-200 py-2 pl-10 pr-4 text-sm focus:border-stone-400 focus:outline-none"},null,544),[[O,A.value]])]),D(t("select",{"onUpdate:modelValue":s[2]||(s[2]=e=>k.value=e),onChange:y,class:"rounded-xl border border-stone-200 px-3 py-2 text-sm focus:border-stone-400 focus:outline-none"},[...s[24]||(s[24]=[t("option",{value:"all"},"All statuses",-1),t("option",{value:"pending"},"Pending",-1),t("option",{value:"sent"},"Sent",-1),t("option",{value:"in_progress"},"In Progress",-1),t("option",{value:"complete"},"Submitted",-1),t("option",{value:"approved"},"Approved",-1),t("option",{value:"declined"},"Declined",-1),t("option",{value:"review_needed"},"Needs Review",-1),t("option",{value:"expired"},"Expired",-1)])],544),[[ht,k.value]]),D(t("input",{"onUpdate:modelValue":s[3]||(s[3]=e=>I.value=e),onChange:y,type:"date",class:"rounded-xl border border-stone-200 px-3 py-2 text-sm focus:border-stone-400 focus:outline-none",placeholder:"From"},null,544),[[O,I.value]]),D(t("input",{"onUpdate:modelValue":s[4]||(s[4]=e=>P.value=e),onChange:y,type:"date",class:"rounded-xl border border-stone-200 px-3 py-2 text-sm focus:border-stone-400 focus:outline-none",placeholder:"To"},null,544),[[O,P.value]]),A.value||k.value!=="all"||I.value||P.value?(o(),n("button",{key:0,onClick:ct,class:"rounded-xl border border-stone-200 px-3 py-2 text-xs font-medium text-stone-600 hover:bg-stone-50"}," Clear ")):r("",!0)])]),x.value==="invoice"?(o(),n("div",Ce,[t("table",Se,[s[25]||(s[25]=t("thead",null,[t("tr",{class:"bg-stone-50"},[t("th",{class:"px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-stone-500"},"Agency"),t("th",{class:"px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-stone-500"},"Client"),t("th",{class:"px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-stone-500"},"Paid"),t("th",{class:"px-4 py-3 text-right text-xs font-medium uppercase tracking-wider text-stone-500"},"Share"),t("th",{class:"px-4 py-3 text-right text-xs font-medium uppercase tracking-wider text-stone-500"},"VAT"),t("th",{class:"px-4 py-3 text-right text-xs font-medium uppercase tracking-wider text-stone-500"},"Amount due"),t("th",{class:"px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-stone-500"},"Invoice"),t("th",{class:"px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-stone-500"},"Actions")])],-1)),t("tbody",ke,[(o(!0),n(u,null,V(l.checks.data,e=>(o(),n("tr",{key:e.id,class:"align-top hover:bg-stone-50"},[t("td",Te,[t("p",Ae,a(e.agency_name??"—"),1),e.agent_branch?(o(),n("p",Ie,a(e.agent_branch.name),1)):r("",!0)]),t("td",Pe,[f(b($),{href:i.route("admin.aml.show",{check:e.id}),class:"text-sm font-medium text-stone-900 hover:underline"},{default:L(()=>[g(a(e.recipient_name),1)]),_:2},1032,["href"]),e.reference?(o(),n("p",Ne,a(e.reference),1)):r("",!0)]),t("td",Be,[e.is_paid?(o(),n(u,{key:0},[g(a(e.client_paid_at?B(e.client_paid_at):"Paid"),1)],64)):(o(),n("span",Le,"Awaiting client"))]),t("td",Ve,a(e.agent_share!=null?p(e.agent_share):"—"),1),t("td",De,a(bt(e)),1),t("td",$e,a(e.agent_amount_due!=null?p(e.agent_amount_due):"—"),1),t("td",Ee,[v(e)?(o(),n(u,{key:0},[t("span",Fe,a(v(e).number),1),E(e)?(o(),n("span",ze,"Didn't finish")):v(e).pending?(o(),n("span",Me,"Generating…")):(o(),n("a",{key:2,href:v(e).download_url,class:"ml-1.5 text-[11px] font-medium text-rose-600 hover:underline"},"Download",8,Oe))],64)):(o(),n("span",Ue,"Not invoiced")),w.value[e.id]?(o(),n("p",je,a(w.value[e.id]),1)):r("",!0)]),t("td",Ge,[e.agent_paid_at?(o(),n("p",Re,[g(" Paid "+a(B(e.agent_paid_at)),1),e.agent_paid_reference?(o(),n("span",He," · "+a(e.agent_paid_reference),1)):r("",!0)])):r("",!0),e.agent_paid_at&&E(e)?(o(),n("button",{key:1,type:"button",disabled:c.value[e.id],onClick:_=>R(e),class:"mt-1 text-[11px] font-medium text-rose-600 hover:underline disabled:text-stone-400"},a(c.value[e.id]?"Generating…":"Generate invoice"),9,Xe)):e.owes_agent_payout?(o(),n("div",qe,[Y(e)?(o(),n("button",{key:0,t
1ype:"button",disabled:c.value[e.id],onClick:_=>R(e),class:"text-[11px] font-medium text-rose-600 hover:underline disabled:text-stone-400"},a(c.value[e.id]?"Generating…":"Generate invoice"),9,Ye)):r("",!0),F.value!==e.id?(o(),n("button",{key:1,type:"button",onClick:_=>vt(e),class:"text-[11px] font-medium text-stone-700 hover:underline"}," Mark paid ",8,Je)):(o(),n("div",Ke,[D(t("input",{"onUpdate:modelValue":s[5]||(s[5]=_=>z.value=_),type:"text",maxlength:"255",placeholder:"Payment reference (optional)",class:"w-48 rounded-lg border border-stone-200 px-2 py-1 text-xs focus:border-stone-400 focus:outline-none"},null,512),[[O,z.value]]),t("div",Qe,[t("button",{type:"button",disabled:M.value,onClick:_=>ft(e),class:"rounded-lg bg-gray-900 px-2.5 py-1 text-[11px] font-medium text-white hover:bg-gray-800 disabled:opacity-50"}," Confirm paid ",8,We),t("button",{type:"button",onClick:s[6]||(s[6]=_=>F.value=null),class:"text-[11px] text-stone-500 hover:underline"},"Cancel")]),N.value?(o(),n("p",Ze,a(N.value),1)):r("",!0)]))])):(o(),n("span",ts,"—"))])]))),128)),l.checks.data.length===0?(o(),n("tr",es,[t("td",ss,a(dt[T.value]),1)])):r("",!0)])])])):(o(),n("div",os,[t("table",ns,[s[36]||(s[36]=t("thead",null,[t("tr",{class:"bg-stone-50"},[t("th",{class:"px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-stone-500"},"Name"),t("th",{class:"px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-stone-500"},"Agent"),t("th",{class:"px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-stone-500"},"Status"),t("th",{class:"px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-stone-500"},"Funded by"),t("th",{class:"px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-stone-500"},"Created"),t("th",{class:"px-4 py-3 text-left text-xs font-medium uppercase tracking-wider text-stone-500"},"Expires")])],-1)),t("tbody",is,[(o(!0),n(u,null,V(l.checks.data,e=>{var _,nt;return o(),n("tr",{key:e.id,class:S(["hover:bg-stone-50",e.deleted_at?"bg-stone-50/60":""])},[t("td",as,[f(b($),{href:i.route("admin.aml.show",{check:e.id}),class:"group"},{default:L(()=>[t("p",{class:S(["text-sm font-medium group-hover:text-stone-900",e.deleted_at?"text-stone-500 line-through decoration-stone-300":"text-stone-900"])},a(e.recipient_name),3),t("p",ls,a(e.recipient_email),1),e.reference?(o(),n("p",rs,a(e.reference),1)):r("",!0)]),_:2},1032,["href"])]),t("td",ds,[t("p",ps,a(((_=e.agent_branch)==null?void 0:_.name)??"—"),1),e.created_by?(o(),n("p",us,"by "+a(e.created_by.name),1)):r("",!0)]),t("td",ms,[t("span",{class:S(["inline-flex items-center rounded-full px-2.5 py-0.5 text-xs font-medium",K(e.status).classes])},a(K(e.status).label),3),e.is_expired&&!e.verified?(o(),n("span",xs," Expired ")):r("",!0),gt(e)?(o(),n("span",cs," ID only ")):r("",!0),e.deleted_at?(o(),n("span",{key:2,title:"Deleted by the agent on "+B(e.deleted_at),class:"ml-1 inline-flex items-center gap-1 rounded-full border border-red-200 bg-red-50 px-2.5 py-0.5 text-xs font-medium text-red-700"},[f(b($t),{class:"size-3"}),s[26]||(s[26]=g(" Deleted ",-1))],8,vs)):r("",!0)]),t("td",fs,[e.client_payment_amount?(o(),n(u,{key:0},[s[27]||(s[27]=t("div",{class:"flex items-center gap-1.5"},[t("span",{class:"size-1.5 rounded-full bg-green-500"}),t("span",{class:"text-sm font-medium text-stone-900"},"Consumer")],-1)),t("p",bs,[g(a(e.client_payment_display)+" · ",1),e.is_paid?(o(),n("span",gs,"Paid")):(o(),n("span",_s,"Unpaid"))]),J(e)?(o(),n("span",{key:0,class:S(["mt-1 inline-flex items-center rounded-full px-2 py-0.5 text-[10px] font-medium",e.owes_agent_payout?"bg-amber-100 text-amber-700":"bg-stone-100 text-stone-600"])},a(J(e)),3)):r("",!0),e.payout_method==="invoice"&&e.is_paid?(o(),n(u,{key:1},[(nt=v(e))!=null&&nt.pending&&!E(e)?(o(),n("span",ys,"Generating…")):v(e)&&!v(e).pending?(o(),n("a",{key:1,href:v(e).download_url,class:"ml-1.5 text-[11px] font-medium text-rose-600 hover:underline"},"Download",8,ws)):Y(e)?(o(),n("button",{key:2,type:"button",disabled:c.value[e.id],onClick:Bs=>R(e),class:"ml-1.5 text-[11px] font-medium text-rose-600 hover:underline disabled:text-stone-400"},a(c.value[e.id]?"Generating…":"Generate invoice"),9,hs)):r("",!0),w.value[e.id]?(o(),n("p",Cs,a(w.value[e.id]),1)):r("",!0)],64)):r("",!0)],64)):e.credit_type==="founder_monthly"?(o(),n(u,{key:1},[s[28]||(s[28]=t("div",{class:"flex items-center gap-1.5"},[t("span",{class:"size-1.5 rounded-full bg-amber-500"}),t("span",{class:"text-sm font-medium text-stone-900"},"Subscription")],-1)),s[29]||(s[29]=t("p",{class:"text-xs text-stone-500"},"Included in plan",-1))],64)):e.credit_type==="purchased"?(o(),n(u,{key:2},[s[30]||(s[30]=t("div",{class:"flex items-center gap-1.5"},[t("span",{class:"size-1.5 rounded-full bg-blue-500"}),t("span",{class:"text-sm font-medium text-stone-900"},"Agent")],-1)),t("p",Ss,a(p(e.credit_price_pence))+" credit",1)],64)):e.credit_type==="connect_passthrough"?(o(),n(u,{key:3},[s[31]||(s[31]=t("div",{class:"flex items-center gap-1.5"},[t("span",{class:"size-1.5 rounded-full bg-blue-500"}),t("span",{class:"text-sm font-medium text-stone-900"},"Agent")],-1)),s[32]||(s[32]=t("p",{class:"text-xs text-stone-500"},"Connect pass-through",-1))],64)):(o(),n(u,{key:4},[s[33]||(s[33]=t("div",{class:"flex items-center gap-1.5"},[t("span",{class:"size-1.5 rounded-full bg-stone-300"}),t("span",{class:"text-sm font-medium text-stone-500"},"Unfunded")],-1)),s[34]||(s[34]=t("p",{class:"text-xs text-stone-400"},"No payment recorded",-1))],64))]),t("td",ks,a(B(e.created_at)),1),t("td",{class:S(["px-4 py-3 text-sm",e.is_expired?"text-red-600":"text-stone-500"])},a(B(e.expires_at)),3)],2)}),128)),l.checks.data.length===0?(o(),n("tr",Ts,[...s[35]||(s[35]=[t("td",{colspan:"6",class:"px-4 py-12 text-center text-sm text-stone-500"},"No AML checks found.",-1)])])):r("",!0)])])])),l.checks.links&&l.checks.links.length>3?(o(),n("div",As,[t("p",Is," Showing "+a(l.checks.from)+"–"+a(l.checks.to)+" of "+a(l.checks.total),1),t("div",Ps,[(o(!0),n(u,null,V(l.checks.links,e=>(o(),n(u,{key:e.label},[e.url?(o(),X(b($),{key:0,href:e.url,class:S(["rounded-lg px-3 py-1.5 text-sm",e.active?"bg-gray-900 text-white":"border border-stone-200 text-stone-600 hover:bg-stone-50"]),innerHTML:e.label,"preserve-state":""},null,8,["href","class","innerHTML"])):(o(),n("span",{key:1,class:"rounded-lg px-3 py-1.5 text-sm text-stone-300",innerHTML:e.label},null,8,Ns))],64))),128))])])):r("",!0)])]}),_:1}))}};export{Pi 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.