PageSourceSearch

https://atzuma.co.il/assets/AdminOperations-BVtjkk28.js

js atzuma.co.il collected 2026-10-02 07:46:59 UTC 25,679 bytes, 3 lines download raw bytes

1import{j as e}from"./index-C_Fqshtm.js";import{u as me,r as s}from"./router-BXL9ASSk.js";import"./vendor-BNcAc9ko.js";(function(){try{var l=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};l.SENTRY_RELEASE={id:"[email protected]"}}catch{}})();try{(function(){var l=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new l.Error().stack;r&&(l._sentryDebugIds=l._sentryDebugIds||{},l._sentryDebugIds[r]="a986caa8-cca9-4e99-bc9b-2d4cc0ea6bc8",l._sentryDebugIdIdentifier="sentry-dbid-a986caa8-cca9-4e99-bc9b-2d4cc0ea6bc8")})()}catch{}const we=()=>{const l=me(),[r,p]=s.useState("status"),[D,W]=s.useState(""),[g,A]=s.useState(!1),[x,b]=s.useState(null),[te,ie]=s.useState([]),[E,$]=s.useState(""),[h,U]=s.useState(!1),[m,y]=s.useState(null),[N,V]=s.useState(""),[j,F]=s.useState(!1),[i,M]=s.useState(null),[w,oe]=s.useState(""),[S,O]=s.useState(!1),[c,q]=s.useState(null),[ye,Y]=s.useState(null),[k,ne]=s.useState(!1),[_,se]=s.useState(""),[v,H]=s.useState(!1),[a,J]=s.useState(null),[Q,z]=s.useState(""),[re,B]=s.useState(!1),[G,R]=s.useState(""),[ae,K]=s.useState(!1),[C,L]=s.useState(""),[le,I]=s.useState(!1),[P,u]=s.useState(null),[de,X]=s.useState(""),ce=()=>{L(""),u(null),I(!1),R(""),X(""),B(!1)};s.useEffect(()=>{window.scrollTo(0,0)},[]),s.useEffect(()=>{Z()},[]);const Z=async()=>{try{const t=await fetch("/api/v1/admin/operations/recent-verifications",{headers:{Authorization:`Bearer ${localStorage.getItem("auth_token")}`,Accept:"application/json"}});if(t.ok){const n=await t.json();ie(n)}}catch(t){console.error("Failed to fetch verifications:",t)}},pe=async t=>{t.preventDefault(),A(!0),b(null);try{const o=await(await fetch("/api/v1/admin/operations/verify-email",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("auth_token")}`,Accept:"application/json"},body:JSON.stringify({email:D})})).json();o.success?(b({type:"success",text:o.message}),W(""),Z()):b({type:"warning",text:o.message})}catch{b({type:"error",text:"Failed to verify email"})}finally{A(!1)}},xe=async t=>{t.preventDefault(),U(!0),y(null);try{const o=await(await fetch("/api/v1/admin/operations/unsubscribe-email",{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${localStorage.getItem("auth_token")}`,Accept:"application/json"},body:JSON.stringify({email:E})})).json();o.success?(y({type:"success",text:o.message}),$("")):y({type:"error",text:o.message})}catch{y({type:"error",text:"Failed to unsubscribe email"})}finally{U(!1)}},T=async(t,n)=>{let o=N;if(typeof t=="string"?o=t:(t?.preventDefault(),n&&(o=n)),!!o){F(!0),M(null),ce();try{const d=await fetch(`/api/v1/admin/operations/email-status/${encodeURIComponent(o)}`,{headers:{Authorization:`Bearer ${localStorage.getItem("auth_token")}`,Accept:"application/json"}});if(d.ok){const he=await d.json();M(he)}}catch(d){console.error("Failed to check status:",d)}finally{F(!1)}}},ue=async()=>{const t=i?.email;if(t&&window.confirm(`Unblock ${t}? Clears the DB block and attempts to clear the Postmark suppression.`)){B(!0);try{const n=await fetch("/api/v1/admin/operations/unblock-email",{method:"POST",headers:{Authorization:`Bearer ${localStorage.getItem("auth_token")}`,Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({email:t})}),o=await n.json();n.ok&&o.success?(alert(`${o.message}
2${o.postmark?.message||""}`),await T(t)):alert(o.message||"Unblock failed")}catch(n){console.error("Unblock failed:",n),alert("Unblock request failed")}finally{B(!1)}}},ee=async t=>{const n=i?.email;if(n){K(!0),u(null),L(""),I(!1);try{const o=await fetch("/api/v1/admin/operations/set-password",{method:"POST",headers:{Authorization:`Bearer ${localStorage.getItem("auth_token")}`,Accept:"application/json","Content-Type":"application/json"},body:JSON.stringify({email:n,password:t?null:G})}),d=await o.json();o.ok&&d.success?(L(d.password),X(n),u({type:"success",text:"Password set. Shown once below — copy it now."}),R("")):u({type:"error",text:d.message||"Failed to set password"})}catch(o){console.error("Set password failed:",o),u({type:"error",text:"Request failed"})}finally{K(!1)}}},fe=async t=>{if(t?.preventDefault(),!(w.trim().length<2)){O(!0),q(null),Y(null);try{const n=await fetch(`/api/v1/admin/operations/search-by-name?q=${encodeURIComponent(w)}${k?"&signers=1":""}`,{headers:{Authorization:`Bearer ${localStorage.getItem("auth_token")}`,Accept:"application/json"}});if(n.ok){const o=await n.json();q(o)}}catch(n){console.error("Failed to search by name:",n)}finally{O(!1)}}},ge=t=>{Y(t),V(t.payer_email),p("status"),T(t.payer_email)},be=async t=>{if(t.preventDefault(),_.trim().length!==0){H(!0),z(""),J(null);try{const n=await fetch(`/api/v1/admin/operations/find-by-petition?petition=${encodeURIComponent(_)}`,{headers:{Authorization:`Bearer ${localStorage.getItem("auth_token")}`,Accept:"application/json"}}),o=await n.json();n.ok?J(o):z(o.error||"שגיאה בחיפוש")}catch(n){console.error("Failed to find petition:",n),z("שגיאה בחיפוש")}finally{H(!1)}}},f=t=>({padding:"12px 24px",border:"none",background:t?"#059669":"#e5e7eb",color:t?"white":"#374151",fontWeight:600,cursor:"pointer",borderRadius:"8px 8px 0 0",transition:"all 0.2s"});return e.jsx("div",{style:{minHeight:"100vh",background:"#f3f4f6",padding:"20px"},children:e.jsxs("div",{style:{maxWidth:"900px",margin:"0 auto"},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"24px"},children:[e.jsx("h1",{style:{fontSize:"28px",fontWeight:"bold",color:"#111827"},children:"🔧 Operations Tools"}),e.jsx("button",{onClick:()=>l("/admin/hub"),style:{padding:"10px 20px",background:"#6b7280",color:"white",border:"none",borderRadius:"8px",cursor:"pointer",fontWeight:600},children:"← Back to Admin"})]}),e.jsxs("div",{style:{display:"flex",gap:"4px",marginBottom:"0"},children:[e.jsx("button",{style:f(r==="status"),onClick:()=>p("status"),children:"🔍 Email Status"}),e.jsx("button",{style:f(r==="name"),onClick:()=>p("name"),children:"🔎 Find by Name"}),e.jsx("button",{style:f(r==="petition"),onClick:()=>p("petition"),children:"📋 Find by Petition"}),e.jsx("button",{style:f(r==="verify"),onClick:()=>
2p("verify"),children:"✅ Manual Verify"}),e.jsx("button",{style:f(r==="unsubscribe"),onClick:()=>p("unsubscribe"),children:"📤 Unsubscribe"})]}),e.jsxs("div",{style:{background:"white",padding:"30px",borderRadius:"0 8px 8px 8px",boxShadow:"0 2px 10px rgba(0,0,0,0.1)"},children:[r==="verify"&&e.jsxs("div",{children:[e.jsx("h2",{style:{fontSize:"20px",marginBottom:"20px",color:"#374151"},children:"Manual Email Verification"}),e.jsx("p",{style:{color:"#6b7280",marginBottom:"20px"},children:'Use this tool to manually verify emails from users who replied "CONFIRM" to the Gmail verification email.'}),x&&e.jsx("div",{style:{padding:"12px 16px",borderRadius:"8px",marginBottom:"20px",background:x.type==="success"?"#d1fae5":x.type==="warning"?"#fef3c7":"#fee2e2",color:x.type==="success"?"#065f46":x.type==="warning"?"#92400e":"#991b1b"},children:x.text}),e.jsxs("form",{onSubmit:pe,style:{display:"flex",gap:"12px",marginBottom:"30px"},children:[e.jsx("input",{type:"email",value:D,onChange:t=>W(t.target.value),placeholder:"[email protected]",required:!0,style:{flex:1,padding:"12px 16px",border:"2px solid #e5e7eb",borderRadius:"8px",fontSize:"16px"}}),e.jsx("button",{type:"submit",disabled:g,style:{padding:"12px 24px",background:"#059669",color:"white",border:"none",borderRadius:"8px",fontWeight:600,cursor:g?"not-allowed":"pointer",opacity:g?.7:1},children:g?"Verifying...":"✅ Verify"})]}),e.jsx("h3",{style:{fontSize:"16px",color:"#374151",marginBottom:"12px"},children:"Recent Verifications"}),e.jsx("div",{style:{maxHeight:"300px",overflowY:"auto"},children:te.map((t,n)=>e.jsxs("div",{style:{padding:"10px 12px",borderBottom:"1px solid #f3f4f6",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsx("span",{style:{fontWeight:500},children:t.email}),e.jsxs("div",{style:{display:"flex",gap:"10px",alignItems:"center"},children:[e.jsx("span",{style:{padding:"2px 8px",background:t.verification_method==="manual_admin"?"#fef3c7":"#e0e7ff",borderRadius:"4px",fontSize:"12px"},children:t.verification_method||"link"}),e.jsx("span",{style:{color:"#9ca3af",fontSize:"12px"},children:new Date(t.verified_at).toLocaleString()})]})]},n))})]}),r==="unsubscribe"&&e.jsxs("div",{children:[e.jsx("h2",{style:{fontSize:"20px",marginBottom:"20px",color:"#374151"},children:"Manual Unsubscribe"}),e.jsx("p",{style:{color:"#6b7280",marginBottom:"20px"},children:"Use this tool to manually unsubscribe users who requested removal via email or other channels."}),m&&e.jsx("div",{style:{padding:"12px 16px",borderRadius:"8px",marginBottom:"20px",background:m.type==="success"?"#d1fae5":"#fee2e2",color:m.type==="success"?"#065f46":"#991b1b"},children:m.text}),e.jsxs("form",{onSubmit:xe,style:{display:"flex",gap:"12px"},children:[e.jsx("input",{type:"email",value:E,onChange:t=>$(t.target.value),placeholder:"[email protected]",required:!0,style:{flex:1,padding:"12px 16px",border:"2px solid #e5e7eb",borderRadius:"8px",fontSize:"16px"}}),e.jsx("button",{type:"submit",disabled:h,style:{padding:"12px 24px",background:"#dc2626",color:"white",border:"none",borderRadius:"8px",fontWeight:600,cursor:h?"not-allowed":"pointer",opacity:h?.7:1},children:h?"Processing...":"📤 Unsubscribe"})]})]}),r==="status"&&e.jsxs("div",{children:[e.jsx("h2",{style:{fontSize:"20px",marginBottom:"20px",color:"#374151"},children:"Email Status Check"}),e.jsx("p",{style:{color:"#6b7280",marginBottom:"20px"},children:"Check the complete status of any email address in the system."}),e.jsxs("form",{onSubmit:T,style:{display:"flex",gap:"12px",marginBottom:"20px"},children:[e.jsx("input",{type:"email",value:N,onChange:t=>V(t.target.value),placeholder:"[email protected]",required:!0,style:{flex:1,padding:"12px 16px",border:"2px solid #e5e7eb",borderRadius:"8px",fontSize:"16px"}}),e.jsx("button",{type:"submit",disabled:j,style:{padding:"12px 24px",background:"#3b82f6",color:"white",border:"none",borderRadius:"8px",fontWeight:600,cursor:j?"not-allowed":"pointer",opacity:j?.7:1},children:j?"Checking...":"🔍 Check Status"})]}),i&&e.jsxs("div",{style:{background:"#f9fafb",padding:"20px",borderRadius:"8px"},children:[e.jsxs("h3",{style:{marginBottom:"20px",color:"#111827",fontSize:"18px",borderBottom:"2px s
2olid #059669",paddingBottom:"10px"},children:["📧 ",i.email]}),e.jsxs("div",{style:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"12px",marginBottom:"24px"},children:[e.jsxs("div",{style:{padding:"16px",background:i.verification.is_verified?"#d1fae5":"#fee2e2",borderRadius:"8px",borderLeft:`4px solid ${i.verification.is_verified?"#059669":"#dc2626"}`},children:[e.jsx("div",{style:{fontWeight:"bold",marginBottom:"8px"},children:"✅ Verification"}),e.jsx("div",{children:i.verification.is_verified?"Verified":"Not Verified"}),i.verification.verified_at&&e.jsxs("div",{style:{fontSize:"12px",color:"#6b7280",marginTop:"4px"},children:[new Date(i.verification.verified_at).toLocaleString(),e.jsx("br",{}),"Method: ",i.verification.method]})]}),e.jsxs("div",{style:{padding:"16px",background:i.unsubscribe.is_unsubscribed?"#fee2e2":"#d1fae5",borderRadius:"8px",borderLeft:`4px solid ${i.unsubscribe.is_unsubscribed?"#dc2626":"#059669"}`},children:[e.jsx("div",{style:{fontWeight:"bold",marginBottom:"8px"},children:"📤 Unsubscribed"}),e.jsx("div",{children:i.unsubscribe.is_unsubscribed?"Yes":"No"}),i.unsubscribe.unsubscribed_at&&e.jsx("div",{style:{fontSize:"12px",color:"#6b7280",marginTop:"4px"},children:new Date(i.unsubscribe.unsubscribed_at).toLocaleString()})]}),e.jsxs("div",{style:{padding:"16px",background:i.blocked.is_blocked?"#fee2e2":"#d1fae5",borderRadius:"8px",borderLeft:`4px solid ${i.blocked.is_blocked?"#dc2626":"#059669"}`},children:[e.jsx("div",{style:{fontWeight:"bold",marginBottom:"8px"},children:"🚫 Blocked"}),e.jsx("div",{children:i.blocked.is_blocked?"Yes":"No"}),i.blocked.is_blocked&&e.jsxs("div",{style:{fontSize:"12px",color:"#6b7280",marginTop:"4px"},children:["Reason: ",i.blocked.reason,i.blocked.source&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),"Source: ",i.blocked.source]}),e.jsx("br",{}),new Date(i.blocked.blocked_at).toLocaleString(),e.jsx("button",{onClick:ue,style:{display:"block",marginTop:"10px",padding:"6px 12px",background:"#dc2626",color:"white",border:"none",borderRadius:"6px",fontSize:"12px",cursor:"pointer"},children:re?"Unblocking…":"🔓 Unblock this email"})]})]})]}),e.jsxs("div",{style:{marginBottom:"24px",padding:"16px",background:"#f9fafb",borderRadius:"8px",border:"1px solid #e5e7eb"},children:[e.jsx("h4",{style:{fontSize:"16px",color:"#374151",marginBottom:"12px"},children:"🔑 Set / Generate Password"}),e.jsxs("div",{style:{display:"flex",gap:"10px",flexWrap:"wrap",alignItems:"center"},children:[e.jsx("button",{onClick:()=>ee(!0),style:{padding:"8px 14px",background:"#2563eb",color:"white",border:"none",borderRadius:"6px",fontSize:"13px",cursor:"pointer"},children:ae?"Working…":"Generate Password"}),e.jsx("input",{type:"text",value:G,onChange:t=>R(t.target.value),placeholder:"or type a password (min 8 chars)",style:{padding:"8px 12px",border:"1px solid #d1d5db",borderRadius:"6px",fontSize:"13px",minWidth:"240px"}}),e.jsx("button",{onClick:()=>ee(!1),style:{padding:"8px 14px",background:"#059669",color:"white",border:"none",borderRadius:"6px",fontSize:"13px",cursor:"pointer"},children:"Set This Password"})]}),P&&e.jsx("div",{style:{marginTop:"10px",fontSize:"13px",color:P.type==="success"?"#065f46":"#b91c1c"},children:P.text}),C&&e.jsxs("div",{style:{marginTop:"12px",padding:"12px",background:"#fffbeb",border:"1px solid #f59e0b",borderRadius:"8px"},children:[e.jsxs("div",{style:{fontSize:"12px",color:"#92400e",marginBottom:"8px",fontWeight:600},children:["⚠️ Password for ",de," — shown once. Copy now — it is not stored anywhere."]}),e.jsxs("div",{style:{display:"flex",gap:"10px",alignItems:"center"},children:[e.jsx("code",{style:{padding:"8px 12px",background:"white",border:"1px solid #e5e7eb",borderRadius:"6px",fontSize:"15px",letterSpacing:"1px",userSelect:"all"},children:C}),e.jsx("button",{onClick:()=>{navigator.clipboard.writeText(C),I(!0)},style:{padding:"8px 12px",background:"#374151",color:"white",border:"none",borderRadius:"6px",fontSize:"13px",cursor:"pointer"},children:le?"✓ Copied":"Copy"})]})]})]}),e.jsxs("div",{style:{marginBottom:"24px"},children:[e.jsxs("h4",{style:{fontSize:"16px",color:"#374151",marginBottom:"12px",display:"flex",alignItems:"center",gap:"8px"},children:["✍️ Signatures (",i.signatures.count,")"]}),i.signatures.list.length>0?e.jsx("div",{style:{maxHeight:"200px",overflowY:"auto",background:"white",borderRadius:"8px",border:"1px solid #e5e7eb"},children:i.signatures.list.map(t=>e.jsxs("div",{style:{padding:"12px 16px",borderBottom:"1px solid #f3f4f6",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontWeight:500},children:t.petition_title||`Petition #${t.petition_id}`}),e.jsxs("div",{style:{fontSize:"12px",color:"#6b7280"}
2,children:["Signed: ",new Date(t.signed_at).toLocaleString()]})]}),e.jsx("span",{style:{padding:"4px 8px",borderRadius:"4px",fontSize:"12px",background:"#d1fae5",color:"#065f46",fontWeight:500},children:"✓ מאושר"})]},t.signature_id))}):e.jsx("div",{style:{padding:"16px",background:"white",borderRadius:"8px",color:"#6b7280",textAlign:"center"},children:"No signatures found"})]}),e.jsxs("div",{style:{marginBottom:"24px"},children:[e.jsxs("h4",{style:{fontSize:"16px",color:"#374151",marginBottom:"12px",display:"flex",alignItems:"center",gap:"8px"},children:["💳 Payments (",i.payments.count,') - סה"כ: ₪',i.payments.total_amount.toFixed(2)]}),i.payments.list.length>0?e.jsx("div",{style:{maxHeight:"200px",overflowY:"auto",background:"white",borderRadius:"8px",border:"1px solid #e5e7eb"},children:i.payments.list.map(t=>e.jsxs("div",{style:{padding:"12px 16px",borderBottom:"1px solid #f3f4f6",display:"flex",justifyContent:"space-between",alignItems:"center"},children:[e.jsxs("div",{children:[e.jsx("div",{style:{fontWeight:500},children:t.petition_title||`Petition #${t.petition_id}`}),e.jsxs("div",{style:{fontSize:"12px",color:"#6b7280"},children:[new Date(t.payment_date).toLocaleString()," via ",t.payment_provider]})]}),e.jsxs("span",{style:{padding:"4px 12px",borderRadius:"4px",fontSize:"14px",fontWeight:"bold",background:"#d1fae5",color:"#065f46"},children:["₪",t.payment_amount]})]},t.id))}):e.jsx("div",{style:{padding:"16px",background:"white",borderRadius:"8px",color:"#6b7280",textAlign:"center"},children:"No payments found"})]}),i.petitions_created&&e.jsxs("div",{style:{marginBottom:"24px"},children:[e.jsxs("h4",{style:{fontSize:"16px",color:"#374151",marginBottom:"12px",display:"flex",alignItems:"center",gap:"8px"},children:["📋 עצומות שנפתחו (",i.petitions_created.count,")"]}),i.petitions_created.list.length>0?e.jsx("div",{style:{maxHeight:"300px",overflowY:"auto",background:"white",borderRadius:"8px",border:"1px solid #e5e7eb"},children:i.petitions_created.list.map(t=>e.jsxs("div",{style:{padding:"12px 16px",borderBottom:"1px solid #f3f4f6",display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:"16px"},children:[e.jsxs("div",{style:{flex:1},children:[e.jsxs("a",{href:`/sign/${t.slug}`,target:"_blank",rel:"noopener noreferrer",style:{color:"#005eb6",fontWeight:500,textDecoration:"none",fontSize:"14px"},children:[t.title," ↗"]}),e.jsxs("div",{style:{fontSize:"12px",color:"#6b7280",marginTop:"2px"},children:[new Date(t.created_at).toLocaleDateString("he-IL")," •"," ",(t.signature_count||0).toLocaleString("he-IL")," תומכים"]})]}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",alignItems:"flex-end",gap:"6px"},children:[e.jsx("span",{style:{padding:"4px 8px",borderRadius:"4px",fontSize:"12px",background:t.is_approved?"#d1fae5":"#fef3c7",color:t.is_approved?"#065f46":"#92400e"},children:t.is_approved?"✓ מאושרת":"ממתינה"}),e.jsx("a",{href:`/sign/${t.slug}/manage?admin=true`,target:"_blank",rel:"noopener noreferrer",style:{padding:"4px 10px",borderRadius:"4px",fontSize:"12px",background:"#1e40af",color:"white",textDecoration:"none",whiteSpace:"nowrap"},children:"ניהול ⚙"})]})]},t.petition_id))}):e.jsx("div",{style:{padding:"16px",background:"white",borderRadius:"8px",color:"#6b7280",textAlign:"center"},children:"לא נמצאו עצומות"})]}),i.last_email&&e.jsxs("div",{style:{padding:"16px",background:"#e0e7ff",borderRadius:"8px"},children:[e.jsx("strong",{children:"📨 Last Email Sent:"})," ",i.last_email.type," (",i.last_email.status,")",e.jsx("br",{}),e.jsx("span",{style:{fontSize:"12px",color:"#6b7280"},children:new Date(i.last_email.sent_at).toLocaleString()})]})]})]}),r==="name"&&e.jsxs("div",{children:[e.jsx("h2",{style:{fontSize:"20px",marginBottom:"20px",color:"#374151"},children:"Find by Name"}),e.jsx("p",{style:{color:"#6b7280",marginBottom:"20px"},children:"Search payers, subscribers and signers by name. Useful when the payment email differs from the signing email."}),e.jsxs("form",{onSubmit:fe,style:{display:"flex",gap:"12px",marginBottom:"20px"},children:[e.jsx("input",{type:"text",value:w,onChange:t=>oe(t.target.value),placeholder:"e.g. Joleen Miller",minLength:2,required:!0,style:{flex:1,padding:"12px 16px",border:"2px s
2olid #e5e7eb",borderRadius:"8px",fontSize:"16px"}}),e.jsx("button",{type:"submit",disabled:S,style:{padding:"12px 24px",background:"#3b82f6",color:"white",border:"none",borderRadius:"8px",fontWeight:600,cursor:S?"not-allowed":"pointer",opacity:S?.7:1},children:S?"Searching...":"🔎 Search"})]}),e.jsxs("label",{dir:"rtl",style:{display:"flex",alignItems:"center",gap:"8px",marginTop:"-8px",marginBottom:"20px",fontSize:"14px",color:k?"#b45309":"#6b7280",cursor:"pointer"},children:[e.jsx("input",{type:"checkbox",checked:k,onChange:t=>ne(t.target.checked),style:{width:"16px",height:"16px",cursor:"pointer"}}),"חפש גם בחתימות (איטי — סורק ~19.5M שורות, עד ~30 שניות)"]}),c&&e.jsxs("div",{children:[e.jsxs("div",{style:{color:"#6b7280",fontSize:"14px",marginBottom:"16px"},children:["Showing ",c.showing," of ",c.total_found," total matches",c.total_found>c.showing&&" — refine your search to narrow results"]}),c.results.length===0?e.jsx("div",{style:{padding:"16px",background:"white",borderRadius:"8px",color:"#6b7280",textAlign:"center",border:"1px solid #e5e7eb"},children:"No matches found"}):e.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"12px"},children:c.results.map((t,n)=>e.jsxs("div",{style:{background:"white",border:"1px solid #e5e7eb",borderRadius:"8px",padding:"16px"},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",gap:"12px",marginBottom:"8px"},children:[e.jsxs("div",{children:[e.jsxs("span",{style:{fontWeight:600,fontSize:"16px"},children:["👤 ",t.payer_name]}),e.jsx("span",{style:{color:"#6b7280",marginLeft:"8px",fontSize:"14px"},children:t.payer_email})]}),t.is_active_subscriber&&e.jsx("span",{style:{padding:"4px 10px",borderRadius:"12px",fontSize:"12px",fontWeight:600,background:"#d1fae5",color:"#065f46",whiteSpace:"nowrap"},children:"💳 Active Sub"})]}),t.potential_duplicate&&e.jsx("div",{style:{fontSize:"13px",color:"#92400e",background:"#fef3c7",padding:"6px 10px",borderRadius:"6px",marginBottom:"6px"},children:"⚠️ Possible duplicate email — same name appears under a near-identical address"}),t.signer_email&&e.jsxs("div",{style:{fontSize:"13px",color:"#3730a3",marginBottom:"6px"},children:["📧 Also signed as: ",t.signer_email]}),e.jsxs("div",{style:{fontSize:"13px",color:"#6b7280",marginBottom:"8px"},children:["Source: ",t.source.map(o=>o.charAt(0).toUpperCase()+o.slice(1)).join(" • ")]}),e.jsxs("div",{style:{fontSize:"14px",color:"#374151",marginBottom:t.last_payments.length>0?"10px":"0"},children:[t.payment_count," payment",t.payment_count===1?"":"s"," · ₪",t.total_amount," total · ✍️ ",t.signature_count," signature",t.signature_count===1?"":"s"]}),t.last_payments.length>0&&e.jsxs("div",{style:{background:"#f9fafb",borderRadius:"6px",padding:"10px",marginBottom:"10px"},children:[e.jsx("div",{style:{fontSize:"12px",color:"#6b7280",fontWeight:600,marginBottom:"4px"},children:"Last payments:"}),t.last_payments.map((o,d)=>e.jsxs("div",{style:{fontSize:"13px",color:"#374151"},children:["₪",o.amount," via ",o.provider," · ",o.date?new Date(o.date).toLocaleDateString():"—"," · ",o.petition||"—"]},d))]}),e.jsx("div",{style:{textAlign:"right"},children:e.jsx("button",{onClick:()=>ge(t),style:{padding:"8px 16px",background:"#059669",color:"white",border:"none",borderRadius:"6px",fontWeight:600,fontSize:"13px",cursor:"pointer"},children:"View Full Profile →"})})]},`${t.payer_email}-${n}`))})]})]}),r==="petition"&&e.jsxs("div",{children:[e.jsx("h2",{style:{fontSize:"20px",marginBottom:"20px",color:"#374151"},children:"Find by Petition"}),e.jsx("p",{style:{color:"#6b7280",marginBottom:"20px"},children:"מצא את יוצר העצומה לפי slug או URL מלא."}),e.jsxs("form",{onSubmit:be,style:{display:"flex",gap:"12px",marginBottom:"20px"},children:[e.jsx("input",{type:"text",value:_,onChange:t=>se(t.target.value),placeholder:"למשל: tikvatisrael2020 או https://atzuma.co.il/sign/tikvatisrael2020",required:!0,style:{flex:1,padding:"12px 16px",border:"2px solid #e5e7eb",borderRadius:"8px",fontSize:"16px"}}),e.jsx("button",{type:"submit",disabled:v,style:{padding:"12px 24px",background:"#005eb6",color:"white",border:"none",borderRadius:"8px",fontWeight:600,cursor:v?"not-allowed":"pointer",opacity:v?.7:1},children:v?"מחפש...":"🔎 חפש"})]}),Q&&e.jsx("div",{style:{padding:"12px 16px",background:"#fef2f2",border:"1px solid #fecaca",borderRadius:"8px",color:"#dc2626",marginBottom:"16
2px"},children:Q}),a&&e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"16px"},children:[e.jsxs("div",{style:{background:"white",border:"1px solid #e5e7eb",borderRadius:"8px",padding:"16px"},children:[e.jsxs("div",{style:{fontWeight:700,fontSize:"16px",marginBottom:"8px"},children:["📋 ",a.petition.title]}),e.jsxs("div",{style:{fontSize:"13px",color:"#6b7280",marginBottom:"4px"},children:["Slug: ",e.jsx("code",{children:a.petition.slug})," · Status: ",a.petition.status]}),e.jsxs("div",{style:{fontSize:"13px",color:"#6b7280",marginBottom:"8px"},children:["✍️ ",a.petition.signatures?.toLocaleString("he-IL")," חתימות · נוצרה: ",a.petition.created_at?new Date(a.petition.created_at).toLocaleDateString("he-IL"):"—"]}),e.jsx("a",{href:a.petition.url,target:"_blank",rel:"noopener noreferrer",style:{fontSize:"13px",color:"#005eb6",textDecoration:"underline"},children:a.petition.url})]}),e.jsxs("div",{style:{background:"white",border:"1px solid #e5e7eb",borderRadius:"8px",padding:"16px"},children:[e.jsxs("div",{style:{fontWeight:700,fontSize:"16px",marginBottom:"8px"},children:["👤 ",a.creator.name]}),e.jsxs("div",{style:{fontSize:"14px",color:"#374151",marginBottom:"4px"},children:["📧 ",e.jsx("a",{href:`mailto:${a.creator.email}`,style:{color:"#005eb6"},children:a.creator.email})]}),e.jsxs("div",{style:{fontSize:"13px",color:"#6b7280"},children:[a.creator.petition_count,' עצומות סה"כ']})]})]})]})]})]})})};export{we as default};
3//# sourceMappingURL=AdminOperations-BVtjkk28.js.map

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.