PageSourceSearch

https://nozha-pay-portal.lovable.app/assets/admin.parent-reg-otp-Cagd0wKf.js

js nozha-pay-portal.lovable.app collected 2026-10-03 03:35:04 UTC 3,744 bytes, 1 lines download raw bytes

1import{h as p,k as h,m as u,u as j,P as f,r as t,j as e}from"./index-WRxDeZXy.js";const b=p({method:"GET"}).middleware([h]).handler(u("8c5c6bf3c1b0c61b02d786c9dc24613784d9710f42bb880348c38a968e43374f")),N={sent:"تم الإرسال",claim_failed:"الطلب غير صالح",issue_failed:"فشل تسليم الكود للمنصة",whatsapp_failed:"فشل إرسال الواتساب",rate_limited:"تجاوز الحد (٣/ساعة)",config_error:"إعداد ناقص"};function y(){const{session:a}=j(),x=f(),r=a?.kind==="admin"&&a.role==="admin",[d,i]=t.useState([]),[m,c]=t.useState(!0),[o,l]=t.useState(null),n=async()=>{c(!0),l(null);try{const s=await b();i(s.rows)}catch(s){l(s instanceof Error?s.message:"فشل التحميل")}finally{c(!1)}};return t.useEffect(()=>{r&&n()},[r]),r?e.jsxs("div",{className:"mx-auto max-w-6xl p-4 sm:p-6",dir:"rtl",children:[e.jsxs("div",{className:"mb-4 flex items-center gap-3",children:[e.jsx("button",{onClick:()=>x.history.back(),className:"rounded-md border border-border bg-card px-3 py-1.5 text-xs font-semibold hover:bg-muted",children:"← رجوع"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h1",{className:"text-xl font-bold",children:"سجل أكواد تسجيل أولياء الأمور"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"الرسائل التي تبدأ بـ NOZHA-REG على رقم الواتساب — الكود نفسه غير مخزَّن."})]}),e.jsx("button",{onClick:()=>{n()},className:"rounded-md border border-border bg-card px-3 py-1.5 text-xs font-semibold hover:bg-muted",children:"تحديث"})]}),m?e.jsx("div",{className:"text-sm text-muted-foreground",children:"جارٍ التحميل…"}):o?e.jsx("div",{className:"text-sm text-destructive",children:o}):e.jsx("div",{className:"overflow-x-auto rounded-lg border border-border bg-card",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{className:"bg-muted/40 text-right text-xs uppercase text-muted-foreground",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-3 py-2",children:"رقم الطلب"}),e.jsx("th",{className:"px-3 py-2",children:"الرقم"}),e.jsx("th",{className:"px-3 py-2",children:"النتيجة"}),e.jsx("th",{className:"px-3 py-2",children:"claim"}),e.jsx("th",{className:"px-3 py-2",children:"issue"}),e.jsx("th",{className:"px-3 py-2",children:"واتساب"}),e.jsx("th",{className:"px-3 py-2",children:"وقت الإرسال"}),e.jsx("th",{className:"px-3 py-2",children:"خطأ"})]})}),e.jsxs("tbody",{children:[d.map(s=>e.jsxs("tr",{className:"border-t border-border",children:[e.jsx("td",{className:"px-3 py-2 font-mono text-xs",dir:"ltr",children:s.request_id}),e.jsx("td",{className:"px-3 py-2 font-mono text-xs",dir:"ltr",children:s.phone}),e.jsx("td",{className:"px-3 py-2 text-xs",children:e.jsx("span",{className:s.outcome==="sent"?"text-primary font-semibold":"text-destructive font-semibold",children:N[s.outcome]??s.outcome})}),e.jsx("td",{className:"px-3 py-2 font-mono text-xs",children:s.claim_status??"—"}),e.jsx("td",{className:"px-3 py-2 font-mono text-xs",children:s.issue_status??"—"}),e.jsx("td",{className:"px-3 py-2 text-xs",children:s.whatsapp_ok?"✓":"✗"}),e.jsx("td",{className:"px-3 py-2 font-mono text-xs",dir:"ltr",children:new Date(s.sent_at??s.created_at).toLocaleString("ar-EG")}),e.jsx("td",{className:"px-3 py-2 text-xs text-muted-foreground",children:s.error??"—"})]},s.id)),d.length===0&&e.jsx("tr",{children:e.jsx("td",{colSpan:8,className:"px-3 py-6 text-center text-xs text-muted-foreground",children:"لا يوجد سجل بعد."})})]})]})})]}):e.jsx("div",{className:"p-6 text-sm text-muted-foreground",children:"Admin access required."})}export{y 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.