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


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

"use strict";(self.webpackChunkcollege_portal_app=self.webpackChunkcollege_portal_app||[]).push([[642],{10925:(e,a,t)=>{t.d(a,{NS:()=>o,Pe:()=>i,Yg:()=>d});var s=t(15444),c=t(6051),l=t(87021),r=t(62058),n=t(70579);const o=e=>({filterDropdown:a=>{let{setSelectedKeys:t,selectedKeys:o,confirm:d,clearFilters:i,close:u}=a;return(0,n.jsxs)("div",{style:{padding:8},onKeyDown:e=>e.stopPropagation(),children:[(0,n.jsx)(s.A,{autoFocus:!0,placeholder:"Search ".concat(e),value:o,onChange:e=>t(e.target.value?[e.target.value]:[]),onPressEnter:()=>{d()},style:{marginBottom:8,display:"block"}}),(0,n.jsxs)(c.A,{children:[(0,n.jsx)(l.Ay,{type:"primary",onClick:()=>d(),icon:(0,n.jsx)(r.A,{}),size:"small",style:{width:90},children:"Search"}),(0,n.jsx)(l.Ay,{onClick:()=>{i(),d()},size:"small",style:{width:90},children:"Reset"})]})]})},filterIcon:e=>(0,n.jsx)(r.A,{style:{color:e?"#CFFF8D":"#fff"}}),onFilter:(a,t)=>t[e].toString().toLowerCase().includes(a.toLowerCase())}),d=(e,a)=>a.value.toString().toLowerCase().indexOf(e.toLowerCase())>=0||a.label.toString().toLowerCase().indexOf(e.toLowerCase())>=0,i=(e,a,t)=>e[t].localeCompare(a[t])},74642:(e,a,t)=>{t.r(a),t.d(a,{default:()=>g});var s=t(65043),c=t(87021),l=t(5397),r=t(6051),n=t(79672),o=t(14647),d=t(95010),i=t(15444),u=t(70170),h=t(67407),p=t(61966),y=t(86213),A=t(150),f=t(15355);const m=e=>({type:"LOADING",load:e}),v=async(e,a,t,s)=>{e(m(!0));try{await(0,y.A)({method:"GET",url:A.A+"cviewandeditcls&collcode="+a+"&usertype="+t+"&user="+s,headers:{"Content-Type":"application/json"}}).then((a=>{0===a.data.error_code?e({type:"VIEWDATA",payload:a.data.data}):e({type:"CLEAR_DATA",payload:[]})}))}catch(c){e(m(!1)),(0,f.F)(c)}};var x=t(10925),w=t(83003),j=t(70579);const C=[{label:"All",value:"All"}];const g=(0,w.Ng)((e=>(console.log(e.editclsReducer.editviewData,"sdjhdshjdshjdsj"),{user:e.AuthReducer.userData,deptData:e.deptReducer.deptData,viewCreatedClass:e.editclsReducer.editviewData,teachData:e.teachReducer.teachData,updateclsData:e.clsupdateReducer.updateclsData})))((function(e){const[a,t]=(0,s.useState)([]),[g,D]=(0,s.useState)("All"),[S,T]=(0,s.useState)([]),[E,N]=(0,s.useState)(),[b,k]=(0,s.useState)([]),[L,F]=(0,s.useState)(),[R,z]=(0,s.useState)(!1),_=(0,w.wA)();(0,s.useEffect)((()=>{P()}),[]);const P=()=>{v(_,e.user.fcollcode,e.user.fusertype,e.user.fuser)};(0,s.useEffect)((()=>{t(e.viewCreatedClass),I()}),[e.viewCreatedClass]);const I=()=>{(async(e,a,t,s)=>{try{await(0,y.A)({method:"GET",url:A.A+"cgetclsdeptdet&collcode="+a+"&usertype="+t+"&user="+s,headers:{"Content-Type":"application/json"}}).then((a=>{0===a.data.error_code?e({type:"DEPTDATA",payload:a.data.data}):e({type:"DEPTDATA",payload:[]})}))}catch(c){(0,f.F)(c)}})(_,e.user.fcollcode,e.user.fusertype,e.user.fuser),(async(e,a,t,s,c)=>{try{await(0,y.A)({method:"GET",url:A.A+"cgetclsTeachdet&collcode="+a+"&usertype="+t+"&user="+s+"&dept="+c,headers:{"Content-Type":"application/json"}}).then((a=>{0==a.data.error_code?e({type:"TEACHDATA",payload:a.data.data}):e({type:"CLEAR_DATA",payload:[]})}))}catch(l){(0,f.F)(l)}})(_,e.user.fcollcode,e.user.fusertype,e.user.fuser,g)};(0,s.useEffect)((()=>{T(e.teachData),D([...C,...e.deptData])}),[e.deptData,e.teachData]);const H=async()=>{await(async(e,a,t,s,c,l,r,n)=>{e(m(!0));try{await(0,y.A)({method:"POST",url:A.A+"csaveclsdets&clsname="+t+"&univcode="+s+"&collcode="+c+"&user="+l+"&teachcode="+r+"&clsid="+n+"&usertype="+a,headers:{"Content-Type":"application/json"}}).then((a=>{a.data.error_code,(0,f.F)(a.data.data.msg),e(m(!1))}))}catch(o){(0,f.F)(o),e(m(!1))}})(_,e.user.fusertype,b,e.user.funivcode,e.user.fcollcode,e.user.fuser,E,L),P()},O=async(a,t,s)=>{await(async(e,a,t,s,c,l,r)=>{e(m(!0));try{let n=A.A+"cdeletecreatecls&collcode="+a+"&teach="+t+"&cls="+s+"&clsid="+c;(0,f.p)(n),v(e,a,l,r)}catch(n){e(m(!1)),(0,f.F)(n)}})(_,e.user.fcollcode,a,t,s,e.user.fusertype,e.user.fuser),P()},B=()=>{((e,a,t,s)=>{e(m(!0));try{window.open(A.A+"creportexcel&collcode="+a+"&usertype="+t+"&user="+s)}catch(c){e(m(!1))}})(_,e.user.fcollcode,e.user.fusertype,e.user.fuser)},G=[{title:"Sl. No",dataIndex:"slno",align:"center",width:"2%"},{title:"Teacher Name",dataIndex:"teachername",...(0,x.NS)("teachername"),sorter:(e,a)=>(0,x.Pe)(e,a,"teachername"),sortDirections:["descend","ascend"],align:"left",width:"5%"},{title:"Class Name",dataIndex:"classname",...(0,x.NS)("classname"),sorter:(e,a)=>(0,x.Pe)(e,a,"classname"),sortDirections:["descend","ascend"],align:"center",width:"6%"},{title:"Action",dataIndex:"action",align:"center",width:"3%"}],M=a.map(((e,a)=>({key:a,slno:a+1,teachername:e.teachname,classname:e.fclassname,action:(0,j.jsxs)("div",{children:[(0,j.jsxs)(c.Ay,{className:"view",onClick:()=>(async(e,a,t)=>{console.log(t,"clsid"),z(!0),N(e),k(a),F(t)})(e.teachname,e.fclassname,e.fclassid),children:[(0,j.jsx)(h.A,{className:"view"})," Edit"]}),(0,j.jsx)("span",{children:"  "}),(0,j.jsxs)(c.Ay,{className:"exit",onClick:()=>O(e.teachname,e.fclassname,e.fclassid),children:[(0,j.jsx)(p.A,{}),"Delete"]})]})})));return(0,j.jsx)("div",{className:"container-fluid",children:(0,j.jsxs)(l.A,{hoverable:!0,title:"Create Class",style:{width:"100%"},extra:(0,j.jsxs)(r.A,{direction:"horizontal",children:[(0,j.jsx)(c.Ay,{onClick:()=>H(),className:"save",children:"Save"}),(0,j.jsx)(c.Ay,{className:"report",onClick:()=>{B()},children:"Report"}),(0,j.jsx)(c.Ay,{className:"clear",onClick:()=>(T(null),N(null),F(void 0),z(null),void k(null)),children:"Clear"}),(0,j.jsx)(c.Ay,{className:"exit",children:"Exit"})]}),children:[(0,j.jsx)("div",{style:{marginBottom:"20px"},children:(0,j.jsxs)(n.A,{gutter:16,children:[(0,j.jsxs)(o.A,{span:10,children:[(0,j.jsx)("label",{children:"Department"}),(0,j.jsx)(d.A,{showSearch:!0,placeholder:"Select",style:{width:"100%"},disabled:R,value:g,options:e.deptData,filterOption:x.Yg,onChange:e=>D(e)})]}),(0,j.jsxs)(o.A,{span:7,children:[(0,j.jsx)("label",{children:"Teacher"}),(0,j.jsx)(d.A,{showSearch:!0,placeholder:"Select",style:{width:"100%"},disabled:R,value:"T"==e.user.fusertype?e.user.fuser:E,options:e.teachData,filterOption:x.Yg,onChange:e=>N(e)})]}),(0,j.jsxs)(o.A,{span:7,children:[(0,j.jsx)("label",{children:"Class Name"}),(0,j.jsx)(i.A,{style:{width:"100%"},value:b,onChange:e=>k(e.target.value)})]})]})}),(0,j.jsx)(u.A,{scroll:{y:400},bordered:!0,columns:G,dataSource:M,size:"small",style:{padding:"2px"}})]})})}))},61966:(e,a,t)=>{t.d(a,{A:()=>o});var s=t(58168),c=t(65043);const l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};var r=t(22172),n=function(e,a){return c.createElement(r.A,(0,s.A)({},e,{ref:a,icon:l}))};const o=c.forwardRef(n)},67407:(e,a,t)=>{t.d(a,{A:()=>o});var s=t(58168),c=t(65043);const l={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M257.7 752c2 0 4-.2 6-.5L431.9 722c2-.4 3.9-1.3 5.3-2.8l423.9-423.9a9.96 9.96 0 000-14.1L694.9 114.9c-1.9-1.9-4.4-2.9-7.1-2.9s-5.2 1-7.1 2.9L256.8 538.8c-1.5 1.5-2.4 3.3-2.8 5.3l-29.5 168.2a33.5 33.5 0 009.4 29.8c6.6 6.4 14.9 9.9 23.8 9.9zm67.4-174.4L687.8 215l73.3 73.3-362.7 362.6-88.9 15.7 15.6-89zM880 836H144c-17.7 0-32 14.3-32 32v36c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-36c0-17.7-14.3-32-32-32z"}}]},name:"edit",theme:"outlined"};var r=t(22172),n=function(e,a){return c.createElement(r.A,(0,s.A)({},e,{ref:a,icon:l}))};const o=c.forwardRef(n)}}]);
//# sourceMappingURL=642.734b05f3.chunk.js.map