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


Current Path : /var/www/egov/build/static/js/
Upload File :
Current File : /var/www/egov/build/static/js/178.3b8231e1.chunk.js

(window.webpackJsonp=window.webpackJsonp||[]).push([[178],{1122:function(e,t,a){"use strict";a.r(t);var n=a(0),r=a(41),l=a.n(r),c=a(68),o=a(2),i=a(3),d=a(99),s=a(100),u=a(102),p=a(101),m=a(103),h=a(1),f=a.n(h),b=a(583),E=a(1106),v=a(1139),C=a(866),y=a(272),g=a(585),w=a(1098),R=a(317),B=a(296),k=a(1101),O=a(858),j=a(266),x=a(104),S=a(269),N=(a(167),a(1096)),H=a(1100),D=a(273),_=a.n(D),T=a(271),A=function(e){function t(){var e,a;Object(d.a)(this,t);for(var n=arguments.length,r=new Array(n),l=0;l<n;l++)r[l]=arguments[l];return(a=Object(u.a)(this,(e=Object(p.a)(t)).call.apply(e,[this].concat(r)))).state={fdate:"",rtype:"",frtypes:["Received Bundle Report","Not Received Bundle Report"]},a.handleDate=function(e){a.setState(Object(i.a)({},e.target.name,e.target.value))},a.handleChange=function(e,t){switch(t.type){case"text":default:return void a.setState(Object(i.a)({},t.name,t.value))}},a.generateReport=function(){var e=a.state,t=e.fdate,n=e.rtype;e.frtypes;console.log("rept",t,n,a.props.univcode),"Received Bundle Report"===n?window.open(T.c+"generateBundRecvRprt&univcode="+a.props.univcode+"&fdate="+t,"_blank"):"Not Received Bundle Report"===n&&window.open(T.c+"generateBundNotRecvRprt&univcode="+a.props.univcode+"&fdate="+t,"_blank")},a}return Object(m.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this.state,t=e.fdate,a=e.rtype,n=e.frtypes.map(function(e,t){return{key:t,value:e,text:e}});return f.a.createElement("div",null,f.a.createElement(N.a,{style:{height:"50vh"},dimmer:this.props.dim,open:this.props.open,onClose:this.props.close,closeOnDimmerClick:!1},f.a.createElement(N.a.Header,{style:{display:"flex"}},"Bundle Receive Report",f.a.createElement("div",{className:"ml-auto"},f.a.createElement(E.a,{basic:!0,color:"blue",content:"Generate",onClick:this.generateReport,icon:"file pdf outline"}),f.a.createElement(E.a,{basic:!0,color:"black",icon:"ban",onClick:this.props.close,content:"Cancel"}))),f.a.createElement(N.a.Content,{style:{height:"50vh",overflowY:"auto"}},f.a.createElement(w.a,{error:!0},f.a.createElement(w.a.Field,{width:6},f.a.createElement("label",null,"Date"),f.a.createElement(_.a,{formatChars:{n:"[0-1]",m:"[0-9]",e:"[0-3]",d:"[0-9]",z:"[1-2]",y:"[0-9]"},type:"text",value:t,mask:"ed/nm/zyyy",name:"fdate",onChange:this.handleDate})),f.a.createElement(w.a.Field,{width:6},f.a.createElement("label",null,"Report Type"),f.a.createElement(H.a,{placeholder:"Report",search:!0,selection:!0,name:"rtype",value:a,options:n,onChange:this.handleChange}))))))}}]),t}(h.Component),L=Object(x.b)(function(e){return{univcode:e.univ.funivcode}},{})(A),z=function(e){function t(){var e,a;Object(d.a)(this,t);for(var r=arguments.length,s=new Array(r),m=0;m<r;m++)s[m]=arguments[m];return(a=Object(u.a)(this,(e=Object(p.a)(t)).call.apply(e,[this].concat(s)))).state={barcode:"",detBC:[],displyBC:!1,open:!1,fdeleted:!1},a.handleChange=function(e,t){switch(t.type){case"text":default:return void a.setState(Object(i.a)({},t.name,t.value))}},a.handleClick=function(){if(a.state.barcode){var e={fcollcode:a.state.barcode.substring(0,4),fqpcode:a.state.barcode.substring(4,9),fbundno:a.state.barcode.substring(9,14),fttlscrpt:a.state.barcode.substring(14,17),fdeleted:!1},t=a.state.barcode.length-1,n=e,r=!1;if(a.state.detBC.map(function(e,a){e.fbundno===n.fbundno&&t!==a&&(r=!0)}),r){return void a.props.showError({header:"Error",content:"Duplicate entry is not allowed."})}a.setState({displyBC:!0,detBC:[].concat(Object(o.a)(a.state.detBC),[e])})}else{a.props.showError({header:"Error",content:"Barcode length should be minimum 17"})}},a.show=function(e){return function(){return a.setState({dimmer:e,open:!0})}},a.handleSubmit=Object(c.a)(l.a.mark(function e(){var t,n;return l.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a.state.detBC){e.next=4;break}return t={header:"Error",content:"Scan Barcode"},a.props.showError(t),e.abrupt("return");case 4:return n=a.state.detBC.filter(function(e,t){if(!0!==e.fdeleted)return e}),e.next=7,a.props.BundleRec(n);case 7:a.resErr();case 8:case"end":return e.stop()}},e)})),a.deleteRow=function(e,t,r){var l=Object(n.a)({},t,Object(i.a)({},e.target.name,e.target.checked)),c=a.state.detBC.map(function(e,t){return t===r?l:e});a.setState({detBC:c})},a.resErr=function(){var e,t=[],n="Success";if(0==a.props.bundleRecv.length)e=["Bundle Received"];else{a.props.bundleRecv.map(function(a,r){return n="Error, Below bundle No. are not received",t=[].concat(Object(o.a)(t),[a]),e=t.join(",")});var r={header:n,content:e};a.props.showError(r)}},a.handleCancel=function(){a.setState({barcode:"",displyBC:!1,detBC:[]})},a.close=function(e,t){"keydown"!=e.type&&a.setState({open:!1})},a}return Object(m.a)(t,e),Object(s.a)(t,[{key:"renderHeader",value:function(){return f.a.createElement(b.a,{style:{display:"flex"}},f.a.createElement("h3",null,"Bundle Receive"),f.a.createElement("div",{className:"ml-auto"},f.a.createElement(E.a,{basic:!0,color:"blue",icon:"file",onClick:this.show("blurring"),content:"Report"}),f.a.createElement(E.a,{basic:!0,color:"violet",icon:"upload",onClick:this.handleSubmit,content:"Submit"}),f.a.createElement(E.a,{basic:!0,color:"black",icon:"ban",onClick:this.handleCancel,content:"Cancel"}),f.a.createElement(O.a,{to:"/dashboard"},f.a.createElement(E.a,{content:"Exit",icon:"home",basic:!0,color:"red"}))))}},{key:"render",value:function(){var e=this,t=this.state,a=t.barcode,n=t.displyBC,r=t.detBC,l=t.dimmer,c=t.open,o=t.fdeleted;return f.a.createElement("div",{className:"animated fadeIn"},f.a.createElement(v.a,{fluid:!0},f.a.createElement(C.a,null,this.renderHeader(),f.a.createElement(y.a,null),f.a.createElement(g.a,{style:{height:"72vh"}},f.a.createElement(w.a,null,f.a.createElement(R.a,{columns:2},f.a.createElement(B.a,{width:5,style:{display:"flex"}},f.a.createElement(w.a.Input,{width:"16",label:"Barcode",placeholder:"Enter barcode here...",maxLength:"17",name:"barcode",vlaue:a,onChange:this.handleChange})),f.a.createElement(B.a,{width:6},f.a.createElement(E.a,{style:{marginTop:"25px"},content:"GO",size:"mini",color:"facebook",onClick:this.handleClick})))),n?f.a.createElement("div",{className:"ui form",style:{maxHeight:"60vh",overflowY:"scroll",marginTop:"1rem"}},f.a.createElement(k.a,{celled:!0,style:{width:"auto",tableLayout:"auto",marginLeft:"auto",marginRight:"auto"},className:"stick"},f.a.createElement(k.a.Header,null,f.a.createElement(k.a.Row,{textAlign:"center"},f.a.createElement(k.a.HeaderCell,{singleLine:!0},"Sl. No."),f.a.createElement(k.a.HeaderCell,null,"College Code"),f.a.createElement(k.a.HeaderCell,null,"QP Code"),f.a.createElement(k.a.HeaderCell,null,"Bundle No."),f.a.createElement(k.a.HeaderCell,null,"Ttl. Script Count"),f.a.createElement(k.a.HeaderCell,null,"Delete"))),f.a.createElement(k.a.Body,null,r.map(function(t,a){return f.a.createElement(k.a.Row,{key:a,textAlign:"center"},f.a.createElement(k.a.Cell,null,a+1),f.a.createElement(k.a.Cell,null,t.fcollcode),f.a.createElement(k.a.Cell,null,t.fqpcode),f.a.createElement(k.a.Cell,null,t.fbundno),f.a.createElement(k.a.Cell,null,t.fttlscrpt),f.a.createElement(k.a.Cell,null,f.a.createElement("input",{className:"ui checkbox",type:"checkbox",name:"fdeleted",value:o,onChange:function(n){return e.deleteRow(n,t,a)},checked:"true"==t.fdeleted?"checked":null,style:{position:"inherit"}})))})))):null,f.a.createElement(L,{open:c,dim:l,close:this.close})))))}}]),t}(h.Component);t.default=Object(x.b)(function(e){return console.log("state",e.bundleRecv),{bundleRecv:e.bundleRecv}},{showError:j.w,BundleRec:function(e){return function(){var t=Object(c.a)(l.a.mark(function t(a,n){var r,c;return l.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=n(),t.next=3,S.a.post("app.php?a=bundleRecv&univcode="+r.univ.funivcode,{data:e});case 3:"object"!==typeof(c=t.sent).data?a({type:"SET_ERROR",payload:{error_code:-1,data:{msg:"Something went wrong"},status:"failure"}}):0===c.data.error_code?a({type:"BUND_RECV",payload:c.data}):a({type:"SET_ERROR",payload:c.data});case 5:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()},changeDetBC:function(e,t){return console.log("action"),{type:"CHANGE_DET_BARCODE",payload:{el:e,i:t}}}})(z)}}]);
//# sourceMappingURL=178.3b8231e1.chunk.js.map