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.138.143.69


Current Path : /var/www/egov/build/static/js/
Upload File :
Current File : /var/www/egov/build/static/js/18.b426fe25.chunk.js

(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{1020:function(e,t,a){"use strict";a.r(t);var n=a(41),r=a.n(n),c=a(68),l=a(99),o=a(100),s=a(102),i=a(101),u=a(103),d=a(1),p=a.n(d),m=a(858),f=a(1139),h=a(1106),b=a(272),g=a(1098),v=a(1100),E=a(337),j=a(1135),y=a(645),O=a(424),w=a(104),x=a(266),N=a(466),C=a(271),S=a(270),z=a(371),k=function(e){function t(){var e,a;Object(l.a)(this,t);for(var n=arguments.length,o=new Array(n),u=0;u<n;u++)o[u]=arguments[u];return(a=Object(s.a)(this,(e=Object(i.a)(t)).call.apply(e,[this].concat(o)))).state={fstudydeg:"",displayTbl:!1,studyExamno:"",studySubject:"",file:null,size:null,filenm:null,fileinfo:!1},a.fileInputRef=p.a.createRef(),a.getDegrees=function(e,t){a.setState({frmDeggrp:t.value})},a.handleChangedeg=function(){var e=Object(c.a)(r.a.mark(function e(t,n){return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(a.props),e.next=3,a.props.fetchexamno(n.value);case 3:a.setState({fstudydeg:n.value,studyExamno:"",studySubject:""}),console.log(a.props),console.log(a.state);case 6:case"end":return e.stop()}},e)}));return function(t,a){return e.apply(this,arguments)}}(),a.handleChangeexm=function(){var e=Object(c.a)(r.a.mark(function e(t,n){return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(a.state),e.next=3,a.props.fetchsub(n.value,a.state.fstudydeg);case 3:a.setState({studyExamno:n.value,studySubject:""});case 4:case"end":return e.stop()}},e)}));return function(t,a){return e.apply(this,arguments)}}(),a.handleChangesub=function(){var e=Object(c.a)(r.a.mark(function e(t,n){return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:console.log(a.state),a.setState({studySubject:n.value});case 2:case"end":return e.stop()}},e)}));return function(t,a){return e.apply(this,arguments)}}(),a.handleSubmit=function(){var e=a.props.user.fdeggrp,t=a.state,n=t.reportType,r=t.fdeggrpfrm,c=t.fdeggrpto,l=t.fcollfrm,o=t.fcollto;if(""!==e)a.props.getReport(n,"tables",e,r,c,l,o),a.setState({displayTbl:!0});else{a.props.showError({header:"Error",content:"Select Degree Group"})}},a.handleReport=function(){var e=a.props.user.fdeggrp,t=a.state,n=t.reportType,r=t.fdeggrpfrm,c=t.fdeggrpto,l=t.fcollfrm,o=t.fcollto;if(console.log(a.state),""!==e)window.open(C.c+n+"&univcode="+a.props.univcode+"&deggrp="+e+"&deggrpfrm="+r+"&deggrpto="+c+"&collfrm="+l+"&collto="+o+"&val="+n+"&format=PDF","_blank");else{a.props.showError({header:"Error",content:"Select Degree Group"})}},a.handleCancel=function(){a.setState({reportType:"",fdeggrpfrm:"0",fdeggrpto:"zzzzz",fcollfrm:"0",fcollto:"zzzzz",reportFormat:"",frmDeggrp:""}),a.fileInputRef.current.value=""},a.fileChange=function(e){if(void 0!==e.target.files[0]){var t=e.target.files[0].size,n=e.target.files[0].name.split(".").pop();if("pdf"===(n=n.toLowerCase()))if(t>=3e7){a.props.showError({header:"Error",content:"Upload files with size less then 30MB!"})}else a.props.qpFileUpload(e.target.files[0]),a.setState({file:e.target.files[0],size:Object(S.a)(e.target.files[0].size),filenm:e.target.files[0].name});else{a.props.showError({header:"Error",content:"PDF files are allowed!"})}}},a.renderHeader=function(){return p.a.createElement(f.a.Header,{style:{display:"flex"}},p.a.createElement("h3",null,"Upload Study Material"),p.a.createElement("div",{className:"ml-auto"},p.a.createElement(m.a,{to:"/studymaterial"},p.a.createElement(h.a,{basic:!0,color:"black",icon:"angle double left",content:"Back"})),p.a.createElement(h.a,{basic:!0,color:"black",icon:"ban",onClick:a.handleCancel,content:"Cancel"}),p.a.createElement(m.a,{to:"/dashboard"},p.a.createElement(h.a,{basic:!0,color:"red",content:"Exit",icon:"home"}))))},a.renderForm=function(){var e=a.state,t=e.displayTbl,n=e.studyExamno,r=e.fstudydeg,c=e.studySubject,l=e.uploadchapter,o=e.uploadteacher;console.log(a.state);var s=a.props.degreeList.map(function(e){return{value:e.fdegree,text:"".concat(e.fdegree," ").concat(e.fdescpn)}}),i=a.props.examno.map(function(e){return{value:e.fexamno,text:" ".concat(e.fexamname)}}),u=a.props.Subject.map(function(e){return{value:e.fsubcode,text:" ".concat(e.fsubname)}}),d=Object(S.i)();return p.a.createElement("div",{className:"animated fadeIn"},p.a.createElement(f.a,{fluid:!0},p.a.createElement(f.a.Content,null,a.renderHeader(),p.a.createElement(b.a,null),p.a.createElement(f.a.Description,{style:{overflowY:"auto",height:"".concat(d,"px")}},p.a.createElement("div",{className:"col-md-6"},p.a.createElement(g.a,null,p.a.createElement("div",null,p.a.createElement(g.a.Group,null,p.a.createElement(g.a.Field,{width:16},p.a.createElement("label",null,"Degree"),p.a.createElement(v.a,{placeholder:"Select Degree",name:"deg",value:r,selection:!0,search:!0,options:s,onChange:a.handleChangedeg})))),p.a.createElement(g.a.Group,null,p.a.createElement(g.a.Field,{width:16},p.a.createElement("label",null,"Exam No."),p.a.createElement(v.a,{placeholder:"Select Exam No.",name:"exmno",value:n,selection:!0,search:!0,options:i,onChange:a.handleChangeexm}))),p.a.createElement(g.a.Group,null,p.a.createElement(g.a.Field,{width:16},p.a.createElement("label",null,"Subject"),p.a.createElement(v.a,{placeholder:"Select Subject",name:"sub",value:c,selection:!0,search:!0,options:u,onChange:a.handleChangesub}))),p.a.createElement(g.a.Group,null,p.a.createElement(g.a.Field,{width:16},p.a.createElement(g.a.Input,{placeholder:"Chapter / Lesson",value:l,label:"Chapter / Lesson",name:"fcombdesc",onChange:a.handleChange}))),p.a.createElement(g.a.Group,null,p.a.createElement(g.a.Field,{width:16},p.a.createElement(g.a.Input,{placeholder:"Teacher Name",value:o,label:"Teacher Name",name:"fcombdesc",onChange:a.handleChange}))),p.a.createElement(E.a,{placeholder:!0,style:{height:"".concat(.4*d,"px"),overflowY:"auto"}},p.a.createElement(j.a,{icon:!0},p.a.createElement(y.a,{name:"file pdf outline"}),"Upload the PDF file here.",p.a.createElement("br",null),"Note: File should be in PDF format and Max. size is 30MB"),p.a.createElement(g.a,{onSubmit:a.onFormSubmit},p.a.createElement("input",{ref:a.fileInputRef,type:"file",hidden:!0,onChange:a.fileChange}),p.a.createElement(h.a,{primary:!0,onClick:function(){return a.fileInputRef.current.click()}},"Add Document")),p.a.createElement(O.a,{label:a.state.filenm,value:a.state.size})),p.a.createElement("br",null))),t?p.a.createElement(N.a,{reportdet:a.props.collegeReport}):null))))},a}return Object(u.a)(t,e),Object(o.a)(t,[{key:"componentDidMount",value:function(){this.props.getDegreeList()}},{key:"render",value:function(){return this.renderForm()}}]),t}(d.Component);t.default=Object(w.b)(function(e){return console.log(e),{deggrp:e.deggrp,collegeReport:e.collegeReport,univcode:e.univ.funivcode,user:e.user,degreeList:e.studyDegree,examno:e.studyExamno,Subject:e.studySubject}},{getDegreeList:z.c,fetchexamno:z.a,fetchsub:z.b,qpFileUpload:z.e,fetchDegGrp:x.j,getReport:x.r,showError:x.w})(k)},272:function(e,t,a){"use strict";var n=a(268),r=a.n(n),c=a(265),l=a.n(c),o=a(1),s=a.n(o),i=a(333),u=a(551),d=a(549),p=a(267);function m(e){var t=e.children,a=e.className,n=e.clearing,c=e.content,o=e.fitted,f=e.hidden,h=e.horizontal,b=e.inverted,g=e.section,v=e.vertical,E=l()("ui",Object(i.a)(n,"clearing"),Object(i.a)(o,"fitted"),Object(i.a)(f,"hidden"),Object(i.a)(h,"horizontal"),Object(i.a)(b,"inverted"),Object(i.a)(g,"section"),Object(i.a)(v,"vertical"),"divider",a),j=Object(u.a)(m,e),y=Object(d.a)(m,e);return s.a.createElement(y,r()({},j,{className:E}),p.a.isNil(t)?c:t)}m.handledProps=["as","children","className","clearing","content","fitted","hidden","horizontal","inverted","section","vertical"],m.propTypes={},t.a=m},294:function(e,t,a){},337:function(e,t,a){"use strict";var n=a(268),r=a.n(n),c=(a(275),a(265)),l=a.n(c),o=a(1),s=a.n(o),i=a(333),u=a(551),d=a(549),p=a(267);function m(e){var t=e.children,a=e.className,n=e.compact,c=e.content,o=e.horizontal,f=e.piled,h=e.raised,b=e.size,g=e.stacked,v=l()("ui",b,Object(i.a)(n,"compact"),Object(i.a)(o,"horizontal"),Object(i.a)(f,"piled"),Object(i.a)(h,"raised"),Object(i.a)(g,"stacked"),"segments",a),E=Object(u.a)(m,e),j=Object(d.a)(m,e);return s.a.createElement(j,r()({},E,{className:v}),p.a.isNil(t)?c:t)}m.handledProps=["as","children","className","compact","content","horizontal","piled","raised","size","stacked"],m.propTypes={};var f=m;function h(e){var t=e.children,a=e.className,n=e.content,c=l()("inline",a),o=Object(u.a)(h,e),i=Object(d.a)(h,e);return s.a.createElement(i,r()({},o,{className:c}),p.a.isNil(t)?n:t)}h.handledProps=["as","children","className","content"],h.propTypes={};var b=h;function g(e){var t=e.attached,a=e.basic,n=e.children,c=e.circular,o=e.className,m=e.clearing,f=e.color,h=e.compact,b=e.content,v=e.disabled,E=e.floated,j=e.inverted,y=e.loading,O=e.placeholder,w=e.padded,x=e.piled,N=e.raised,C=e.secondary,S=e.size,z=e.stacked,k=e.tertiary,D=e.textAlign,T=e.vertical,L=l()("ui",f,S,Object(i.a)(a,"basic"),Object(i.a)(c,"circular"),Object(i.a)(m,"clearing"),Object(i.a)(h,"compact"),Object(i.a)(v,"disabled"),Object(i.a)(j,"inverted"),Object(i.a)(y,"loading"),Object(i.a)(O,"placeholder"),Object(i.a)(x,"piled"),Object(i.a)(N,"raised"),Object(i.a)(C,"secondary"),Object(i.a)(z,"stacked"),Object(i.a)(k,"tertiary"),Object(i.a)(T,"vertical"),Object(i.b)(t,"attached"),Object(i.b)(w,"padded"),Object(i.d)(D),Object(i.e)(E,"floated"),"segment",o),A=Object(u.a)(g,e),F=Object(d.a)(g,e);return s.a.createElement(F,r()({},A,{className:L}),p.a.isNil(n)?b:n)}g.handledProps=["as","attached","basic","children","circular","className","clearing","color","compact","content","disabled","floated","inverted","loading","padded","piled","placeholder","raised","secondary","size","stacked","tertiary","textAlign","vertical"],g.Group=f,g.Inline=b,g.propTypes={};t.a=g},371:function(e,t,a){"use strict";a.d(t,"c",function(){return s}),a.d(t,"a",function(){return i}),a.d(t,"b",function(){return u}),a.d(t,"e",function(){return d}),a.d(t,"d",function(){return p});var n=a(41),r=a.n(n),c=a(68),l=a(269),o=a(266),s=function(){return function(){var e=Object(c.a)(r.a.mark(function e(t,a){var n,c,s,i;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=a(),console.log(n),e.next=4,l.a.get("app.php?a=StudyDegreeList&univcode="+n.univ.funivcode+"&fcollcode="+n.user.fcollcode);case 4:"object"!==typeof(c=e.sent).data?(s={header:"Error",content:"Something went wrong"},t(Object(o.w)(s))):-1===c.data.error_code?(i={header:"Error",content:c.data.data.msg},t(Object(o.w)(i))):(console.log(c.data),t({type:"ALL_DEGREE_LIST",payload:c.data}));case 6:case"end":return e.stop()}},e)}));return function(t,a){return e.apply(this,arguments)}}()},i=function(e){return function(){var t=Object(c.a)(r.a.mark(function t(a,n){var c,s,i,u;return r.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return c=n(),console.log(c),console.log(c),t.next=5,l.a.get("app.php?a=getexamno&univcode="+c.univ.funivcode+"&deg="+e);case 5:"object"!==typeof(s=t.sent).data?(i={header:"Error",content:"Something went wrong"},a(Object(o.w)(i))):-1===s.data.error_code?(u={header:"Error",content:s.data.data.msg},a(Object(o.w)(u))):(console.log(s.data),a({type:"STUDY_EXAMNO",payload:s.data}));case 7:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()},u=function(e,t){return function(){var a=Object(c.a)(r.a.mark(function a(n,c){var s,i,u,d;return r.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return s=c(),console.log(s),a.next=4,l.a.get("app.php?a=getstudysub&univcode="+s.univ.funivcode+"&deg="+t+"&exmno="+e);case 4:"object"!==typeof(i=a.sent).data?(u={header:"Error",content:"Something went wrong"},n(Object(o.w)(u))):-1===i.data.error_code?(d={header:"Error",content:i.data.data.msg},n(Object(o.w)(d))):(console.log(i.data),n({type:"STUDY_SUBJECT",payload:i.data}));case 6:case"end":return a.stop()}},a)}));return function(e,t){return a.apply(this,arguments)}}()},d=function(e){return function(){var t=Object(c.a)(r.a.mark(function t(a,n){var c,o,s;return r.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return c=n(),a({type:"SET_LOADER"}),(o=new FormData).set("filefield",e,e.name),o.set("body",JSON.stringify(c.user)),t.next=7,l.a.post("upload_study_material.php",o,{headers:{"Content-type":"multipart/form-data"}});case 7:s=t.sent,a({type:"UNSET_LOADER"}),a({type:"SET_UPLOAD_DOC",payload:s.data});case 10:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()},p=function(e,t,a,n){return function(){var e=Object(c.a)(r.a.mark(function e(c,s){var i,u,d,p;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return i=s(),console.log(i),console.log(t,a,n),e.next=5,l.a.get("app.php?a=getstudymat&univcode="+i.univ.funivcode+"&fstudydeg="+a+"&studyExamno="+t+"&studySubject="+n+"&fcollcode="+i.user.fcollcode);case 5:"object"!==typeof(u=e.sent).data?(d={header:"Error",content:"Something went wrong"},c(Object(o.w)(d))):-1===u.data.error_code?(p={header:"Error",content:u.data.data.msg},c(Object(o.w)(p))):(console.log(u.data),c({type:"GET_STUDY_MATERIAL",payload:u.data}));case 7:case"end":return e.stop()}},e)}));return function(t,a){return e.apply(this,arguments)}}()}},424:function(e,t,a){"use strict";var n=a(268),r=a.n(n),c=(a(275),a(265)),l=a.n(c),o=a(1),s=a.n(o),i=a(333),u=a(551),d=a(549),p=a(267),m=a(554),f=a(283),h=a.n(f);function b(e){var t=e.children,a=e.className,n=e.color,c=e.content,o=e.horizontal,m=e.inverted,f=e.items,g=e.size,v=e.widths,E=l()("ui",n,g,Object(i.a)(o,"horizontal"),Object(i.a)(m,"inverted"),Object(i.g)(v),"statistics",a),j=Object(u.a)(b,e),y=Object(d.a)(b,e);return p.a.isNil(t)?p.a.isNil(c)?s.a.createElement(y,r()({},j,{className:E}),h()(f,function(e){return w.create(e)})):s.a.createElement(y,r()({},j,{className:E}),c):s.a.createElement(y,r()({},j,{className:E}),t)}b.handledProps=["as","children","className","color","content","horizontal","inverted","items","size","widths"],b.propTypes={};var g=b;function v(e){var t=e.children,a=e.className,n=e.content,c=l()("label",a),o=Object(u.a)(v,e),i=Object(d.a)(v,e);return s.a.createElement(i,r()({},o,{className:c}),p.a.isNil(t)?n:t)}v.handledProps=["as","children","className","content"],v.propTypes={},v.create=Object(m.e)(v,function(e){return{content:e}});var E=v;function j(e){var t=e.children,a=e.className,n=e.content,c=e.text,o=l()(Object(i.a)(c,"text"),"value",a),m=Object(u.a)(j,e),f=Object(d.a)(j,e);return s.a.createElement(f,r()({},m,{className:o}),p.a.isNil(t)?n:t)}j.handledProps=["as","children","className","content","text"],j.propTypes={},j.create=Object(m.e)(j,function(e){return{content:e}});var y=j;function O(e){var t=e.children,a=e.className,n=e.color,c=e.content,o=e.floated,m=e.horizontal,f=e.inverted,h=e.label,b=e.size,g=e.text,v=e.value,j=l()("ui",n,b,Object(i.e)(o,"floated"),Object(i.a)(m,"horizontal"),Object(i.a)(f,"inverted"),"statistic",a),w=Object(u.a)(O,e),x=Object(d.a)(O,e);return p.a.isNil(t)?p.a.isNil(c)?s.a.createElement(x,r()({},w,{className:j}),y.create(v,{defaultProps:{text:g},autoGenerateKey:!1}),E.create(h,{autoGenerateKey:!1})):s.a.createElement(x,r()({},w,{className:j}),c):s.a.createElement(x,r()({},w,{className:j}),t)}O.handledProps=["as","children","className","color","content","floated","horizontal","inverted","label","size","text","value"],O.propTypes={},O.Group=g,O.Label=E,O.Value=y,O.create=Object(m.e)(O,function(e){return{content:e}});var w=t.a=O},466:function(e,t,a){"use strict";var n=a(99),r=a(100),c=a(102),l=a(101),o=a(103),s=a(1),i=a.n(s),u=a(1e3),d=a(1101),p=a(104),m=a(266),f=(a(294),a(167),function(e){function t(){var e,a;Object(n.a)(this,t);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return(a=Object(c.a)(this,(e=Object(l.a)(t)).call.apply(e,[this].concat(o)))).state={studyMaterialList:[],searchVal:""},a.searchTable=function(e,t){var n=t.value,r=a.props.reportdet.filter(function(e){return Object.keys(e).some(function(t){return e[t].toLowerCase().includes(n.toLowerCase())})});a.setState({colgdet:r,searchVal:t.value})},a.renderTable=function(){var e=a.props.studyMaterialList;return console.log(e),i.a.createElement("div",{className:"mt-3"},i.a.createElement("hr",null),i.a.createElement("div",{style:{marginBottom:"1em",backgroundColor:"white"},className:"stick"},i.a.createElement(u.a,{icon:"search",fluid:!0,placeholder:"Search...",onChange:a.searchTable,value:a.state.searchVal,style:{fontSize:"1.1em"}})),i.a.createElement("div",null,i.a.createElement(d.a,{celled:!0,padded:!0,selectable:!0,size:"medium",color:"olive",className:"tbl sticky"},i.a.createElement(d.a.Header,null,i.a.createElement(d.a.Row,{textAlign:"center"},i.a.createElement(d.a.HeaderCell,null,"Sl.No."),i.a.createElement(d.a.HeaderCell,null,"Uploded Date"),i.a.createElement(d.a.HeaderCell,null,"Teacher Name"),i.a.createElement(d.a.HeaderCell,null,"Semester"),i.a.createElement(d.a.HeaderCell,null,"Subject Name"),i.a.createElement(d.a.HeaderCell,null,"Chapter/Unit"),i.a.createElement(d.a.HeaderCell,null,"Students Viewed"),i.a.createElement(d.a.HeaderCell,null,"View"),i.a.createElement(d.a.HeaderCell,null,"Delete"))),i.a.createElement(d.a.Body,null,e.map(function(e,t){return i.a.createElement(d.a.Row,{key:t,style:{overflow:"hidden"}},i.a.createElement(d.a.Cell,{textAlign:"center"},t+1),i.a.createElement(d.a.Cell,null,e.upddate),i.a.createElement(d.a.Cell,null,e.FUPDTEACH),i.a.createElement(d.a.Cell,{textAlign:"center"},e.fexamname),i.a.createElement(d.a.Cell,{textAlign:"center"},e.fsubname),i.a.createElement(d.a.Cell,null,e.fchapter),i.a.createElement(d.a.Cell,{textAlign:"center"},e.viewed),i.a.createElement(d.a.Cell,{textAlign:"center"},i.a.createElement("a",{href:"https://online-univ-study-material.s3.ap-south-1.amazonaws.com/"+a.props.user.fcuruniv+"/"+e.fpath,target:"_blank"},"View")),i.a.createElement(d.a.Cell,{textAlign:"center"},i.a.createElement("a",null,"Delete")))})))))},a}return Object(o.a)(t,e),Object(r.a)(t,[{key:"componentDidMount",value:function(){}},{key:"componentDidUpdate",value:function(e){}},{key:"render",value:function(){return console.log(this.props.reportdet,this.props.reportdet,this.props.rtype),null==this.props.reportdet?null:this.renderTable()}}]),t}(s.Component));t.a=Object(p.b)(function(e){return console.log(e),{studyMaterialList:e.getstudyMaterial,user:e.user}},{showError:m.w})(f)}}]);
//# sourceMappingURL=18.b426fe25.chunk.js.map