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.220.226.147
(window.webpackJsonp=window.webpackJsonp||[]).push([[29],{1019:function(e,t,a){"use strict";a.r(t);var n=a(41),r=a.n(n),o=a(68),c=a(99),l=a(100),u=a(102),s=a(101),d=a(103),i=a(1),p=a.n(i),m=a(858),f=a(1139),g=a(1106),h=a(272),b=a(1098),E=a(1100),v=a(104),y=a(266),w=a(466),j=a(271),x=a(270),S=a(371),O=function(e){function t(){var e,a;Object(c.a)(this,t);for(var n=arguments.length,l=new Array(n),d=0;d<n;d++)l[d]=arguments[d];return(a=Object(u.a)(this,(e=Object(s.a)(t)).call.apply(e,[this].concat(l)))).state={fstudydeg:"",displayTbl:!1,studyExamno:"",studySubject:""},a.getDegrees=function(e,t){a.setState({frmDeggrp:t.value})},a.handleChangedeg=function(){var e=Object(o.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(o.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(o.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.displayTbl,r=t.studyExamno,o=t.fstudydeg,c=t.studySubject;if(""!==e)a.props.getstudymat(n,r,o,c),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,o=t.fdeggrpto,c=t.fcollfrm,l=t.fcollto;if(console.log(a.state),""!==e)window.open(j.c+n+"&univcode="+a.props.univcode+"°grp="+e+"°grpfrm="+r+"°grpto="+o+"&collfrm="+c+"&collto="+l+"&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.renderHeader=function(){return p.a.createElement(f.a.Header,{style:{display:"flex"}},p.a.createElement("h3",null,"Study Material"),p.a.createElement("div",{className:"ml-auto"},p.a.createElement(m.a,{to:"/study/uploadstudymaterial"},p.a.createElement(g.a,{basic:!0,color:"blue",content:"Upload",icon:"upload"})),p.a.createElement(g.a,{basic:!0,color:"black",icon:"ban",onClick:a.handleCancel,content:"Cancel"}),p.a.createElement(m.a,{to:"/dashboard"},p.a.createElement(g.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,o=e.studySubject;console.log(a.state);var c=a.props.degreeList.map(function(e){return{value:e.fdegree,text:"".concat(e.fdegree," ").concat(e.fdescpn)}}),l=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)}}),s=Object(x.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(h.a,null),p.a.createElement(f.a.Description,{style:{overflowY:"auto",height:"".concat(s,"px")}},p.a.createElement("div",{className:"col-md-6"},p.a.createElement(b.a,null,p.a.createElement("div",null,p.a.createElement(b.a.Group,null,p.a.createElement(b.a.Field,{width:16},p.a.createElement("label",null,"Degree"),p.a.createElement(E.a,{placeholder:"Select Degree",name:"deg",value:r,selection:!0,search:!0,options:c,onChange:a.handleChangedeg})))),p.a.createElement(b.a.Group,null,p.a.createElement(b.a.Field,{width:16},p.a.createElement("label",null,"Exam No."),p.a.createElement(E.a,{placeholder:"Select Exam No.",name:"exmno",value:n,selection:!0,search:!0,options:l,onChange:a.handleChangeexm}))),p.a.createElement(b.a.Group,null,p.a.createElement(b.a.Field,{width:16},p.a.createElement("label",null,"Subject"),p.a.createElement(E.a,{placeholder:"Select Subject",name:"sub",value:o,selection:!0,search:!0,options:u,onChange:a.handleChangesub}))),p.a.createElement(g.a,{color:"blue",onClick:a.handleSubmit},"View"),p.a.createElement("br",null))),t?p.a.createElement(w.a,{reportdet:a.props.collegeReport}):null))))},a}return Object(d.a)(t,e),Object(l.a)(t,[{key:"componentDidMount",value:function(){this.props.getDegreeList()}},{key:"render",value:function(){return this.renderForm()}}]),t}(i.Component);t.default=Object(v.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:S.c,fetchexamno:S.a,fetchsub:S.b,getstudymat:S.d,fetchDegGrp:y.j,showError:y.w})(O)},272:function(e,t,a){"use strict";var n=a(268),r=a.n(n),o=a(265),c=a.n(o),l=a(1),u=a.n(l),s=a(333),d=a(551),i=a(549),p=a(267);function m(e){var t=e.children,a=e.className,n=e.clearing,o=e.content,l=e.fitted,f=e.hidden,g=e.horizontal,h=e.inverted,b=e.section,E=e.vertical,v=c()("ui",Object(s.a)(n,"clearing"),Object(s.a)(l,"fitted"),Object(s.a)(f,"hidden"),Object(s.a)(g,"horizontal"),Object(s.a)(h,"inverted"),Object(s.a)(b,"section"),Object(s.a)(E,"vertical"),"divider",a),y=Object(d.a)(m,e),w=Object(i.a)(m,e);return u.a.createElement(w,r()({},y,{className:v}),p.a.isNil(t)?o:t)}m.handledProps=["as","children","className","clearing","content","fitted","hidden","horizontal","inverted","section","vertical"],m.propTypes={},t.a=m},294:function(e,t,a){},371:function(e,t,a){"use strict";a.d(t,"c",function(){return u}),a.d(t,"a",function(){return s}),a.d(t,"b",function(){return d}),a.d(t,"e",function(){return i}),a.d(t,"d",function(){return p});var n=a(41),r=a.n(n),o=a(68),c=a(269),l=a(266),u=function(){return function(){var e=Object(o.a)(r.a.mark(function e(t,a){var n,o,u,s;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=a(),console.log(n),e.next=4,c.a.get("app.php?a=StudyDegreeList&univcode="+n.univ.funivcode+"&fcollcode="+n.user.fcollcode);case 4:"object"!==typeof(o=e.sent).data?(u={header:"Error",content:"Something went wrong"},t(Object(l.w)(u))):-1===o.data.error_code?(s={header:"Error",content:o.data.data.msg},t(Object(l.w)(s))):(console.log(o.data),t({type:"ALL_DEGREE_LIST",payload:o.data}));case 6:case"end":return e.stop()}},e)}));return function(t,a){return e.apply(this,arguments)}}()},s=function(e){return function(){var t=Object(o.a)(r.a.mark(function t(a,n){var o,u,s,d;return r.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o=n(),console.log(o),console.log(o),t.next=5,c.a.get("app.php?a=getexamno&univcode="+o.univ.funivcode+"°="+e);case 5:"object"!==typeof(u=t.sent).data?(s={header:"Error",content:"Something went wrong"},a(Object(l.w)(s))):-1===u.data.error_code?(d={header:"Error",content:u.data.data.msg},a(Object(l.w)(d))):(console.log(u.data),a({type:"STUDY_EXAMNO",payload:u.data}));case 7:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()},d=function(e,t){return function(){var a=Object(o.a)(r.a.mark(function a(n,o){var u,s,d,i;return r.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return u=o(),console.log(u),a.next=4,c.a.get("app.php?a=getstudysub&univcode="+u.univ.funivcode+"°="+t+"&exmno="+e);case 4:"object"!==typeof(s=a.sent).data?(d={header:"Error",content:"Something went wrong"},n(Object(l.w)(d))):-1===s.data.error_code?(i={header:"Error",content:s.data.data.msg},n(Object(l.w)(i))):(console.log(s.data),n({type:"STUDY_SUBJECT",payload:s.data}));case 6:case"end":return a.stop()}},a)}));return function(e,t){return a.apply(this,arguments)}}()},i=function(e){return function(){var t=Object(o.a)(r.a.mark(function t(a,n){var o,l,u;return r.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o=n(),a({type:"SET_LOADER"}),(l=new FormData).set("filefield",e,e.name),l.set("body",JSON.stringify(o.user)),t.next=7,c.a.post("upload_study_material.php",l,{headers:{"Content-type":"multipart/form-data"}});case 7:u=t.sent,a({type:"UNSET_LOADER"}),a({type:"SET_UPLOAD_DOC",payload:u.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(o.a)(r.a.mark(function e(o,u){var s,d,i,p;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return s=u(),console.log(s),console.log(t,a,n),e.next=5,c.a.get("app.php?a=getstudymat&univcode="+s.univ.funivcode+"&fstudydeg="+a+"&studyExamno="+t+"&studySubject="+n+"&fcollcode="+s.user.fcollcode);case 5:"object"!==typeof(d=e.sent).data?(i={header:"Error",content:"Something went wrong"},o(Object(l.w)(i))):-1===d.data.error_code?(p={header:"Error",content:d.data.data.msg},o(Object(l.w)(p))):(console.log(d.data),o({type:"GET_STUDY_MATERIAL",payload:d.data}));case 7:case"end":return e.stop()}},e)}));return function(t,a){return e.apply(this,arguments)}}()}},466:function(e,t,a){"use strict";var n=a(99),r=a(100),o=a(102),c=a(101),l=a(103),u=a(1),s=a.n(u),d=a(1e3),i=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,l=new Array(r),u=0;u<r;u++)l[u]=arguments[u];return(a=Object(o.a)(this,(e=Object(c.a)(t)).call.apply(e,[this].concat(l)))).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),s.a.createElement("div",{className:"mt-3"},s.a.createElement("hr",null),s.a.createElement("div",{style:{marginBottom:"1em",backgroundColor:"white"},className:"stick"},s.a.createElement(d.a,{icon:"search",fluid:!0,placeholder:"Search...",onChange:a.searchTable,value:a.state.searchVal,style:{fontSize:"1.1em"}})),s.a.createElement("div",null,s.a.createElement(i.a,{celled:!0,padded:!0,selectable:!0,size:"medium",color:"olive",className:"tbl sticky"},s.a.createElement(i.a.Header,null,s.a.createElement(i.a.Row,{textAlign:"center"},s.a.createElement(i.a.HeaderCell,null,"Sl.No."),s.a.createElement(i.a.HeaderCell,null,"Uploded Date"),s.a.createElement(i.a.HeaderCell,null,"Teacher Name"),s.a.createElement(i.a.HeaderCell,null,"Semester"),s.a.createElement(i.a.HeaderCell,null,"Subject Name"),s.a.createElement(i.a.HeaderCell,null,"Chapter/Unit"),s.a.createElement(i.a.HeaderCell,null,"Students Viewed"),s.a.createElement(i.a.HeaderCell,null,"View"),s.a.createElement(i.a.HeaderCell,null,"Delete"))),s.a.createElement(i.a.Body,null,e.map(function(e,t){return s.a.createElement(i.a.Row,{key:t,style:{overflow:"hidden"}},s.a.createElement(i.a.Cell,{textAlign:"center"},t+1),s.a.createElement(i.a.Cell,null,e.upddate),s.a.createElement(i.a.Cell,null,e.FUPDTEACH),s.a.createElement(i.a.Cell,{textAlign:"center"},e.fexamname),s.a.createElement(i.a.Cell,{textAlign:"center"},e.fsubname),s.a.createElement(i.a.Cell,null,e.fchapter),s.a.createElement(i.a.Cell,{textAlign:"center"},e.viewed),s.a.createElement(i.a.Cell,{textAlign:"center"},s.a.createElement("a",{href:"https://online-univ-study-material.s3.ap-south-1.amazonaws.com/"+a.props.user.fcuruniv+"/"+e.fpath,target:"_blank"},"View")),s.a.createElement(i.a.Cell,{textAlign:"center"},s.a.createElement("a",null,"Delete")))})))))},a}return Object(l.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}(u.Component));t.a=Object(p.b)(function(e){return console.log(e),{studyMaterialList:e.getstudyMaterial,user:e.user}},{showError:m.w})(f)}}]);
//# sourceMappingURL=29.01a3e61b.chunk.js.map
|