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


Current Path : /var/www/egov/build/static/js/
Upload File :
Current File : /var/www/egov/build/static/js/176.1ed373e0.chunk.js

(window.webpackJsonp=window.webpackJsonp||[]).push([[176],{1156:function(e,t,a){"use strict";a.r(t);var n=a(2),r=a(0),l=a(41),c=a.n(l),o=a(68),d=a(3),s=a(99),i=a(100),u=a(102),m=a(101),p=a(103),h=a(1),f=a.n(h),b=a(858),C=a(1139),E=a(1106),v=a(272),g=a(1098),w=a(317),y=a(1101),k=a(104),S=(a(271),a(266)),O=(a(273),a(270)),j=(a(284),a(269)),B=function(e){function t(){var e,a;Object(s.a)(this,t);for(var l=arguments.length,i=new Array(l),p=0;p<l;p++)i[p]=arguments[p];return(a=Object(u.a)(this,(e=Object(m.a)(t)).call.apply(e,[this].concat(i)))).state={showtable:!1,frmDeggrp:"",pd:[],reportType:"datewWiseValDet",frmSubmit:!1,rftype:"PDF",status:"ALL",barcode:"",detBC:[],displyBC:!1,open:!1,fdeleted:!1},a.handleChange=function(e,t){switch(t.type){case"text":a.setState(Object(d.a)({},t.name,t.value));default:a.setState(Object(d.a)({},t.name,t.value))}a.setState({frmSubmit:!1})},a.handleChangedate=function(e){a.setState(Object(d.a)({},e.target.name,e.target.value))},a.handleSave=Object(o.a)(c.a.mark(function e(){var t,n;return c.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.updateCodeList(n);case 7:a.handleCancel();case 8:case"end":return e.stop()}},e)})),a.deleteRow=function(e,t,n){var l=Object(r.a)({},t,Object(d.a)({},e.target.name,e.target.checked)),c=a.state.detBC.map(function(e,t){return t===n?l:e});a.setState({detBC:c})},a.handleCancel=function(){a.setState({showtable:!1,frmDeggrp:"",pd:[],reportType:"datewWiseValDet",frmSubmit:!1,rftype:"PDF",status:"ALL",barcode:"",detBC:[],displyBC:!1,open:!1,fdeleted:!1})},a.handleClick=function(){if(a.state.barcode){var e=a.state.barcode.substring(0,5),t=a.state.barcode.substring(5,9),r=a.state.barcode.substring(9,11),l=(a.state.barcode.substring(14,17),[e,t,r].join("-")),c={fslno:r,fqpcode:e,fbundno:t,fregCode:l,fdeleted:!1},o=a.state.barcode.length-1,d=c,s=!1;if(a.state.detBC.map(function(e,t){e.fbundno===d.fbundno&&o!==t&&e.fslno===d.fslno&&(s=!0)}),s){return a.props.showError({header:"Error",content:"Duplicate entry is not allowed."}),void a.setState({barcode:""})}a.setState({displyBC:!0,detBC:[].concat(Object(n.a)(a.state.detBC),[c]),barcode:""})}else{a.props.showError({header:"Error",content:"Barcode length should be minimum 17"})}},a.renderHeader=function(){return f.a.createElement(C.a.Header,{style:{display:"flex"}},f.a.createElement("h3",null,"Scan RV/RT Code List"),f.a.createElement("div",{className:"ml-auto"},f.a.createElement(E.a,{basic:!0,color:"blue",onClick:a.handleSave,content:"Save",icon:"file"}),f.a.createElement(E.a,{basic:!0,color:"black",icon:"ban",onClick:a.handleCancel,content:"Cancel"}),f.a.createElement(b.a,{to:"/dashboard"},f.a.createElement(E.a,{basic:!0,color:"red",content:"Exit",icon:"home"}))))},a}return Object(p.a)(t,e),Object(i.a)(t,[{key:"render",value:function(){var e=this,t=this.state,a=t.barcode,n=t.displyBC,r=t.detBC,l=(t.dimmer,t.open,t.fdeleted);Number(this.props.user.fcurtype),Object(O.i)();return f.a.createElement("div",{className:"animated fadeIn"},f.a.createElement(C.a,{fluid:!0},f.a.createElement(C.a.Content,null,this.renderHeader(),f.a.createElement(v.a,null),f.a.createElement(C.a.Description,{style:{height:"72vh"}},f.a.createElement(g.a,null,f.a.createElement(w.a,{columns:2},f.a.createElement(w.a.Column,{width:5,style:{display:"flex"}},f.a.createElement(g.a.Input,{width:"16",label:"Barcode",placeholder:"Enter barcode here...",maxLength:"11",name:"barcode",value:a,onChange:this.handleChange})),f.a.createElement(w.a.Column,{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(y.a,{celled:!0,style:{width:"auto",tableLayout:"auto",marginLeft:"auto",marginRight:"auto"},className:"stick"},f.a.createElement(y.a.Header,null,f.a.createElement(y.a.Row,{textAlign:"center"},f.a.createElement(y.a.HeaderCell,{singleLine:!0},"Sl. No."),f.a.createElement(y.a.HeaderCell,null,"QP Code"),f.a.createElement(y.a.HeaderCell,null,"Packet No."),f.a.createElement(y.a.HeaderCell,null,"Bundle - Sl. No."),f.a.createElement(y.a.HeaderCell,null,"Delete"))),f.a.createElement(y.a.Body,null,r.map(function(t,a){return f.a.createElement(y.a.Row,{key:a,textAlign:"center"},f.a.createElement(y.a.Cell,null,a+1),f.a.createElement(y.a.Cell,null,t.fqpcode),f.a.createElement(y.a.Cell,null,t.fbundno),f.a.createElement(y.a.Cell,null,t.fslno),f.a.createElement(y.a.Cell,null,f.a.createElement("input",{className:"ui checkbox",type:"checkbox",name:"fdeleted",value:l,onChange:function(n){return e.deleteRow(n,t,a)},checked:"true"==t.fdeleted?"checked":null,style:{position:"inherit"}})))})))):null))))}}]),t}(h.Component);t.default=Object(k.b)(function(e){return{user:e.user,dailyRvPcReport:e.dailyRvPcReport,saveRvRtCheckList:e.saveRvRtCheckList}},{showError:S.w,saveRvRtCheckList:S.v,updateCodeList:function(e){return function(){var t=Object(o.a)(c.a.mark(function t(a,n){var r,l,o,d,s;return c.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:"SET_LOADER"}),r=n(),t.next=4,j.a.post("app.php?a=updateScanCodeList&univcode="+r.univ.funivcode,{data:e});case 4:l=t.sent,a({type:"UNSET_LOADER"}),"object"!==typeof l.data?(o={header:"Error",content:"Something went wrong"},a(Object(S.w)(o))):-1===l.data.error_code?(d={header:"Error",content:l.data.data.msg},a(Object(S.w)(d))):(s={header:"Success",content:l.data.data.msg},a(Object(S.w)(s)));case 7:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()}})(B)}}]);
//# sourceMappingURL=176.1ed373e0.chunk.js.map