0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 18.227.140.100


Current Path : /proc/thread-self/root/var/www/college/static/js/
Upload File :
Current File : //proc/thread-self/root/var/www/college/static/js/838.9658e0f0.chunk.js

"use strict";(self.webpackChunkcollege_portal_app=self.webpackChunkcollege_portal_app||[]).push([[838],{87838:(e,a,l)=>{l.r(a),l.d(a,{default:()=>j});var s=l(87021),t=l(5397),n=l(6051),i=l(79672),d=l(15444),r=l(14647),o=l(70170),c=l(65043),h=l(83003),x=l(86213),p=l(150),u=l(15355);const m=async(e,a,l)=>{await(0,x.A)({method:"GET",url:p.A+"userLoginDet&collcode="+a+"&univcode="+l}).then((a=>{0==a.data.error_code?e({type:"GET_USERLOGINDET",payload:a.data.data}):e({typr:"CLEAR_DATA",payload:[]})}))};var g=l(70579);const j=(0,h.Ng)((e=>(console.log(e.UserLoginDetReducer.userLoginData,"connect"),{user:e.AuthReducer.userData,userLogin:e.UserLoginDetReducer.userLoginData})))((function(e){const[a,l]=(0,c.useState)(""),[j,A]=(0,c.useState)(""),[y,f]=(0,c.useState)(""),[w,v]=(0,c.useState)(""),[b,S]=(0,c.useState)(),[E,D]=(0,c.useState)(""),[C,N]=(0,c.useState)("add"),[I,L]=(0,c.useState)(!1),[U,F]=(0,c.useState)(!0),k=(0,h.wA)(),_=async()=>{if(console.log(a,"hii"),""==a)(0,u.F)("Enter User Id");else if(""==j)(0,u.F)("Enter User Name");else if(""==y)(0,u.F)("Enter password");else if(""==w)(0,u.F)("Enter password again");else if(""==b)(0,u.F)("Enter mobileno");else if(""==E)(0,u.F)("Enter emailid");else if(y!=w)(0,u.F)("password and repassword should be same");else{const l=new FormData;l.append("id",a),l.append("name",j),l.append("password",y),l.append("repasseord",w),l.append("mobileno",b),l.append("emailid",E),l.append("collcode",e.user.fcollcode),l.append("FUNIVCODE",e.user.funivcode),l.append("usertype",e.user.fuser),l.append("add",C),await(async(e,a)=>{await x.A.post(p.A+"saveUserSetupdata",a).then((e=>{0==e.data.error_code&&(0,u.F)(e.data.data)}))})(0,l)}},z=async(a,l,s,t)=>{await(async(e,a,l,s,t,n,i)=>{await(0,x.A)({method:"GET",url:p.A+"userDeleteData&collcode="+a+"&univcode="+l+"&id="+s+"&name="+t+"&mobile="+n+"&email="+i}).then((s=>{-1==s.data.error_code?(0,u.F)(s.data.data.msg):((0,u.F)(s.data.data.msg),m(e,a,l))}))})(k,e.user.fcollcode,e.user.funivcode,a,l,s,t)},R=[{title:(0,g.jsx)("label",{style:{fontSize:"12px"},children:"Sl. No"}),dataIndex:"slno",align:"center",width:"1%"},{title:(0,g.jsx)("label",{style:{fontSize:"12px"},children:"User ID"}),dataIndex:"userid",align:"center",width:"2%"},{title:(0,g.jsx)("label",{style:{fontSize:"12px"},children:"User Name"}),dataIndex:"username",align:"left",width:"4%"},{title:(0,g.jsx)("label",{style:{fontSize:"12px"},children:"Mobile No"}),dataIndex:"mobileno",align:"center",width:"2%"},{title:(0,g.jsx)("label",{style:{fontSize:"12px"},children:"Email Id"}),dataIndex:"emailid",align:"left",width:"4%"},{title:(0,g.jsx)("label",{style:{fontSize:"12px"},children:"Action"}),dataIndex:"action",align:"center",width:"3%"}];console.log(e.userLogin,"anu");const T=e.userLogin.map(((e,a)=>({key:a,slno:a+1,userid:e.fuser,username:e.fname,mobileno:e.fmobileno,emailid:e.femail,action:(0,g.jsxs)("div",{children:[(0,g.jsx)(s.Ay,{onClick:()=>((e,a,s,t)=>{console.log(e,a,s,t,"hii"),l(e),A(a),S(s),D(t),F(!0),L(!1)})(e.fuser,e.fname,e.fmobileno,e.femail),children:"Edit"}),(0,g.jsx)(s.Ay,{onClick:()=>z(e.fuser,e.fname,e.fmobileno,e.femail),children:"Delete"})]})})));return(0,g.jsx)("div",{className:"container-fluid",children:(0,g.jsxs)(t.A,{hoverable:!0,title:"User SetUp",style:{width:"100%"},extra:(0,g.jsxs)(n.A,{direction:"horizontal",children:[(0,g.jsx)(s.Ay,{className:"save",onClick:()=>_(),children:"Save"}),(0,g.jsx)(s.Ay,{className:"save",onClick:()=>(async()=>{await m(k,e.user.fcollcode,e.user.funivcode),L(!0),F(!1)})(),children:"View"}),(0,g.jsx)(s.Ay,{className:"save",children:"Clear"}),(0,g.jsx)(s.Ay,{className:"exit",children:"Exit"})]}),children:[U&&(0,g.jsxs)("div",{style:{marginBottom:"10px"},children:[(0,g.jsxs)(i.A,{style:{marginBottom:"10px"},children:[(0,g.jsx)(d.A,{type:"hidden",value:C}),(0,g.jsx)(r.A,{span:2,children:(0,g.jsx)("label",{children:"User ID"})}),(0,g.jsx)(r.A,{xs:24,sm:24,md:12,lg:12,xl:8,children:(0,g.jsx)(d.A,{placeholder:"Select",style:{width:"100%"},value:a,onChange:e=>{l(e.target.value)}})}),(0,g.jsx)(r.A,{span:2,style:{marginLeft:"70px"},children:(0,g.jsx)("label",{children:"User Name"})}),(0,g.jsx)(r.A,{xs:24,sm:24,md:12,lg:12,xl:8,children:(0,g.jsx)(d.A,{placeholder:"Select",style:{width:"100%"},value:j,onChange:e=>{A(e.target.value)}})})]}),(0,g.jsxs)(i.A,{children:[(0,g.jsx)(r.A,{span:2,children:(0,g.jsx)("label",{children:"Password"})}),(0,g.jsx)(r.A,{xs:24,sm:24,md:12,lg:12,xl:8,children:(0,g.jsx)(d.A,{placeholder:"Select",style:{width:"100%"},type:"password",value:y,onChange:e=>{f(e.target.value)}})}),(0,g.jsx)(r.A,{span:2,style:{marginLeft:"70px"},children:(0,g.jsx)("label",{children:"ReType Password"})}),(0,g.jsx)(r.A,{xs:24,sm:24,md:12,lg:12,xl:8,children:(0,g.jsx)(d.A,{placeholder:"Select",style:{width:"100%"},type:"password",value:w,onChange:e=>{v(e.target.value)}})})]}),(0,g.jsxs)(i.A,{children:[(0,g.jsx)(r.A,{span:2,children:(0,g.jsx)("label",{children:"Mobile No"})}),(0,g.jsx)(r.A,{xs:24,sm:24,md:12,lg:12,xl:8,children:(0,g.jsx)(d.A,{placeholder:"Select",style:{width:"100%"},value:b,onChange:e=>{S(e.target.value)}})})]}),(0,g.jsxs)(i.A,{style:{marginBottom:"10px"},children:[(0,g.jsx)(r.A,{span:2,children:(0,g.jsx)("label",{children:"Email ID"})}),(0,g.jsx)(r.A,{xs:24,sm:24,md:12,lg:12,xl:8,children:(0,g.jsx)(d.A,{placeholder:"Select",style:{width:"100%"},value:E,onChange:e=>{D(e.target.value)}})})]})]}),I&&(0,g.jsx)(o.A,{scroll:{y:400},pagination:!1,bordered:!0,columns:R,dataSource:T,size:"small",style:{padding:"2px",width:"80%",marginTop:"10px",marginLeft:"10%",marginRight:"10%",position:"sticky",top:0}})]})})}))}}]);
//# sourceMappingURL=838.9658e0f0.chunk.js.map