File manager - Edit - /home/webapp69.cm.in.th/u69319090023/Shop23/_next/static/chunks/2jdt0yaatx156.js
Back
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,99847,e=>{"use strict";let r=(0,e.i(56420).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["AlertCircle",0,r],99847)},59544,e=>{"use strict";var r=e.i(43476);e.s(["default",0,({children:e,variant:t="primary",size:s="md",isLoading:a=!1,className:l="",disabled:i,...d})=>(0,r.jsxs)("button",{className:`inline-flex items-center justify-center font-semibold rounded-full transition-all duration-300 active:scale-95 focus:outline-none focus:ring-2 focus:ring-accent focus:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none disabled:active:scale-100 ${{primary:"bg-gradient-to-r from-primary to-secondary text-text-primary hover:from-accent hover:to-highlight shadow-luxury hover:shadow-luxury-glow hover:-translate-y-[2px]",secondary:"bg-white text-primary border border-gray-100 hover:bg-gray-50 shadow-card-soft",outline:"bg-transparent text-white border-2 border-white/20 hover:border-white hover:bg-white/10",glass:"glassmorphism text-white hover:bg-white/15 border border-white/10",danger:"bg-red-600 text-white hover:bg-red-700 shadow-sm"}[t]} ${{sm:"text-sm px-4 py-2",md:"text-base px-6 py-3",lg:"text-lg px-8 py-4"}[s]} ${l}`,disabled:i||a,...d,children:[a&&(0,r.jsxs)("svg",{className:"animate-spin -ml-1 mr-3 h-5 w-5 text-current",fill:"none",viewBox:"0 0 24 24",children:[(0,r.jsx)("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),(0,r.jsx)("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})]}),e]})])},39964,e=>{"use strict";var r=e.i(43476);e.s(["default",0,({variant:e="white",children:t,className:s="",...a})=>(0,r.jsx)("div",{className:`${(()=>{switch(e){case"white":return"bg-white rounded-2xl shadow-sm border border-gray-100";case"glass":return"bg-white/80 backdrop-blur-md rounded-2xl shadow-sm border border-white/20";case"glass-dark":return"bg-gray-900/80 backdrop-blur-md rounded-2xl shadow-lg border border-gray-800 text-white";case"outline":return"bg-transparent rounded-2xl border border-gray-200";default:return"bg-white rounded-2xl shadow-sm"}})()} ${s}`,...a,children:t})])},6537,e=>{"use strict";let r=(0,e.i(56420).default)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);e.s(["Lock",0,r],6537)},97923,e=>{"use strict";let r=(0,e.i(56420).default)("log-in",[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]]);e.s(["LogIn",0,r],97923)},94542,e=>{"use strict";var r=e.i(43476),t=e.i(71645),s=e.i(22016),a=e.i(18566),l=e.i(96315),i=e.i(6537),d=e.i(97923),o=e.i(99847),c=e.i(44779),n=e.i(59544),x=e.i(39964);e.s(["default",0,function(){let e=(0,a.useRouter)(),[h,u]=(0,t.useState)(""),[m,p]=(0,t.useState)(""),[y,g]=(0,t.useState)(""),[b,f]=(0,t.useState)(!1),w=async r=>{if(r.preventDefault(),g(""),!h||!m)return void g("กรุณากรอกอีเมลและรหัสผ่านให้ครบถ้วน");f(!0);try{let r=await c.default.login(h,m);if("admin"===r.role)e.push("/admin");else{let r=new URLSearchParams(window.location.search).get("redirect")||"/";e.push(r)}e.refresh()}catch(e){g(e?.message||"อีเมลหรือรหัสผ่านไม่ถูกต้อง")}finally{f(!1)}};return(0,r.jsx)("div",{className:"mx-auto max-w-md px-4 pt-28 pb-16 text-left",children:(0,r.jsxs)(x.default,{variant:"white",className:"p-8 border border-gray-150 shadow-luxury bg-white space-y-6",children:[(0,r.jsxs)("div",{className:"text-center space-y-2",children:[(0,r.jsx)("h1",{className:"text-2xl font-bold text-gray-900",children:"เข้าสู่ระบบ"}),(0,r.jsx)("p",{className:"text-xs text-gray-500 font-light",children:"กรอกบัญชีผู้ใช้งานเพื่อทำรายการสั่งชำระเงินและตรวจสอบพัสดุ"})]}),y&&(0,r.jsxs)("div",{className:"p-3 bg-red-50 text-red-600 text-xs font-semibold rounded-xl border border-red-100 flex items-center space-x-2",children:[(0,r.jsx)(o.AlertCircle,{className:"w-4.5 h-4.5 flex-shrink-0"}),(0,r.jsx)("span",{children:y})]}),(0,r.jsxs)("form",{onSubmit:w,className:"space-y-4",children:[(0,r.jsxs)("div",{className:"flex flex-col space-y-1.5",children:[(0,r.jsx)("label",{htmlFor:"email-input",className:"text-xs font-bold text-gray-700",children:"อีเมลนักศึกษา / บุคลากร"}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(l.Mail,{className:"absolute left-4 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),(0,r.jsx)("input",{id:"email-input",type:"email",required:!0,placeholder:"example@cmtc.ac.th",value:h,onChange:e=>u(e.target.value),className:"w-full border border-gray-200 rounded-xl py-2.5 pl-11 pr-4 text-sm focus:outline-none focus:ring-1 focus:ring-accent focus:border-accent text-gray-800"})]})]}),(0,r.jsxs)("div",{className:"flex flex-col space-y-1.5",children:[(0,r.jsx)("label",{htmlFor:"password-input",className:"text-xs font-bold text-gray-700",children:"รหัสผ่าน"}),(0,r.jsxs)("div",{className:"relative",children:[(0,r.jsx)(i.Lock,{className:"absolute left-4 top-1/2 -translate-y-1/2 w-4 h-4 text-gray-400"}),(0,r.jsx)("input",{id:"password-input",type:"password",required:!0,placeholder:"กรอกรหัสผ่านของคุณ...",value:m,onChange:e=>p(e.target.value),className:"w-full border border-gray-200 rounded-xl py-2.5 pl-11 pr-4 text-sm focus:outline-none focus:ring-1 focus:ring-accent focus:border-accent text-gray-800"})]})]}),(0,r.jsx)("div",{className:"text-right",children:(0,r.jsx)("a",{href:"#",className:"text-xs font-semibold text-accent hover:underline",children:"ลืมรหัสผ่าน?"})}),(0,r.jsx)("div",{className:"pt-2",children:(0,r.jsxs)(n.default,{type:"submit",variant:"primary",isLoading:b,className:"w-full py-3 flex items-center justify-center space-x-2 shadow-luxury",children:[(0,r.jsx)(d.LogIn,{className:"w-4.5 h-4.5"}),(0,r.jsx)("span",{children:"เข้าสู่ระบบ"})]})})]}),(0,r.jsxs)("div",{className:"text-center text-xs text-gray-400 pt-4 border-t border-gray-100",children:[(0,r.jsx)("span",{children:"ยังไม่มีบัญชีผู้ใช้? "}),(0,r.jsx)(s.default,{href:"/register",className:"font-bold text-accent hover:underline",children:"สมัครสมาชิกที่นี่"})]})]})})}])}]);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.23 |
proxy
|
phpinfo
|
Settings