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


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

"use strict";(self.webpackChunkcollege_portal_app=self.webpackChunkcollege_portal_app||[]).push([[84],{10925:(e,l,t)=>{t.d(l,{NS:()=>i,Pe:()=>c,Yg:()=>d});var a=t(15444),r=t(6051),s=t(87021),o=t(62058),n=t(70579);const i=e=>({filterDropdown:l=>{let{setSelectedKeys:t,selectedKeys:i,confirm:d,clearFilters:c,close:g}=l;return(0,n.jsxs)("div",{style:{padding:8},onKeyDown:e=>e.stopPropagation(),children:[(0,n.jsx)(a.A,{autoFocus:!0,placeholder:"Search ".concat(e),value:i,onChange:e=>t(e.target.value?[e.target.value]:[]),onPressEnter:()=>{d()},style:{marginBottom:8,display:"block"}}),(0,n.jsxs)(r.A,{children:[(0,n.jsx)(s.Ay,{type:"primary",onClick:()=>d(),icon:(0,n.jsx)(o.A,{}),size:"small",style:{width:90},children:"Search"}),(0,n.jsx)(s.Ay,{onClick:()=>{c(),d()},size:"small",style:{width:90},children:"Reset"})]})]})},filterIcon:e=>(0,n.jsx)(o.A,{style:{color:e?"#CFFF8D":"#fff"}}),onFilter:(l,t)=>t[e].toString().toLowerCase().includes(l.toLowerCase())}),d=(e,l)=>l.value.toString().toLowerCase().indexOf(e.toLowerCase())>=0||l.label.toString().toLowerCase().indexOf(e.toLowerCase())>=0,c=(e,l,t)=>e[t].localeCompare(l[t])},35084:(e,l,t)=>{t.r(l),t.d(l,{default:()=>S});var a=t(65043),r=t(83003),s=t(35475),o=t(6036),n=t(87021),i=t(5397),d=t(6051),c=t(79672),g=t(14647),x=t(95010),h=t(15444),p=t(70170),y=t(62918),m=t(10925),u=t(86213),A=t(150);var j=t(94733),w=t(70579);const f=[{key:"all",label:"All",value:"all"},{key:"pending",label:"Pending",value:"pending"},{key:"uploaded",label:"Uploaded",value:"uploaded"}],S=(0,r.Ng)((e=>({user:e.AuthReducer.userData,degreeReducer:e.degree.degreeData,studPhDet:e.studPhotoDet.studPhotoDet})))((e=>{const l=(0,r.wA)(),[t,S]=(0,a.useState)({degree:[],regfrom:"0",regto:"Z",type:"all"}),[v,D]=(0,a.useState)(!1),[C,E]=(0,a.useState)(""),[k,N]=(0,a.useState)([]),[L,b]=(0,a.useState)({});(0,a.useEffect)((()=>{(async(e,l)=>{e({type:"SET_LOADER"}),await u.A.get(A.A+"getDegree&collcode="+l).then((l=>{0===l.data.error_code?e({type:"DEGREE_LIST",payload:l.data.data}):e({type:"DEGREE_LIST",payload:[]}),e({type:"UNSET_LOADER"})}))})(l,e.user.fcollcode)}),[]);const P=async(e,l)=>{await S((t=>({...t,[e]:l})))},R=async()=>{await(async(e,l,t)=>{e({type:"SET_LOADER"}),await u.A.get(A.A+"viewStudentUpdDet&collcode="+l+"&data="+JSON.stringify(t)).then((l=>{e({type:"UNSET_LOADER"}),0===l.data.error_code?e({type:"STUDENT_PHOTO_DET",payload:l.data.data}):e({type:"STUDENT_PHOTO_DET",payload:[]})}))})(l,e.user.fcollcode,t)},_=e=>{const l={...k,[e]:[]};E([]),D(!1),N(l)},O=e=>new Promise(((l,t)=>{const a=new FileReader;a.readAsDataURL(e),a.onload=()=>l(a.result),a.onerror=e=>t(e)})),T=e.studPhDet.map(((e,l)=>({key:l,slno:l+1,regno:e.fregno,degree:e.fdegree,name:e.fname,select:""}))),U=[{title:"Sl. No",dataIndex:"slno",align:"center",width:"5%"},{title:"Reg. No.",dataIndex:"regno",...(0,m.NS)("regno"),sorter:(e,l)=>(0,m.Pe)(e,l,"regno"),sortDirections:["descend","ascend"],align:"center",width:"15%"},{title:"Name",dataIndex:"name",...(0,m.NS)("name"),sorter:(e,l)=>(0,m.Pe)(e,l,"name"),sortDirections:["descend","ascend"],width:"55%"},{title:"Degree",dataIndex:"degree",...(0,m.NS)("degree"),sorter:(e,l)=>(0,m.Pe)(e,l,"degree"),sortDirections:["descend","ascend"],align:"center",width:"10%"},{title:"Action",key:"upload",render:(e,l)=>(0,w.jsx)(o.A,{fileList:k[l.key]||[],onPreview:e=>(async e=>{e.url||e.preview||(e.preview=await O(e.originFileObj)),E(e.url||e.preview),D(!0)})(e),onChange:e=>(async(e,l)=>{if(console.log(l),e.fileList.length>0){const t={...k,[l.key]:[e.fileList[e.fileList.length-1]]};let a=await O(e.fileList[e.fileList.length-1].originFileObj);E(a),D(!0),N(t),b(l)}else _(l.key),b({})})(e,l),beforeUpload:()=>!1,children:(0,w.jsx)("div",{children:(0,w.jsx)(n.Ay,{icon:(0,w.jsx)(j.A,{}),children:"Click to Upload"})})}),align:"center",width:"15%"}];return(0,w.jsxs)(i.A,{hoverable:!0,title:"Upload Student Photo",style:{width:"100%"},extra:(0,w.jsxs)(d.A,{direction:"horizontal",children:[(0,w.jsx)(n.Ay,{className:"clear",children:"Clear"}),(0,w.jsx)(s.N_,{to:"/",children:(0,w.jsx)(n.Ay,{className:"exit",children:"Exit"})})]}),children:[(0,w.jsx)(c.A,{style:{marginBottom:"10px"},children:(0,w.jsxs)(g.A,{xs:24,sm:24,md:12,lg:12,xl:8,xxl:6,children:[(0,w.jsx)("label",{children:" Degree"}),(0,w.jsx)(x.A,{showSearch:!0,style:{width:"100%"},value:t.degree,mode:"multiple",name:"degree",size:"large",filterOption:m.Yg,options:e.degreeReducer,onChange:e=>P("degree",e)})]})}),(0,w.jsx)(c.A,{style:{marginBottom:"10px"},children:(0,w.jsxs)(g.A,{xs:24,sm:24,md:12,lg:12,xl:8,xxl:6,children:[(0,w.jsx)("label",{children:" Reg. No. Range"}),(0,w.jsxs)(c.A,{gutter:16,children:[(0,w.jsx)(g.A,{xs:12,sm:12,md:12,lg:12,xl:12,xxl:12,children:(0,w.jsx)(h.A,{placeholder:"Reg.No.(from)",value:t.regfrom,name:"regfrom",size:"large",onChange:e=>P("regfrom",e.target.value)})}),(0,w.jsx)(g.A,{xs:12,sm:12,md:12,lg:12,xl:12,xxl:12,children:(0,w.jsx)(h.A,{placeholder:"Reg.No.(to)",name:"regto",size:"large",value:t.regto,onChange:e=>P("regto",e.target.value)})})]})]})}),(0,w.jsx)(c.A,{style:{marginBottom:"10px"},children:(0,w.jsxs)(g.A,{xs:24,sm:24,md:12,lg:12,xl:8,xxl:6,children:[(0,w.jsx)("label",{children:"Type"}),(0,w.jsx)(x.A,{showSearch:!0,style:{width:"100%"},name:"type",size:"large",value:t.type,filterOption:m.Yg,options:f,onChange:e=>P("type",e)})]})}),(0,w.jsx)(c.A,{children:(0,w.jsx)(g.A,{xs:24,sm:24,md:12,lg:12,xl:8,xxl:6,children:(0,w.jsx)(n.Ay,{className:"view",onClick:()=>R(),children:"View"})})}),(0,w.jsx)(p.A,{scroll:{y:400},bordered:!0,columns:U,loading:e.loading,dataSource:T,size:"small"}),(0,w.jsx)(y.A,{visible:v,title:"Image Preview",footer:[(0,w.jsx)(n.Ay,{onClick:()=>{D(!1)},children:"Cancel"},"back"),(0,w.jsx)(n.Ay,{type:"primary",onClick:()=>{new FormData},children:"Upload"},"submit")],onCancel:()=>{D(!1)},children:(0,w.jsx)("img",{alt:"preview",style:{width:"100%"},src:C})})]})}))}}]);
//# sourceMappingURL=84.ebb6d117.chunk.js.map