PageSourceSearch

https://apcg2026-saudiarabia.org/assets/InvoicePrintPage.Bg0l0Irv.js

js apcg2026-saudiarabia.org collected 2026-10-06 16:17:42 UTC 10,672 bytes, 23 lines download raw bytes

1var f=(p,r,e)=>new Promise((a,c)=>{var g=o=>{try{d(e.next(o))}catch(n){c(n)}},x=o=>{try{d(e.throw(o))}catch(n){c(n)}},d=o=>o.done?a(o.value):Promise.resolve(o.value).then(g,x);d((e=e.apply(p,r)).next())});import{j as t,d as y,e as j}from"./index.Lqk7dLwH.js";import{f as m,r as s}from"./vendor.HtnQXyMN.js";import"./i18n.p45FRHM2.js";import"./payment.T70AYnHr.js";import"./ui.CE_28nQO.js";const W=()=>{const[p]=m(),r=p.get("apcgId"),[e,a]=s.useState(null),[c,g]=s.useState([]),[x,d]=s.useState(!0),[o,n]=s.useState(null);return s.useEffect(()=>{f(null,null,function*(){if(!r){n("APCG ID not found"),d(!1);return}try{const l=yield y(r);if(a(l),l.category==="Youth Summit")try{const h=yield j(r);g(h)}catch(h){console.error("Failed to fetch member details:",h)}}catch(l){console.error("Error fetching registration details:",l),n("Failed to load registration details")}finally{d(!1)}})},[r]),s.useEffect(()=>{e&&!x&&setTimeout(()=>{window.print()},500)},[e,x]),x?t.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh",fontSize:"18px"},children:"Loading invoice..."}):o||!e?t.jsx("div",{style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh",fontSize:"18px",color:"red"},children:o||"No registration data found"}):t.jsxs("div",{style:{fontFamily:"Arial, sans-serif",fontSize:"14px",lineHeight:"1.4",color:"#000",maxWidth:"800px",margin:"0 auto",padding:"20px",backgroundColor:"white"},children:[t.jsx("style",{children:`
2          @page {
3            size: A4 landscape;
4            margin: 0.2in;
5          }
6          @media print {
7            body {
8              margin: 0;
9              padding: 0;
10              background: white;
11            }
12            .print-container {
13              width: 100% !important;
14              margin: 0 !important;
15              padding: 0 !important;
16              font-size: 12px !important;
17            }
18            .no-print {
19              display: none !important;
20            }
21          }
22        `}),t.jsxs("div",{className:"print-container",children:[t.jsx("div",{style:{backgroundColor:"#109B7C",padding:"15px",textAlign:"center",marginBottom:"20px",borderRadius:"0"},children:t.jsx("img",{src:"/images/logos/apcg-ubt-white-logo.png",alt:"APCG Logo",style:{maxHeight:"50px",width:"auto"}})}),t.jsx("div",{style:{marginBottom:"20px"},children:t.jsxs("div",{style:{display:"flex",justifyContent:"space-between",marginBottom:"20px"},children:[t.jsxs("div",{children:[t.jsxs("h3",{style:{fontSize:"14px",fontWeight:"bold",margin:"0 0 10px 0",color:"#000"},children:["APCG Registration Number: ",e.id]}),t.jsxs("p",{style:{fontSize:"14px",margin:"0",color:"#000"},children:[t.jsx("strong",{children:"Registration Date:"})," ",new Date(e.updatedAt).toLocaleDateString()]})]}),t.jsxs("div",{style:{textAlign:"right"},children:[t.jsxs("p",{style:{fontSize:"14px",margin:"0",color:"#000"},children:[t.jsx("strong",{children:"Payment Status:"})," ",e.isPaid?"Paid":"Pending"]}),t.jsxs("p",{style:{fontSize:"14px",margin:"0",color:"#000"},children:[t.jsx("strong",{children:"Registration ID:"})," ",e.id]})]})]})}),t.jsxs("div",{style:{marginBottom:"20px"},children:[t.jsx("h4",{style:{fontSize:"14px",fontWeight:"bold",marginBottom:"10px",color:"#000"},children:"Registration Information"}),t.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",border:"1px solid #ccc"},children:[t.jsx("thead",{children:t.jsxs("tr",{style:{backgroundColor:"#f8f9fa"},children:[t.jsx("th",{style:{padding:"8px",textAlign:"left",border:"1px solid #ccc",fontSize:"14px",fontWeight:"bold",color:"#000"},children:"Field"}),t.jsx("th",{style:{padding:"8px",textAlign:"left",border:"1px solid #ccc",fontSize:"14px",fontWeight:"bold",color:"#000"},children:"Details"})]})}),t.jsxs("tbody",{children:[t.jsxs("tr",{children:[t.jsx("td",{style:{padding:"8px",border:"1px solid #ccc",fontSize:"14px",color:"#000"},children:"Full Name"}),t.jsxs("td",{style:{padding:"8px",border:"1px solid #ccc",fontSize:"14px",color:"#000"},children:[e.firstName," ",e.lastName]})]}),t.jsxs("tr",{children:[t.jsx("td",{style:{padding:"8px",border:"1px solid #ccc",fontSize:"14px",color:"#000"},children:"Email"}),t.jsx("td",{style:{padding:"8px",border:"1px solid #ccc",fontSize:"14px",color:"#000"},children:e.emailAddress})]}),t.jsxs("tr",{children:[t.jsx("td",{style:{padding:"8px",border:"1px solid #ccc",fontSize:"14px",color:"#000"},children:"Phone"}),t.jsx("td",{style:{padding:"8px",border:"1px solid #ccc",fontSize:"14px",color:"#000"},children:e.phoneNumber})]}),t.jsxs("tr",{children:[t.jsx("td",{style:{padding:"8px",border:"1px solid #ccc",fontSize:"14px",color:"#000"},children:"Country"}),t.jsx("td",{style:{padding:"8px",border:"1px solid #ccc",fontSize:"14px",color:"#000"},children:e.country})]}),t.jsxs("tr",{children:[t.jsx("td",{style:{padding:"8px",border:"1px solid #ccc",fontSize:"14px",color:"#000"},children:"Institute"}),t.jsx("td",{style:{padding:"8px",border:"1px solid #ccc",fontSize:"14px",color:"#000"},children:e.institute})]}),t.jsxs("tr",{children:[t.jsx("td",{style:{padding:"8px",border:"1px solid #ccc",fontSize:"14px",color:"#000"},children:"Job Title"}),t.jsx("td",{style:{padding:"8px",border:"1px solid #ccc",fontSize:"14px",color:"#000"},children:e.jobTitle})]}),t.jsxs("tr",{children:[t.jsx("td",{style:{padding:"8px",border:"1px solid #ccc",fontSize:"14px",color:"#000"},children:"Registration Type"}),t.jsx("td",{style:{padding:"8px",border:"1px solid #ccc",fontSize:"14px",color:"#000"},children:e.category})]}),e.isGroup&&e.groupSize&&t.jsxs("tr",{children:[t.jsx("td",{style:{padding:"8px",border:"1px solid #ccc",fontSize:"14px",color:"#000"},children:"Group Size"}),t.jsxs("td",{style:{padding:"8px",border:"1px solid #ccc",fontSize:"14px",color:"#000"},children:[e.groupSize," members"]})]})]})]})]}),e.category==="Youth Summit"&&c.length>0&&t.jsxs("div",{style:{marginBottom:"20px"},children:[t.jsx("h4",{style:{fontSize:"14px",fontWeight:"bold",marginBottom:"10px",color:"#000"},children:"Registered Members Details"}),t.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",border:"1px solid #ccc"},children:[t.jsx("thead",{children:t.jsxs("tr",{style:{backgroundColor:"#f8f9fa"},children:[t.jsx("th",{style:{padding:"8px",textAlign:"center",border:"1px solid #ccc",fontSize:"14px",fontWeight:"bold",color:"#000",width:"40px"},children:"#"}),t.jsx("th",{style:{padding:"8px",textAlign:"left",border:"1px solid #ccc",fontSize:"14px",fontWeight:"bold",color:"#000"},children:"Name"}),t.jsx("th",{style:{padding:"8px",textAlign:"left",border:"1px solid #ccc",fontSize:"14px",fontWeight:"bold",color:"#000"},children:"Email"}),t.jsx("th",{style:{padding:"8px",textAlign:"center",border:"1px solid #ccc",fontSize:"14px",fontWeight:"bold",color:"#000"},children:"Phone"}),t.jsx("th",{style:{padding:"8px",textAlign:"center",border:"1px solid #ccc",fontSize:"14px",fontWeight:"bold",color:"#000"},children:"Country"}),t.jsx("th",{style:{padding:"8px",textAlign:"left",border:"1px solid #ccc",fontSize:"14px",fontWeight:"bold",color:"#000"},children:"Institute"}),t.jsx("th",{style:{padding:"8px",textAlign:"center",border:"1px solid #ccc",fontSize:"14px",fontWeight:"bold",color:"#000"},children:"Role"})]})}),t.jsx("tbody",{children:c.map((i,l)=>t.jsxs("tr",{children:[t.jsx("td",{style:{padding:"8px",textAlign:"center",border:"1px solid #ccc",fontSize:"14px",color:"#000",fontWeight:"600"},children:l+1}),t.jsxs("td",{style:{padding:"8px",border:"1px solid #ccc",fontSize:"14px",color:"#000"},children:[i.firsT_NAME," ",i.lasT_NAME]}),t.jsx("td",{style:{padding:"8px",border:"1px solid #ccc",fontSize:"14px",color:"#000"},children:i.emaiL_ADDRESS}),t.jsx("td",{style:{padding:"8px",textAlign:"center",border:"1px solid #ccc",fontSize:"14px",color:"#000"},children:i.phonE_NUMBER}),t.jsx("td",{style:{padding:"8px",textAlign:"center",border:"1px solid #ccc",fontSize:"14px",color:"#000"},children:i.country}),t.jsx("td",{style:{padding:"8px",border:"1px solid #ccc",fontSize:"14px",color:"#000"},children:i.institute}),t.jsx("td",{style:{padding:"8px",textAlign:"center",border:"1px solid #ccc",fontSize:"14px",color:"#000",fontWeight:i.joB_TITLE==="Student"?"600":"500"},children:i.joB_TITLE})]},i.detaiL_ID))})]})]}),t.jsxs("div",{style:{marginBottom:"20px"},children:[t.jsx("h4",{style:{fontSize:"14px",fontWeight:"bold",marginBottom:"10px",color:"#000"},children:"Payment Summary"}),t.jsxs("table",{style:{width:"100%",borderCollapse:"collapse",border:"1px solid #ccc"},children:[t.jsx("thead",{children:t.jsxs("tr",{style:{backgroundColor:"#f8f9fa"},children:[t.jsx("th",{style:{padding:"8px",textAlign:"left",border:"1px solid #ccc",fontSize:"14px",fontWeight:"bold",color:"#000"},children:"Description"}),t.jsx("th",{style:{padding:"8px",textAlign:"right",border:"1px solid #ccc",fontSize:"14px",fontWeight:"bold",color:"#000"},children:"Amount"})]})}),t.jsxs("tbody",{children:[t.jsxs("tr",{children:[t.jsx("td",{style:{padding:"8px",border:"1px solid #ccc",fontSize:"14px",color:"#000"},children:e.category==="Youth Summit"?"Youth Summit Group Registration - Student Fee: $320 USD per student (Teachers complimentary)":`${e.category} Registration`}),t.jsxs("td",{style:{padding:"8px",textAlign:"right",border:"1px solid #ccc",fontSize:"14px",color:"#000"},children:["$",e.amount.toFixed(2)]})]}),t.jsxs("tr",{style:{backgroundColor:"#f8f9fa",fontWeight:"bold"},children:[t.jsx("td",{style:{padding:"8px",border:"1px solid #ccc",fontSize:"14px",color:"#000"},children:"Total Amount"}),t.jsxs("td",{style:{padding:"8px",textAlign:"right",border:"1px solid #ccc",fontSize:"14px",color:"#000"},children:["$",e.amount.toFixed(2)]})]})]})]})]}),e.isGroup&&t.jsxs("div",{style:{padding:"15px",backgroundColor:"#e7f3ff",border:"1px solid #b3d9ff",marginBottom:"20px",borderRadius:"4px"},children:[t.jsx("h6",{style:{fontWeight:"bold",marginBottom:"8px",fontSize:"14px",color:"#000"},children:"Group Registration Information"}),t.jsx("p",{style:{margin:"0",fontSize:"14px",color:"#000"},children:"As the group leader, you will receive further instructions on how to submit details for all group members. Please keep this receipt for your records and share the registration details with your group members."})]}),t.jsxs("div",{style:{textAlign:"center",padding:"20px 0",borderTop:"1px solid #ccc",marginTop:"30px",fontSize:"12px",color:"#666"},children:[t.jsx("p",{style:{margin:"0"}
22,children:"Thank you for your registration to APCG 2026 Saudi Arabia"}),t.jsx("p",{style:{margin:"5px 0 0 0"},children:"For any queries, please contact us at [email protected]"})]})]})]})};export{W as default};
23//# sourceMappingURL=InvoicePrintPage.Bg0l0Irv.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.