1import{j as e,L as D,r as t,S as I}from"./index-Dl6JKUte.js";function B(){return e.jsxs("section",{className:"relative w-full pt-20 min-h-screen flex items-center overflow-hidden",children:[e.jsx("div",{className:"absolute inset-0 z-0",style:{backgroundImage:'url("https://images.pexels.com/photos/7972735/pexels-photo-7972735.jpeg")',backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"}}),e.jsx("div",{className:"absolute inset-0 z-10 bg-black/60 backdrop-blur-[2px]"}),e.jsx("div",{className:"relative z-20 max-w-7xl mx-auto px-6 md:px-12 w-full",children:e.jsxs("div",{className:"max-w-3xl",children:[e.jsxs("h1",{className:"text-white text-4xl md:text-5xl font-extrabold mb-6 leading-tight drop-shadow-md",children:["Connecting ",e.jsx("span",{className:"text-blue-400",children:"Generations"}),", ",e.jsx("br",{}),"Empowering ",e.jsx("span",{className:"text-blue-400",children:"Futures"}),"."]}),e.jsx("p",{className:"text-gray-100 text-lg md:text-xl mb-10 max-w-lg leading-relaxed drop-shadow-sm",children:"Join a global network of over 35,000+ ADUST graduates. Rediscover your classmates, access exclusive career resources, and give back to the institution. Your legacy continues here."}),e.jsx("div",{className:"flex flex-wrap gap-4",children:e.jsx(D,{to:"/alumni/register",children:e.jsx("button",{className:"bg-blue-600 hover:bg-blue-700 text-white px-10 py-4 rounded-md font-bold transition-all transform hover:scale-105 shadow-xl",children:"Register Now"})})})]})})]})}const E="https://global.adust.edu.bd/api/v1";function $(){const[n,b]=t.useState("id"),[c,y]=t.useState(""),[d,x]=t.useState(""),[i,h]=t.useState([]),[j,N]=t.useState(!1),[P,u]=t.useState(!1),[p,l]=t.useState(""),[A,v]=t.useState([]),[f,w]=t.useState(!0),[S,k]=t.useState("");t.useEffect(()=>{(async()=>{try{w(!0),k("");const r=await fetch(`${E}/programs`);if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);const a=await r.json();let o=[];Array.isArray(a)?o=a:a.data&&Array.isArray(a.data)?o=a.data:a.programs&&Array.isArray(a.programs)?o=a.programs:a.results&&Array.isArray(a.results)&&(o=a.results);const m=o.map(g=>g.name||g.programName||g.title||g.program_name||"Unknown Program");v(["Select",...m])}catch(r){console.error("Error fetching programs:",r),k("Could not load programs from server"),v(["Select","BSc in Computer Science & Engineering","BSc in Electrical & Electronic Engineering","BSc in Civil Engineering","BSc in Mechanical Engineering","BSc in Textile Engineering","MSc in Computer Science & Engineering","MBA","Master of Education","PhD"])}finally{w(!1)}})()},[]);const C=async s=>{if(s.preventDefault(),l(""),!d.trim()){l(n==="id"?"Please enter a Student ID":"Please enter a name");return}N(!0),u(!1),h([]);try{const r=new URLSearchParams;c&&c!=="Select"&&r.set("program",c),n==="id"?r.set("studentId",d.trim()):r.set("search",d.trim()),r.set("limit","50");const a=localStorage.getItem("alumni_token"),o=await fetch(`${E}/alumni?${r.toString()}`,{headers:a?{Authorization:`Bearer ${a}`}:{}}),m=await o.json();o.ok?h(m.data||[]):l(m.message||"Search failed. Please try again.")}catch{l("Network error. Please check your connection.")}finally{N(!1),u(!0)}},R=()=>{x(""),y(""),h([]),u(!1),l("")};return e.jsx("div",{className:"min-h-screen bg-white font-sans text-gray-800 py-8 px-4",children:e.jsxs("div",{className:"max-w-6xl mx-auto",children:[e.jsxs("div",{className:"border border-gray-300 rounded-lg p-6 mb-8",children:[e.jsxs("div",{className:"flex items-center gap-6 mb-5",children:[e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer text-sm font-medium text-gray-700",children:[e.jsx("div",{className:`w-4 h-4 rounded-full border-2 flex items-center justify-center transition-colors ${n==="id"?"border-green-700":"border-gray-400"}`,onClick:()=>{b("id"),x(""),l("")},children:n==="id"&&e.jsx("div",{className:"w-2 h-2 rounded-full bg-green-700"})}),"Search by Student ID/Registration"]}),e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer text-sm font-medium text-gray-700",children:[e.jsx("div",{className:`w-4 h-4 rounded-full border-2 flex items-center justify-center transition-colors ${n==="name"?"border-green-700":"border-gray-400"}`,onClick:()=>{b("name"),x(""),l("")},children:n==="name"&&e.jsx("div",{className:"w-2 h-2 rounded-full bg-green-700"})}),"Search by Name"]})]}),e.jsx("form",{onSubmit:C,children:e.jsxs("div",{className:"flex flex-col sm:flex-row gap-4 items-end",children:[e.jsxs("div",{className:"flex flex-col gap-1 w-full sm:w-72",children:[e.jsxs("label",{className:"text-sm font-semibold text-gray-700",children:["Program ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsxs("div",{className:"relative",children:[e.jsx("select",{value:c,onChange:s=>y(s.target.value),disabled:f,className:`w-full border border-gray-300 rounded px-3 py-2 text-sm text-gray-600 outline-none focus:border-green-600 bg-white appearance-none cursor-pointer ${f?"opacity-50 cursor-wait":""}`,children:f?e.jsx("option",{children:"Loading programs..."}):A.map(s=>e.jsx("option",{value:s==="Select"?"":s,children:s},s))}),e.jsx("div",{className:"pointer-events-none absolute right-3 top-2.5 text-gray-400 text-xs",children:"â¼"})]}),S&&e.jsxs("span",{className:"text-xs text-amber-600 flex items-center gap-1",children:[e.jsx("svg",{className:"w-3 h-3",fill:"
1currentColor",viewBox:"0 0 20 20",children:e.jsx("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})}),S," - using default list"]})]}),e.jsxs("div",{className:"flex flex-col gap-1 flex-1",children:[e.jsxs("label",{className:"text-sm font-semibold text-gray-700",children:[n==="id"?"Student ID/Registration":"Student Name"," ",e.jsx("span",{className:"text-red-500",children:"*"})]}),e.jsx("input",{type:"text",value:d,onChange:s=>{x(s.target.value),l("")},placeholder:n==="id"?"Enter your student ID here":"Enter student name here",className:`border rounded px-3 py-2 text-sm text-gray-700 outline-none focus:border-green-600 transition-colors ${p?"border-red-400":"border-gray-300"}`}),p&&e.jsx("span",{className:"text-xs text-red-500",children:p})]}),e.jsx("button",{type:"submit",disabled:j,className:"bg-green-800 hover:bg-green-900 text-white font-bold text-sm tracking-widest px-10 py-2.5 rounded transition-colors disabled:opacity-60 whitespace-nowrap flex items-center gap-2 h-[42px]",children:j?e.jsxs(e.Fragment,{children:[e.jsxs("svg",{className:"animate-spin h-4 w-4",fill:"none",viewBox:"0 0 24 24",children:[e.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),e.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8v8z"})]}),"SEARCHING..."]}):"SEARCH"})]})}),e.jsx("hr",{className:"my-5 border-gray-200"})]}),P&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-5",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("h2",{className:"text-2xl font-extrabold text-green-800 tracking-wide uppercase",children:"Search Result"}),e.jsx("div",{className:"flex-1 h-px bg-gray-300 w-24"})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[i.length>0&&e.jsxs("span",{className:"text-sm text-gray-500",children:[i.length," record",i.length!==1?"s":""," found"]}),e.jsx("button",{onClick:R,className:"text-xs text-gray-500 border border-gray-300 hover:border-gray-400 rounded px-3 py-1.5 transition-colors",children:"Clear Results"})]})]}),i.length===0?e.jsxs("div",{className:"border border-gray-200 rounded-lg py-16 flex flex-col items-center gap-3 text-gray-400",children:[e.jsx("span",{className:"text-5xl",children:"ð"}),e.jsx("p",{className:"text-base font-medium text-gray-500",children:"No records found"}),e.jsxs("p",{className:"text-sm text-gray-400",children:["Try searching with a different ",n==="id"?"Student ID":"name"," or program."]})]}):e.jsx("div",{className:"overflow-x-auto rounded-lg border border-gray-200 shadow-sm",children:e.jsxs("table",{className:"w-full text-sm border-collapse",children:[e.jsx("thead",{children:e.jsx("tr",{className:"bg-white border-b-2 border-gray-200",children:["Program","Student ID/Registration","Name","CGPA/Class","Passing Semester","Date of Graduation"].map(s=>e.jsx("th",{className:"text-left px-4 py-3 font-semibold text-gray-700 whitespace-nowrap text-sm",children:s},s))})}),e.jsx("tbody",{children:i.map((s,r)=>e.jsxs("tr",{className:`border-b border-gray-100 hover:bg-green-50 transition-colors ${r%2===0?"bg-white":"bg-gray-50/50"}`,children:[e.jsx("td",{className:"px-4 py-3 text-gray-700",children:s.program||"â"}),e.jsx("td",{className:"px-4 py-3 font-medium text-gray-800",children:s.studentId||"â"}),e.jsx("td",{className:"px-4 py-3 text-gray-800",children:s.fullName||"â"}),e.jsx("td",{className:"px-4 py-3 text-center text-gray-600",children:s.cgpa||s.cgpaClass||"â"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:s.graduationSemester||s.passingYear||"â"}),e.jsx("td",{className:"px-4 py-3 text-gray-600",children:s.dateOfGraduation?new Date(s.dateOfGraduation).toLocaleDateString("en-GB",{day:"2-digit",month:"short",year:"2-digit"}):s.passingYear||"â"})]},s._id||r))})]})})]})]})})}function L(){return e.jsxs("div",{className:"text-black bg-white ",children:[e.jsx(I,{}),e.jsx(B,{}),e.jsx($,{})]})}
vendor: 22 bytes, line 1
1export{L 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.