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 : 52.14.204.52


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

"use strict";(self.webpackChunkcollege_portal_app=self.webpackChunkcollege_portal_app||[]).push([[824],{57824:(e,s,l)=>{l.r(s),l.d(s,{default:()=>A});var t=l(32513),a=l(5397),i=l(6051),n=l(87021),d=l(79672),r=l(14647),c=l(95010),o=l(15444),h=l(70170),x=l(65043),p=l(83003),j=l(86213),u=l(150);var g=l(70579);const A=(0,p.Ng)((e=>(console.log(e.UserRightDetModuleReducer.userRightModuleData,"connect"),{user:e.AuthReducer.userData,rights:e.UserRightDetReducer.userRightData,module:e.UserRightDetModuleReducer.userRightModuleData})))((function(e){const[s,l]=(0,x.useState)(""),[A,m]=(0,x.useState)([]),[y,w]=(0,x.useState)(""),[f,S]=(0,x.useState)([]),[v,_]=(0,x.useState)([]),T=(0,p.wA)();(0,x.useEffect)((()=>{b(),l(e.rights.user_rights_user),w(e.rights.user_rights_module_type)}),[]);const b=async()=>{await(async(e,s)=>{await(0,j.A)({method:"GET",url:u.A+"getUserRightsDetails&collcode="+s,headers:{"Content-Type":"application/json"}}).then((s=>{0==s.data.error_code?e({type:"GET_RIGHT",payload:s.data.data}):e({typr:"CLEAR_DATA",payload:[]})}))})(T,e.user.fcollcode),m(e.rights.user_rights_user),S(e.rights.user_rights_module_type)},k=async l=>{w(l),await(async(e,s,l,t)=>{await(0,j.A)({method:"GET",url:u.A+"usersGetModuleNames&collcode="+s+"&user="+l+"&module="+t,headers:{"Content-Type":"application/json"}}).then((s=>{console.log(s,"kkkk"),0==s.data.error_code?e({type:"GET_MODULE",payload:s.data.data}):e({typr:"CLEAR_DATA",payload:[]})}))})(T,e.user.fcollcode,s,l),S(e.rights.user_rights_module_type)},C=[{title:(0,g.jsx)("label",{style:{fontSize:"12px"},children:"Module Name"}),dataIndex:"modulename",align:"center",width:"1.4%"},{title:(0,g.jsx)("label",{style:{fontSize:"12px"},children:"All"}),dataIndex:"all",align:"center",width:"1%"},{title:(0,g.jsxs)("div",{children:[(0,g.jsx)("label",{style:{fontSize:"12px"},children:"View"})," ",(0,g.jsx)("span",{children:" "}),(0,g.jsx)(t.A,{onChange:s=>(s=>{console.log(s,"viii");let l=e.module.map(((e,l)=>(e.fviewStatus=s?"T":"F",e)));_([...l])})(s.target.checked)}),(0,g.jsx)("br",{}),(0,g.jsx)("label",{style:{fontSize:"12px"},children:"Own|Group|Dep|All"})]}),dataIndex:"view",align:"center",width:"2%"},{title:(0,g.jsxs)("div",{children:[(0,g.jsx)("label",{style:{fontSize:"12px"},children:"Add"})," ",(0,g.jsx)("span",{children:" "}),(0,g.jsx)(t.A,{onChange:s=>(s=>{let l=e.module.map(((e,l)=>(e.fstatus=s?"T":"F",e)));_([...l])})(s.target.checked)})]}),dataIndex:"add",align:"center",width:"1%"},{title:(0,g.jsxs)("div",{children:[(0,g.jsx)("label",{style:{fontSize:"12px"},children:"Edit"})," ",(0,g.jsx)("span",{children:" "}),(0,g.jsx)(t.A,{}),(0,g.jsx)("br",{}),(0,g.jsx)("label",{style:{fontSize:"12px"},children:"Own|Group|Dep|All"})]}),dataIndex:"edit",align:"center",width:"2%"},{title:(0,g.jsxs)("div",{children:[(0,g.jsx)("label",{style:{fontSize:"12px"},children:"Delete"})," ",(0,g.jsx)("span",{children:" "}),(0,g.jsx)(t.A,{}),(0,g.jsx)("br",{}),(0,g.jsx)("label",{style:{fontSize:"12px"},children:"Own|Group|Dep|All"})]}),dataIndex:"action",align:"center",width:"2%"}],D=e.module.map(((s,l)=>({key:l+1,modulename:s.label,all:(0,g.jsx)("div",{children:(0,g.jsx)(t.A,{})}),view:(0,g.jsxs)("div",{children:[(0,g.jsx)(t.A,{checked:"T"==s.fviewStatus&&1==s.id,onChange:s=>((s,l,t)=>{console.log(s,l,t,"own");const a=e.module;a[t].fviewStatus=s?"T":"F",a[t].id=s?l:"F",_([...a])})(s.target.checked,"1",l)})," ",(0,g.jsx)("span",{children:" "}),(0,g.jsx)(t.A,{checked:"T"===s.fviewStatus&&2==s.id,onChange:s=>((s,l,t)=>{console.log(s,l,t,"grp");const a=e.module;a[t].fviewStatus=s?"T":"F",a[t].id=s?l:"F",_([...a])})(s.target.checked,"2",l)})," ",(0,g.jsx)("span",{children:" "}),(0,g.jsx)(t.A,{checked:"T"===s.fviewStatus&&3==s.id,onChange:s=>((s,l,t)=>{console.log(s,l,t,"dept");const a=e.module;a[t].fviewStatus=s?"T":"F",a[t].id=s?l:"F",_([...a])})(s.target.checked,"3",l)})," ",(0,g.jsx)("span",{children:" "}),(0,g.jsx)(t.A,{checked:"T"===s.fviewStatus&&4==s.id,onChange:s=>((s,l,t)=>{console.log(s,l,t,"all");const a=e.module;a[t].fviewStatus=s?"T":"F",a[t].id=s?l:"F",_([...a])})(s.target.checked,"4",l)})]}),add:(0,g.jsx)(t.A,{checked:"T"==s.fstatus,onChange:s=>((s,l)=>{const t=e.module;t[l].fstatus=s?"T":"F",_([...t])})(s.target.checked,l)}),edit:(0,g.jsxs)("div",{children:[(0,g.jsx)(t.A,{})," ",(0,g.jsx)("span",{children:" "}),(0,g.jsx)(t.A,{})," ",(0,g.jsx)("span",{children:" "}),(0,g.jsx)(t.A,{})," ",(0,g.jsx)("span",{children:" "}),(0,g.jsx)(t.A,{})]}),action:(0,g.jsxs)("div",{children:[(0,g.jsx)(t.A,{})," ",(0,g.jsx)("span",{children:" "}),(0,g.jsx)(t.A,{})," ",(0,g.jsx)("span",{children:" "}),(0,g.jsx)(t.A,{})," ",(0,g.jsx)("span",{children:" "}),(0,g.jsx)(t.A,{})]})})));return(0,g.jsx)("div",{className:"container-fluid",children:(0,g.jsxs)(a.A,{hoverable:!0,title:"User SetUp",style:{width:"100%"},extra:(0,g.jsxs)(i.A,{direction:"horizontal",children:[(0,g.jsx)(n.Ay,{className:"save",children:"Save"}),(0,g.jsx)(n.Ay,{className:"save",children:"View"}),(0,g.jsx)(n.Ay,{className:"save",children:"Clear"}),(0,g.jsx)(n.Ay,{className:"exit",children:"Exit"})]}),children:[(0,g.jsxs)("div",{children:[(0,g.jsxs)(d.A,{style:{marginBottom:"10px"},children:[(0,g.jsx)(r.A,{span:2,children:(0,g.jsx)("label",{children:"User/Group"})}),(0,g.jsx)(r.A,{xs:24,sm:24,md:12,lg:12,xl:8,children:(0,g.jsx)(c.A,{placeholder:"Select",style:{width:"100%"},value:s,options:e.rights.user_rights_user,onChange:s=>(async s=>{l(s),m(e.rights.user_rights_user)})(s)})}),(0,g.jsx)(r.A,{span:2,style:{marginLeft:"70px"},children:(0,g.jsx)("label",{children:"Module Type"})}),(0,g.jsx)(r.A,{xs:24,sm:24,md:12,lg:12,xl:8,children:(0,g.jsx)(c.A,{placeholder:"Select",style:{width:"100%"},value:y,options:e.rights.user_rights_module_type,onChange:e=>k(e)})})]}),(0,g.jsxs)(d.A,{style:{marginBottom:"10px"},children:[(0,g.jsx)(r.A,{span:3,children:(0,g.jsx)("label",{children:"Search Module (Optional):"})}),(0,g.jsx)(r.A,{xs:12,sm:12,md:6,lg:6,xl:4,children:(0,g.jsx)(o.A,{placeholder:"Select",style:{width:"100%"}})}),(0,g.jsx)(r.A,{span:3,style:{marginLeft:"70px"},children:(0,g.jsx)(n.Ay,{className:"save",children:"Search"})}),(0,g.jsx)(r.A,{span:2,children:(0,g.jsx)("label",{children:"Select All"})}),(0,g.jsx)(r.A,{span:2,children:(0,g.jsx)(t.A,{})}),(0,g.jsxs)(r.A,{span:2,children:[(0,g.jsx)("label",{children:"Select All Dep-Users:"})," ",(0,g.jsx)("span",{children:" "})]}),(0,g.jsx)(r.A,{children:(0,g.jsx)(t.A,{})})]})]}),(0,g.jsx)(h.A,{scroll:{y:400},pagination:!1,bordered:!0,columns:C,dataSource:D,size:"small",style:{padding:"2px",width:"80%",marginLeft:"10%",marginTop:"-10px",position:"sticky",top:0}})]})})}))}}]);
//# sourceMappingURL=824.52f9aacc.chunk.js.map