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


Current Path : /var/www/egov/build/static/js/
Upload File :
Current File : /var/www/egov/build/static/js/140.a6c9b344.chunk.js

(window.webpackJsonp=window.webpackJsonp||[]).push([[140],{1168:function(e,t,a){"use strict";a.r(t);var n=a(41),r=a.n(n),c=a(68),l=a(3),i=a(99),s=a(100),o=a(102),d=a(101),u=a(103),p=a(1),f=a.n(p),m=a(1106),h=a(337),b=a(1135),O=a(645),j=a(1098),v=a(424),E=a(104),N=a(269),g=a(266),y=a(270),w=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,s=new Array(n),u=0;u<n;u++)s[u]=arguments[u];return(a=Object(o.a)(this,(e=Object(d.a)(t)).call.apply(e,[this].concat(s)))).state={file:null,size:null,filenm:null,fileinfo:!1},a.fileInputRef=f.a.createRef(),a.handleCancel=function(){a.setState({file:null,size:null,filenm:null,fileinfo:!1}),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("xlsx"===(n=n.toLowerCase()))if(t>=2e6){a.props.showError({header:"Error",content:"Upload files with size less then 2MB!"})}else a.props.uploadMcdetFile(e.target.files[0]),a.setState({file:e.target.files[0],size:Object(y.a)(e.target.files[0].size),filenm:e.target.files[0].name});else{a.props.showError({header:"Error",content:"XLSX files are allowed!"})}}},a.handleChange=function(e,t){a.setState(Object(l.a)({},t.name,t.value))},a.upload=Object(c.a)(r.a.mark(function e(){var t;return r.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.uploadMcdetData();case 6:a.handleCancel();case 7:case"end":return e.stop()}},e)})),a}return Object(u.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this,t=Object(y.i)();return f.a.createElement("div",null,f.a.createElement("div",{className:"row",style:{flexDirection:"column",alignContent:"flex-end",margin:"0.5em",marginRight:"0em"}},f.a.createElement("div",{className:"pull-right"},null!=this.state.file?f.a.createElement(m.a,{primary:!0,onClick:this.upload},"Upload"):null)),f.a.createElement("div",{className:"row"},f.a.createElement("div",{className:"col-md-12"},f.a.createElement(h.a,{placeholder:!0,style:{height:"".concat(.8*t,"px"),overflowY:"auto"}},f.a.createElement(b.a,{icon:!0},f.a.createElement(O.a,{name:"file excel outline"}),"Upload the Excel file here.",f.a.createElement("br",null),"Note: File should be in xlsx format and less than 2 MB"),f.a.createElement(j.a,{onSubmit:this.onFormSubmit},f.a.createElement("input",{ref:this.fileInputRef,type:"file",hidden:!0,onChange:this.fileChange}),null==this.state.file?f.a.createElement(m.a,{primary:!0,onClick:function(){return e.fileInputRef.current.click()}},"Add Document"):null),f.a.createElement(v.a,{label:this.state.filenm,value:this.state.size})))))}}]),t}(p.Component);t.default=Object(E.b)(function(e){return{feeheads:e.feeheads}},{showError:g.w,uploadMcdetData:function(){return function(){var e=Object(c.a)(r.a.mark(function e(t,a){var n,c,l,i,s;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=a(),t({type:"SET_LOADER"}),e.next=4,N.a.get("/app.php",{params:{a:"uploadMCdetails",gfilename:n.upload.fqpfilenm,univcode:n.univ.funivcode}});case 4:c=e.sent,t({type:"UNSET_LOADER"}),"object"!==typeof c.data?(l={header:"Error",content:"Something went wrong"},t(Object(g.w)(l))):0===c.data.error_code?(i={header:"Success",content:c.data.data.msg},t(Object(g.w)(i))):(s={header:"Error",content:c.data.data.msg},t(Object(g.w)(s)));case 7:case"end":return e.stop()}},e)}));return function(t,a){return e.apply(this,arguments)}}()},uploadMcdetFile:function(e){return function(){var t=Object(c.a)(r.a.mark(function t(a,n){var c,l;return r.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n(),a({type:"SET_LOADER"}),(c=new FormData).set("file",e,e.name),t.next=6,N.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)}}()}})(w)},337:function(e,t,a){"use strict";var n=a(268),r=a.n(n),c=(a(275),a(265)),l=a.n(c),i=a(1),s=a.n(i),o=a(333),d=a(551),u=a(549),p=a(267);function f(e){var t=e.children,a=e.className,n=e.compact,c=e.content,i=e.horizontal,m=e.piled,h=e.raised,b=e.size,O=e.stacked,j=l()("ui",b,Object(o.a)(n,"compact"),Object(o.a)(i,"horizontal"),Object(o.a)(m,"piled"),Object(o.a)(h,"raised"),Object(o.a)(O,"stacked"),"segments",a),v=Object(d.a)(f,e),E=Object(u.a)(f,e);return s.a.createElement(E,r()({},v,{className:j}),p.a.isNil(t)?c:t)}f.handledProps=["as","children","className","compact","content","horizontal","piled","raised","size","stacked"],f.propTypes={};var m=f;function h(e){var t=e.children,a=e.className,n=e.content,c=l()("inline",a),i=Object(d.a)(h,e),o=Object(u.a)(h,e);return s.a.createElement(o,r()({},i,{className:c}),p.a.isNil(t)?n:t)}h.handledProps=["as","children","className","content"],h.propTypes={};var b=h;function O(e){var t=e.attached,a=e.basic,n=e.children,c=e.circular,i=e.className,f=e.clearing,m=e.color,h=e.compact,b=e.content,j=e.disabled,v=e.floated,E=e.inverted,N=e.loading,g=e.placeholder,y=e.padded,w=e.piled,x=e.raised,z=e.secondary,k=e.size,C=e.stacked,S=e.tertiary,T=e.textAlign,A=e.vertical,R=l()("ui",m,k,Object(o.a)(a,"basic"),Object(o.a)(c,"circular"),Object(o.a)(f,"clearing"),Object(o.a)(h,"compact"),Object(o.a)(j,"disabled"),Object(o.a)(E,"inverted"),Object(o.a)(N,"loading"),Object(o.a)(g,"placeholder"),Object(o.a)(w,"piled"),Object(o.a)(x,"raised"),Object(o.a)(z,"secondary"),Object(o.a)(C,"stacked"),Object(o.a)(S,"tertiary"),Object(o.a)(A,"vertical"),Object(o.b)(t,"attached"),Object(o.b)(y,"padded"),Object(o.d)(T),Object(o.e)(v,"floated"),"segment",i),D=Object(d.a)(O,e),P=Object(u.a)(O,e);return s.a.createElement(P,r()({},D,{className:R}),p.a.isNil(n)?b:n)}O.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"],O.Group=m,O.Inline=b,O.propTypes={};t.a=O},424:function(e,t,a){"use strict";var n=a(268),r=a.n(n),c=(a(275),a(265)),l=a.n(c),i=a(1),s=a.n(i),o=a(333),d=a(551),u=a(549),p=a(267),f=a(554),m=a(283),h=a.n(m);function b(e){var t=e.children,a=e.className,n=e.color,c=e.content,i=e.horizontal,f=e.inverted,m=e.items,O=e.size,j=e.widths,v=l()("ui",n,O,Object(o.a)(i,"horizontal"),Object(o.a)(f,"inverted"),Object(o.g)(j),"statistics",a),E=Object(d.a)(b,e),N=Object(u.a)(b,e);return p.a.isNil(t)?p.a.isNil(c)?s.a.createElement(N,r()({},E,{className:v}),h()(m,function(e){return y.create(e)})):s.a.createElement(N,r()({},E,{className:v}),c):s.a.createElement(N,r()({},E,{className:v}),t)}b.handledProps=["as","children","className","color","content","horizontal","inverted","items","size","widths"],b.propTypes={};var O=b;function j(e){var t=e.children,a=e.className,n=e.content,c=l()("label",a),i=Object(d.a)(j,e),o=Object(u.a)(j,e);return s.a.createElement(o,r()({},i,{className:c}),p.a.isNil(t)?n:t)}j.handledProps=["as","children","className","content"],j.propTypes={},j.create=Object(f.e)(j,function(e){return{content:e}});var v=j;function E(e){var t=e.children,a=e.className,n=e.content,c=e.text,i=l()(Object(o.a)(c,"text"),"value",a),f=Object(d.a)(E,e),m=Object(u.a)(E,e);return s.a.createElement(m,r()({},f,{className:i}),p.a.isNil(t)?n:t)}E.handledProps=["as","children","className","content","text"],E.propTypes={},E.create=Object(f.e)(E,function(e){return{content:e}});var N=E;function g(e){var t=e.children,a=e.className,n=e.color,c=e.content,i=e.floated,f=e.horizontal,m=e.inverted,h=e.label,b=e.size,O=e.text,j=e.value,E=l()("ui",n,b,Object(o.e)(i,"floated"),Object(o.a)(f,"horizontal"),Object(o.a)(m,"inverted"),"statistic",a),y=Object(d.a)(g,e),w=Object(u.a)(g,e);return p.a.isNil(t)?p.a.isNil(c)?s.a.createElement(w,r()({},y,{className:E}),N.create(j,{defaultProps:{text:O},autoGenerateKey:!1}),v.create(h,{autoGenerateKey:!1})):s.a.createElement(w,r()({},y,{className:E}),c):s.a.createElement(w,r()({},y,{className:E}),t)}g.handledProps=["as","children","className","color","content","floated","horizontal","inverted","label","size","text","value"],g.propTypes={},g.Group=O,g.Label=v,g.Value=N,g.create=Object(f.e)(g,function(e){return{content:e}});var y=t.a=g}}]);
//# sourceMappingURL=140.a6c9b344.chunk.js.map