1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8844],{28844:(e,l,a)=>{a.r(l),a.d(l,{default:()=>m});var r=a(3576),s=a(62701),n=a(37876),t=a(69178),o=a(83162),i=a(54196),d=a(14232);let c=e=>{let{label:l,name:a,type:r="text",placeholder:s,value:t,error:o,onChange:i,disabled:d}=e;return(0,n.jsxs)("div",{className:"flex flex-col gap-1.5 w-full",children:[(0,n.jsx)("label",{className:"text-[10px] font-bold text-white/80 uppercase ml-1 tracking-widest",children:l}),(0,n.jsx)("input",{type:r,name:a,placeholder:s,disabled:d,value:t,onChange:i,className:"w-full p-3.5 bg-white/95 backdrop-blur-sm border rounded-xl transition-all duration-300 outline-none text-sm text-gray-800 shadow-sm\n ".concat(d?"opacity-50 cursor-not-allowed":"","\n ").concat(o?"border-red-500 ring-2 ring-red-500/20":"border-transparent focus:border-yellow-400 focus:ring-4 focus:ring-yellow-400/20 focus:bg-white")}),o&&(0,n.jsx)("span",{className:"text-[10px] text-red-300 font-bold mt-1 ml-1 animate-pulse",children:o})]})},m=e=>{let{data:l}=e,[a,m]=(0,d.useState)({fullname:"",roll_no:"",email:"",mobile:"",course:"",batchyear:"",payment_for:"",amount:""}),[u,p]=(0,d.useState)({loading:!1,step:"",error:null,success:null}),[x,h]=(0,d.useState)({});(0,d.useEffect)(()=>{let e=document.createElement("script");e.src="https://checkout.razorpay.com/v1/checkout.js",e.async=!0,document.body.appendChild(e)},[]);let b=e=>{let{name:l,value:a}=e.target;m(e=>(0,s._)((0,r._)({},e),{[l]:a})),x[l]&&h(e=>(0,s._)((0,r._)({},e),{[l]:null}))},g=async(e,l)=>{p({loading:!0,step:"Verifying Transaction...",error:null,success:null});try{let a=await fetch("".concat(i.Qs,"payment/verify"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({razorpay_order_id:e.razorpay_order_id,razorpay_payment_id:e.razorpay_payment_id,razorpay_signature:e.razorpay_signature,studentFeeId:l})}),r=await a.json();if(r.success)p({loading:!1,step:"",error:null,success:"Fee Paid Successfully! Your record has been updated."}),m({fullname:"",roll_no:"",email:"",mobile:"",course:"",batchyear:"",payment_for:"",amount:""});else throw Error(r.message||"Verification Failed")}catch(e){p({loading:!1,step:"",error:e.message,success:null})}},y=async e=>{if(e&&e.preventDefault(),(()=>{let e={};return a.fullname.trim()||(e.fullname="Name required"),a.roll_no.trim()||(e.roll_no="Roll number required"),/^\S+@\S+\.\S+$/.test(a.email)||(e.email="Invalid email"),a.mobile.length<10&&(e.mobile="Invalid mobile"),a.course||(e.course="Select course"),a.batchyear||(e.batchyear="Batch required"),a.payment_for||(e.payment_for="Select payment purpose"),(!a.amount||a.amount<=0)&&(e.amount="Enter valid amount"),h(e),0===Object.keys(e).length})()){p({loading:!0,step:"Creating Secure Order...",error:null,success:null});try{let e=await fetch("".concat(i.Qs,"payment/initiate"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify((0,s._)((0,r._)({},a),{modelName:"StudentFee"}))}),l=await e.json();if(!l.success)throw Error(l.message);let n={key:"rzp_live_SUdcJIebOjyTQi",amount:l.order.amount,currency:l.order.currency,name:"Mangal May Institute",description:"".concat(a.payment_for," Payment"),order_id:l.order.id,handler:e=>g(e,l.studentFeeId),prefill:{name:a.fullname,email:a.email,contact:a.mobile},theme:{color:"#911E75"},modal:{ondismiss:()=>p({loading:!1,step:"",error:"Payment was cancelled.",success:null})}};new window.Razorpay(n).open()}catch(e){p({loading:!1,step:"",error:e.message||"Connection Error",success:null})}}};return(0,n.jsxs)("div",{className:"bg-white mb-2",children:[(0,n.jsx)(t.A,{data:l,BreadCrumb:null==l?void 0:l.breadCrumb}),(0,n.jsx)("div",{className:"bg-primary",children:(0,n.jsx)("div",{className:"bg-white h-3 sm:h-10 rounded-bl-3xl"})}),(0,n.jsxs)("section",{className:"w-full grid grid-cols-12 lg:gap-10",children:[(0,n.jsx)("div",{className:"bg-primary rounded-r-[50px] col-span-9 max-xl:col-span-8 max-lg:col-span-12",children:(0,n.jsx)("div",{className:"p-6 md:p-12",children:(0,n.jsxs)("div",{className:"max-w-4xl mx-auto",children:[(0,n.jsxs)("header",{className:"mb-10 relative",children:[(0,n.jsx)("div",{className:"absolute -left-4 top-0 h-full w-1.5 bg-yellow-400 rounded-full shadow-[0_0_15px_rgba(250,204,21,0.5)]"}),(0,n.jsxs)("h2",{className:"text-3xl font-black text-white tracking-tighter uppercase italic leading-none",children:["Student Fee ",(0,n.jsx)("span",{className:"text-yellow-400",children:"Portal"})]})]}),u.success&&(0,n.jsxs)("div",{className:"mb-8 p-4 bg-emerald-500/20 border border-emerald-500/50 text-emerald-100 rounded-xl text-sm font-bold flex items-center gap-3 animate-pulse",children:[(0,n.jsx)("span",{className:"bg-emerald-500 text-white rounded-full p-1 text-[10px]",children:"â"})," ",u.success]}),u.error&&(0,n.jsxs)("div",{className:"mb-8 p-4 bg-red-500/20 border border-red-500/50 text-red-100 rounded-xl text-sm font-bold flex justify-between items-center",children:[(0,n.jsxs)("span",{className:"flex items-center gap-2",children:["â ",u.error]}),(0,n.jsx)("button",{onClick:y,className:"text-[10px] bg-red-500 px-3 py-1 rounded-lg uppercase",children:"Retry"})]}),(0,n.jsxs)("form",{onSubmit:y,className:"space-y-8",children:[(0,n.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-x-10 gap-y-6",children:[(0,n.jsx)(c,{label:"Full Name",name:"fullname",placeholder:"John Doe",value:a.fullname,error:x.fullname,onChange:b,disabled:u.loading}),(0,n.jsx)(c,{label:"Roll No",name:"roll_no",placeholder:"Roll Number",value:a.roll_no,error:x.roll_no,onChange:b,disabled:u.loading}),(0,n.jsx)(c,{label:"Email Address",name:"email",type:"email",placeholder:"[email protected]",value:a.email,error:x.email,onChange:b,disabled:u.loading}),(0,n.jsx)(c,{label:"Mobile Number",name:"mobile",placeholder:"10 Digit Mobile",value:a.mobile,error:x.mobile,onChange:b,disabled:u.loading}),(0,n.jsxs)("div",{className:"flex flex-col gap-1.5 w-full",children:[(0,n.jsx)("label",{className:"text-[10px] font-bold text-white/80 uppercase ml-1 tracking-widest",children:"Select Course"}),(0,n.jsxs)("select",{name:"course",value:a.course,onChange:b,disabled:u.loading,className:"w-full p-3.5 bg-white/95 border rounded-xl outline-none text-sm text-gray-800 transition-all cursor-pointer shadow-sm\n ".concat(x.course?"border-red-500 ring-2 ring-red-500/20":"border-transparent focus:border-yellow-400"),children:[(0,n.jsx)("option",{value:"",children:"Choose Course"}),(0,n.jsx)("option",{value:"B.Tech",children:"B.Tech"}),(0,n.jsx)("option",{value:"MBA",children:"MBA"}),(0,n.jsx)("option",{value:"BBA",children:"BBA"}),(0,n.jsx)("option",{value:"B.com",children:"B.Com"}),(0,n.jsx)("option",{value:"BCA",children:"BCA"}),(0,n.jsx)("option",{value:"BA-B.Ed",children:"BA-B.Ed"}),(0,n.jsx)("option",{value:"BBA Platina",children:"BBA Platina"}),(0,n.jsx)("option",{value:"B.Tech Lateral",children:"B.Tech Lateral"}),(0,n.jsx)("option",{value:"MBA ++",children:"MBA ++"}),(0,n.jsx)("option",{value:"B.Tech Advance",children:"B.Tech Advance"})]}),x.course&&(0,n.jsx)("span",{className:"text-[10px] text-red-300 font-bold ml-1",children:x.course})]}),(0,n.jsx)(c,{label:"Batch Year",name:"batchyear",placeholder:"e.g. 2024",value:a.batchyear,error:x.batchyear,onChange:b,disabled:u.loading}),(0,n.jsxs)("div",{className:"flex flex-col gap-1.5 w-full",children:[(0,n.jsx)("label",{className:"text-[10px] font-bold text-white/80 uppercase ml-1 tracking-widest",children:"Payment For"}),(0,n.jsxs)("select",{name:"payment_for",value:a.payment_for,onChange:b,disabled:u.loading,className:"w-full p-3.5 bg-white/95 border rounded-xl outline-none text-sm text-gray-800 transition-all cursor-pointer shadow-sm\n ".concat(x.payment_for?"border-red-500 ring-2 ring-red-500/20":"border-transparent focus:border-yellow-400"),children:[(0,n.jsx)("option",{value:"",children:"Choose Semester/Fee Type"}),(0,n.jsx)("option",{value:"Admission Fee",children:"Admission Fee"}),(0,n.jsx)("option",{value:"Semester 1",children:"Semester 1"}),(0,n.jsx)("option",{value:"Semester 2",children:"Semester 2"}),(0,n.jsx)("option",{value:"Semester 3",children:"Semester 3"}),(0,n.jsx)("option",{value:"Semester 4",children:"Semester 4"}),(0,n.jsx)("option",{value:"Semester 5",children:"Semester 5"}),(0,n.jsx)("option",{value:"Semester 6",children:"Semester 6"}),(0,n.jsx)("option",{value:"Semester 7",children:"Semester 7"}),(0,n.jsx)("option",{value:"Semester 8",children:"Semester 8"}),(0,n.jsx)("option",{value:"Exam Fee",children:"Exam Fee"}),(0,n.jsx)("option",{value:"Back Paper Fee",children:"Back Paper Fee"})]}),x.payment_for&&(0,n.jsx)("span",{className:"text-[10px] text-red-300 font-bold ml-1",children:x.payment_for})]}),(0,n.jsx)(c,{label:"Amount",name:"amount",type:"number",placeholder:"Enter Amount",value:a.amount,error:x.amount,onChange:b,disabled:u.loading})]}),(0,n.jsx)("div",{className:"pt-6",children:(0,n.jsx)("button",{type:"submit",disabled:u.loading,className:"px-14 py-4 bg-yellow-400 text-black text-[11px] font-black uppercase tracking-[0.25em] rounded-2xl transition-all flex items-center gap-4\n ".concat(u.loading?"opacity-70 grayscale cursor-not-allowed":"hover:bg-yellow-300 hover:shadow-[0_20px_40px_-10px_rgba(250,204,21,0.4)] hover:-translate-y-1"),children:u.loading?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)("div",{className:"w-4 h-4 border-2 border-black/20 border-t-black rounded-full animate-spin"})," ",u.step]}):"Pay â¹".concat(a.amount||"0")})})]})]})})}),(0,n.jsx)("div",{className:"max-sm:pt-5 max-lg:pt-10 col-span-3 max-xl:col-span-4 max-lg:col-span-12 max-lg:px-10 max-sm:px-4",children:(0,n.jsx)(o.A,{data:null==l?void 0:l.sidebarData})})]})]})}}}]);
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.