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.139.235.100
(window.webpackJsonp=window.webpackJsonp||[]).push([[46],{1089:function(e,t,a){"use strict";a.r(t);var r=a(41),n=a.n(r),c=a(68),o=a(99),l=a(100),i=a(102),s=a(101),u=a(103),p=a(1),d=a.n(p),f=a(1139),m=a(1106),h=a(272),E=a(1098),y=a(1100),v=a(1002),b=a(1101),w=a(858),g=a(104),O=a(266),C=a(493),j=a(270),k=(a(377),function(e){function t(){var e,a;Object(o.a)(this,t);for(var r=arguments.length,l=new Array(r),u=0;u<r;u++)l[u]=arguments[u];return(a=Object(i.a)(this,(e=Object(s.a)(t)).call.apply(e,[this].concat(l)))).state={type:"",remarks:"",submit:!1,file:null,size:null,filenm:null,fileinfo:!1},a.fileInputRef=d.a.createRef(),a.handleChangeType=function(e,t){a.setState({type:t.value})},a.handleChangeRemarks=function(e,t){a.setState({remarks:t.value})},a.corrFileChange=function(e){if(void 0!==e.target.files[0]){e.target.files[0].size;var t=e.target.files[0].name.split(".").pop();if("pdf"==(t=t.toLowerCase())||"jpeg"==t||"jpg"==t)a.props.uploadCorr(e.target.files[0]),a.setState({file:e.target.files[0],size:Object(j.a)(e.target.files[0].size),filenm:e.target.files[0].name});else{a.props.showError({header:"Error",content:"pdf ,jpeg and jpg files are allowed!"})}}},a.handleSubmitDoc=Object(c.a)(n.a.mark(function e(){var t,r;return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(""!==a.state.type){e.next=4;break}return t={header:"Error",content:"Select Type"},a.props.showError(t),e.abrupt("return");case 4:if(""!==a.state.remarks){e.next=8;break}return r={header:"Error",content:"Enter Remarks"},a.props.showError(r),e.abrupt("return");case 8:return e.next=10,a.props.saveuplcorrdoc(a.state);case 10:case"end":return e.stop()}},e)})),a.handleDocUpload=Object(c.a)(n.a.mark(function e(){var t;return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null!==a.state.file){e.next=4;break}return t={header:"Error",content:"Add File to upload"},a.props.showError(t),e.abrupt("return");case 4:return e.next=6,a.props.uploadDocData(a.state);case 6:case"end":return e.stop()}},e)})),a}return Object(u.a)(t,e),Object(l.a)(t,[{key:"render",value:function(){var e=this,t=this.state,a=t.type,r=t.remarks;return d.a.createElement(d.a.Fragment,null,d.a.createElement(f.a,{fluid:!0},d.a.createElement(f.a.Content,null,d.a.createElement(f.a.Header,{style:{display:"flex"}},d.a.createElement("h3",null,"Upload Correction Document"),d.a.createElement("div",{className:"ml-auto"},d.a.createElement(w.a,{to:"/viewcorrectondoc"},d.a.createElement(m.a,{basic:!0,color:"blue",content:"View",icon:"eye"})),d.a.createElement(w.a,{to:"/dashboard"},d.a.createElement(m.a,{basic:!0,color:"red",content:"Exit",icon:"home"})))),d.a.createElement(h.a,null),d.a.createElement(f.a.Description,{style:{overflowY:"auto"}},d.a.createElement(E.a,null,d.a.createElement(E.a.Field,{width:8},d.a.createElement("label",null,"Type"),d.a.createElement(y.a,{search:!0,selection:!0,id:"ftype",name:"ftype",options:[{key:1,value:"MM",text:"Marks Modification"},{key:2,value:"Withheld Result",text:"Withheld Result"},{key:3,value:"Other",text:"Other"}],onChange:this.handleChangeType,value:a,placeholder:"Type"})),d.a.createElement(E.a.Field,{width:8},d.a.createElement("label",null,"Remarks"),d.a.createElement(v.a,{name:"remarks",onChange:this.handleChangeRemarks,value:r})),d.a.createElement(E.a.Field,null,d.a.createElement(m.a,{content:"Get No.",color:"blue",onClick:this.handleSubmitDoc}))),Object.keys(this.props.uploaddoccorr).length>0?d.a.createElement(b.a,{celled:!0,padded:!0},d.a.createElement(b.a.Header,null,d.a.createElement(b.a.Row,null,d.a.createElement(b.a.HeaderCell,{singleLine:!0,style:{textAlign:"center"}},"ID"),d.a.createElement(b.a.HeaderCell,{style:{textAlign:"center"}},"Type"),d.a.createElement(b.a.HeaderCell,{style:{textAlign:"center"}},"Remarks"),d.a.createElement(b.a.HeaderCell,{style:{textAlign:"center"}},"File Upload"),d.a.createElement(b.a.HeaderCell,{style:{width:"0px",textAlign:"center"}},"Action"))),d.a.createElement(b.a.Body,null,d.a.createElement(b.a.Row,null,d.a.createElement(b.a.Cell,{style:{textAlign:"center"}},this.props.uploaddoccorr.fid),d.a.createElement(b.a.Cell,{singleLine:!0},this.props.uploaddoccorr.ftype),d.a.createElement(b.a.Cell,null,this.props.uploaddoccorr.fremarks),d.a.createElement(b.a.Cell,null,d.a.createElement("input",{ref:this.fileInputRef,type:"file",hidden:!0,onChange:this.corrFileChange}),d.a.createElement(m.a,{primary:!0,onClick:function(){return e.fileInputRef.current.click()}},"Select Document")),d.a.createElement(b.a.Cell,null,d.a.createElement(m.a,{primary:!0,onClick:this.handleDocUpload},"Upload"))))):null))))}}]),t}(p.Component));t.default=Object(g.b)(function(e){return{uploaddoccorr:e.uploaddoccorr}},{showError:O.w,saveuplcorrdoc:C.a,uploadCorr:C.b,uploadDocData:C.c})(k)},272:function(e,t,a){"use strict";var r=a(268),n=a.n(r),c=a(265),o=a.n(c),l=a(1),i=a.n(l),s=a(333),u=a(551),p=a(549),d=a(267);function f(e){var t=e.children,a=e.className,r=e.clearing,c=e.content,l=e.fitted,m=e.hidden,h=e.horizontal,E=e.inverted,y=e.section,v=e.vertical,b=o()("ui",Object(s.a)(r,"clearing"),Object(s.a)(l,"fitted"),Object(s.a)(m,"hidden"),Object(s.a)(h,"horizontal"),Object(s.a)(E,"inverted"),Object(s.a)(y,"section"),Object(s.a)(v,"vertical"),"divider",a),w=Object(u.a)(f,e),g=Object(p.a)(f,e);return i.a.createElement(g,n()({},w,{className:b}),d.a.isNil(t)?c:t)}f.handledProps=["as","children","className","clearing","content","fitted","hidden","horizontal","inverted","section","vertical"],f.propTypes={},t.a=f},377:function(e,t,a){},493:function(e,t,a){"use strict";a.d(t,"a",function(){return i}),a.d(t,"b",function(){return s}),a.d(t,"c",function(){return u}),a.d(t,"d",function(){return p});var r=a(41),n=a.n(r),c=a(68),o=a(269),l=a(266),i=function(e){return function(){var t=Object(c.a)(n.a.mark(function t(a,r){var c,i,s,u;return n.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return c=r(),a({type:"SET_LOADER"}),a({type:"DELETE_QPSTATS"}),a({type:"CLEAR_TEACHER_ID"}),t.next=6,o.a.get("/app.php",{params:{a:"saveuplcorrdoc",type:e.type,univcode:c.user.fcuruniv,remarks:e.remarks}});case 6:i=t.sent,a({type:"UNSET_LOADER"}),"object"!==typeof i.data?(s={header:"Error",content:"Something went wrong"},a(Object(l.w)(s))):-1===i.data.error_code?(u={header:"Error",content:i.data.data.msg},a(Object(l.w)(u))):a({type:"UPLOAD_CORR_DOC",payload:i.data});case 9:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()},s=function(e){return function(){var t=Object(c.a)(n.a.mark(function t(a,r){var c,l;return n.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r(),a({type:"SET_LOADER"}),(c=new FormData).set("file",e,e.name),t.next=6,o.a.post("upload_file.php",c,{headers:{"Content-type":"multipart/form-data"}});case 6:l=t.sent,a({type:"UNSET_LOADER"}),a({type:"SET_QPNAME",payload:l.data});case 9:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()},u=function(e){return function(){var t=Object(c.a)(n.a.mark(function t(a,r){var c,i,s,u,p;return n.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return c=r(),a({type:"SET_LOADER"}),t.next=4,o.a.get("/app.php",{params:{a:"uploadcorrdoc",gfilename:c.upload.fqpfilenm,univcode:c.univ.funivcode,remarks:e.remarks,type:e.type,fid:c.uploaddoccorr.fid}});case 4:i=t.sent,a({type:"UNSET_LOADER"}),"object"!==typeof i.data?(s={header:"Error",content:"Something went wrong"},a(Object(l.w)(s))):0===i.data.error_code?(console.log(i),u={header:"Success",content:i.data.data.msg},a(Object(l.w)(u))):(p={header:"Error",content:i.data.data.msg},a(Object(l.w)(p)));case 7:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()},p=function(e){return function(){var t=Object(c.a)(n.a.mark(function t(a,r){var c,i,s,u;return n.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return c=r(),a({type:"SET_LOADER"}),a({type:"DELETE_QPSTATS"}),a({type:"CLEAR_TEACHER_ID"}),t.next=6,o.a.get("/app.php",{params:{a:"viewuplcorrdoc",type:e.viewType,univcode:c.user.fcuruniv}});case 6:i=t.sent,a({type:"UNSET_LOADER"}),"object"!==typeof i.data?(s={header:"Error",content:"Something went wrong"},a(Object(l.w)(s))):-1===i.data.error_code?(u={header:"Error",content:i.data.data.msg},a(Object(l.w)(u))):a({type:"VIEW_CORRECTION_DOC",payload:i.data});case 9:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()}}}]);
//# sourceMappingURL=46.9e0b34aa.chunk.js.map
|