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


Current Path : /var/www/egov/build/static/js/
Upload File :
Current File : /var/www/egov/build/static/js/142.303a5002.chunk.js

(window.webpackJsonp=window.webpackJsonp||[]).push([[142],{1164:function(e,a,t){"use strict";t.r(a);var n=t(41),l=t.n(n),r=t(68),c=t(2),s=t(3),i=t(0),d=t(99),o=t(100),u=t(102),v=t(101),h=t(103),m=t(1),f=t.n(m),p=t(858),E=t(1139),b=t(1106),g=t(272),O=t(309),y=t(1101),j=t(104),w=t(269),C=t(266),x=function(e){function a(){var e,t;Object(d.a)(this,a);for(var n=arguments.length,o=new Array(n),h=0;h<n;h++)o[h]=arguments[h];return(t=Object(u.a)(this,(e=Object(v.a)(a)).call.apply(e,[this].concat(o)))).state={valheads:[{fvalcntr:"",fvalname:"",fvaladd1:"",fvaladd2:"",fvaladd3:"",fvaladd4:"",fvalcont:"",fdeleted:"",fdisabled:!1}]},t.changeCell=function(e,a,n){var l=t.state.valheads.map(function(t,l){var r=t;return l===n&&(r=Object(i.a)({},a,Object(s.a)({},e.target.name,e.target.value))),r});t.setState({valheads:l})},t.deleteRow=function(e,a,n){var l=t.state.valheads.map(function(t,l){var r=t;return l===n&&(r=Object(i.a)({},a,Object(s.a)({},e.target.name,e.target.checked))),r});t.setState({valheads:l})},t.addRow=function(){t.state.valheads.length;var e=t.state.valheads;if(console.log(e),""!==e.fvalcntr&&""!==e.fvalname&&""!==e.fvaladd1&&""!==e.fvaladd2&&""!==e.fvaladd3&&""!==e.fvaladd4&&""!==e.fvalcont){t.setState({valheads:[].concat(Object(c.a)(t.state.valheads),[{fvalcntr:"",fvalname:"",fvaladd1:"",fvaladd2:"",fvaladd3:"",fvaladd4:"",fvalcont:"",fdeleted:"",fdisabled:!1}])})}else{t.props.showError({header:"Error",content:"Enter the values"})}},t.handleSave=Object(r.a)(l.a.mark(function e(){var a,n,r,c;return l.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(t.state.valheads.length<=0)){e.next=4;break}return a={header:"Error",content:"Enter the values"},t.props.showError(a),e.abrupt("return");case 4:n=0;case 5:if(!(n<t.state.valheads.length)){e.next=14;break}if(""!==(r=t.state.valheads[n]).fvalcntr&&""!==r.fvalname&&""!==r.fvaladd1&&""!==r.fvaladd2&&""!==r.fvaladd3&&""!==r.fvaladd4&&""!==r.fvalcont){e.next=11;break}return c={header:"Error",content:"Enter all the values"},t.props.showError(c),e.abrupt("return");case 11:n++,e.next=5;break;case 14:return e.next=16,t.props.savevalheads(t.state.valheads);case 16:t.props.getvalheads();case 17:case"end":return e.stop()}},e)})),t}return Object(h.a)(a,e),Object(o.a)(a,[{key:"componentDidMount",value:function(){this.props.getvalheads()}},{key:"componentDidUpdate",value:function(e){this.props.valheads!==e.valheads&&this.setState({valheads:Object(c.a)(this.props.valheads)})}},{key:"render",value:function(){var e=this,a=this.state,t=a.valheads,n=a.error,l=a.errorMessage,r=t.length;return f.a.createElement("div",{className:"animated fadeIn"},f.a.createElement(E.a,{fluid:!0},f.a.createElement(E.a.Content,null,f.a.createElement(E.a.Header,{style:{display:"flex"}},f.a.createElement("h4",null,"Valuation Center"),f.a.createElement("div",{className:"ml-auto"},f.a.createElement(b.a,{basic:!0,color:"blue",content:"Add",icon:"plus",onClick:this.addRow}),f.a.createElement(b.a,{basic:!0,color:"green",content:"Save",onClick:this.handleSave,icon:"save"}),f.a.createElement(p.a,{to:"/dashboard"},f.a.createElement(b.a,{basic:!0,color:"red",content:"Exit",icon:"home"})))),f.a.createElement(g.a,null),f.a.createElement(E.a.Description,null,n?f.a.createElement(O.a,{negative:!0},f.a.createElement(O.a.Header,null," ",l," ")):null,f.a.createElement("div",{className:"ui mini form"},f.a.createElement(y.a,{celled:!0},f.a.createElement(y.a.Header,null,f.a.createElement(y.a.Row,null,f.a.createElement(y.a.HeaderCell,{style:{width:"5%"},singleLine:!0,textAlign:"center"},"Sl. No."),f.a.createElement(y.a.HeaderCell,{style:{width:"5%"},textAlign:"center"},"Valuation Center"),f.a.createElement(y.a.HeaderCell,{style:{width:"15%"},textAlign:"center"},"Valuation Name"),f.a.createElement(y.a.HeaderCell,{textAlign:"center",style:{width:"20%"}},"Valuation Address 1"),f.a.createElement(y.a.HeaderCell,{style:{width:"20%"},textAlign:"center"},"Valuation Address 2"),f.a.createElement(y.a.HeaderCell,{style:{width:"20%"},textAlign:"center"},"Valuation Address 3"),f.a.createElement(y.a.HeaderCell,{style:{width:"20%"},textAlign:"center"},"Valuation Address 4"),f.a.createElement(y.a.HeaderCell,{style:{width:"20%"},textAlign:"center"},"Valuation Count"),f.a.createElement(y.a.HeaderCell,{style:{width:"10%"},textAlign:"center"},"Deleted"))),f.a.createElement(y.a.Body,null,t.map(function(a,t){return f.a.createElement(y.a.Row,{key:t},f.a.createElement(y.a.Cell,{textAlign:"center"},t+1),f.a.createElement(y.a.Cell,{textAlign:"center",singleLine:!0},f.a.createElement("input",{className:"field",type:"text",name:"fvalcntr",id:t,value:a.fvalcntr,disabled:"true"==a.fdisabled,onChange:function(n){return e.changeCell(n,a,t)}})),f.a.createElement(y.a.Cell,null,f.a.createElement("input",{type:"text",name:"fvalname",value:a.fvalname,id:t,onChange:function(n){return e.changeCell(n,a,t)}})),f.a.createElement(y.a.Cell,null,f.a.createElement("input",{type:"text",style:{textAlign:"center"},value:a.fvaladd1,name:"fvaladd1",id:t,onChange:function(n){return e.changeCell(n,a,t)}})),f.a.createElement(y.a.Cell,null,f.a.createElement("input",{type:"text",style:{textAlign:"center"},value:a.fvaladd2,name:"fvaladd2",id:t,onChange:function(n){return e.changeCell(n,a,t)}})),f.a.createElement(y.a.Cell,null,f.a.createElement("input",{type:"text",style:{textAlign:"center"},value:a.fvaladd3,name:"fvaladd3",id:t,onChange:function(n){return e.changeCell(n,a,t)}})),f.a.createElement(y.a.Cell,null,f.a.createElement("input",{type:"text",style:{textAlign:"center"},value:a.fvaladd4,name:"fvaladd4",id:t,onChange:function(n){return e.changeCell(n,a,t)}})),f.a.createElement(y.a.Cell,null,f.a.createElement("input",{type:"text",style:{textAlign:"center"},value:a.fvalcont,name:"fvalcont",id:t,onChange:function(n){return e.changeCell(n,a,t)}})),f.a.createElement(y.a.Cell,{textAlign:"center"},r===t+1?f.a.createElement("div",{className:"ui checkbox"},f.a.createElement("input",{type:"checkbox",onKeyDown:function(a){8===a.keyCode&&e.addRow()},name:"fdeleted",value:a.fdeleted,onChange:function(n){return e.deleteRow(n,a,t)},checked:"true"==a.fdeleted?"checked":null}),f.a.createElement("label",null," ")):f.a.createElement("div",{className:"ui checkbox"},f.a.createElement("input",{type:"checkbox",name:"fdeleted",value:a.fdeleted,onChange:function(n){return e.deleteRow(n,a,t)},checked:"true"==a.fdeleted?"checked":null}),f.a.createElement("label",null," "))))}))))))))}}]),a}(m.Component);a.default=Object(j.b)(function(e){return{valheads:e.valheads}},{getvalheads:function(){return function(){var e=Object(r.a)(l.a.mark(function e(a,t){var n,r,c,s;return l.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t(),a({type:"SET_LOADER"}),a({type:"CLEAR_VALCNTR"}),e.next=5,w.a.get("/app.php",{params:{a:"getValHeads",univcode:n.univ.funivcode}});case 5:r=e.sent,a({type:"UNSET_LOADER"}),"object"!==typeof r.data?(c={header:"Error",content:"Something went wrong"},a(Object(C.w)(c))):-1===r.data.error_code?(s={header:"Error",content:r.data.data.msg},a(Object(C.w)(s))):a({type:"GET_VAL_HEADS",payload:r.data});case 8:case"end":return e.stop()}},e)}));return function(a,t){return e.apply(this,arguments)}}()},showError:C.w,savevalheads:function(e){return function(){var a=Object(r.a)(l.a.mark(function a(t,n){var r,c,s,i,d;return l.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return r=n(),t({type:"SET_LOADER"}),a.next=4,w.a.post("/app.php?a=savevalheads&univcode="+r.univ.funivcode,{data:{valheads:e}});case 4:c=a.sent,t({type:"UNSET_LOADER"}),"object"!==typeof c.data?(s={header:"Error",content:"Something went wrong"},t(Object(C.w)(s))):-1===c.data.error_code?(i={header:"Error",content:c.data.data.msg},t(Object(C.w)(i))):(d={header:"Success",content:c.data.data.msg},t(Object(C.w)(d)));case 7:case"end":return a.stop()}},a)}));return function(e,t){return a.apply(this,arguments)}}()}})(x)},272:function(e,a,t){"use strict";var n=t(268),l=t.n(n),r=t(265),c=t.n(r),s=t(1),i=t.n(s),d=t(333),o=t(551),u=t(549),v=t(267);function h(e){var a=e.children,t=e.className,n=e.clearing,r=e.content,s=e.fitted,m=e.hidden,f=e.horizontal,p=e.inverted,E=e.section,b=e.vertical,g=c()("ui",Object(d.a)(n,"clearing"),Object(d.a)(s,"fitted"),Object(d.a)(m,"hidden"),Object(d.a)(f,"horizontal"),Object(d.a)(p,"inverted"),Object(d.a)(E,"section"),Object(d.a)(b,"vertical"),"divider",t),O=Object(o.a)(h,e),y=Object(u.a)(h,e);return i.a.createElement(y,l()({},O,{className:g}),v.a.isNil(a)?r:a)}h.handledProps=["as","children","className","clearing","content","fitted","hidden","horizontal","inverted","section","vertical"],h.propTypes={},a.a=h},309:function(e,a,t){"use strict";var n=t(268),l=t.n(n),r=t(277),c=t.n(r),s=t(279),i=t.n(s),d=t(280),o=t.n(d),u=t(278),v=t.n(u),h=t(281),m=t.n(h),f=t(282),p=t.n(f),E=t(276),b=t.n(E),g=t(289),O=t.n(g),y=(t(275),t(265)),j=t.n(y),w=t(1),C=t.n(w),x=t(333),N=t(551),A=t(549),k=t(267),S=t(554),D=t(645);function H(e){var a=e.children,t=e.className,n=e.content,r=j()("content",t),c=Object(N.a)(H,e),s=Object(A.a)(H,e);return C.a.createElement(s,l()({},c,{className:r}),k.a.isNil(a)?n:a)}H.handledProps=["as","children","className","content"],H.propTypes={};var R=H;function T(e){var a=e.children,t=e.className,n=e.content,r=j()("header",t),c=Object(N.a)(T,e),s=Object(A.a)(T,e);return C.a.createElement(s,l()({},c,{className:r}),k.a.isNil(a)?n:a)}T.handledProps=["as","children","className","content"],T.propTypes={},T.create=Object(S.e)(T,function(e){return{content:e}});var V=T,L=t(283),_=t.n(L);function P(e){var a=e.children,t=e.className,n=e.content,r=j()("content",t),c=Object(N.a)(P,e),s=Object(A.a)(P,e);return C.a.createElement(s,l()({},c,{className:r}),k.a.isNil(a)?n:a)}P.handledProps=["as","children","className","content"],P.propTypes={},P.defaultProps={as:"li"},P.create=Object(S.e)(P,function(e){return{content:e}});var z=P;function G(e){var a=e.children,t=e.className,n=e.items,r=j()("list",t),c=Object(N.a)(G,e),s=Object(A.a)(G,e);return C.a.createElement(s,l()({},c,{className:r}),k.a.isNil(a)?_()(n,z.create):a)}G.handledProps=["as","children","className","items"],G.propTypes={},G.defaultProps={as:"ul"},G.create=Object(S.e)(G,function(e){return{items:e}});var K=G;t.d(a,"a",function(){return U});var U=function(e){function a(){var e,t;c()(this,a);for(var n=arguments.length,l=new Array(n),r=0;r<n;r++)l[r]=arguments[r];return t=o()(this,(e=v()(a)).call.apply(e,[this].concat(l))),b()(p()(p()(t)),"handleDismiss",function(e){var a=t.props.onDismiss;a&&a(e,t.props)}),t}return m()(a,e),i()(a,[{key:"render",value:function(){var e=this.props,t=e.attached,n=e.children,r=e.className,c=e.color,s=e.compact,i=e.content,d=e.error,o=e.floating,u=e.header,v=e.hidden,h=e.icon,m=e.info,f=e.list,p=e.negative,E=e.onDismiss,b=e.positive,g=e.size,y=e.success,w=e.visible,H=e.warning,T=j()("ui",c,g,Object(x.a)(s,"compact"),Object(x.a)(d,"error"),Object(x.a)(o,"floating"),Object(x.a)(v,"hidden"),Object(x.a)(h,"icon"),Object(x.a)(m,"info"),Object(x.a)(p,"negative"),Object(x.a)(b,"positive"),Object(x.a)(y,"success"),Object(x.a)(w,"visible"),Object(x.a)(H,"warning"),Object(x.b)(t,"attached"),"message",r),L=E&&C.a.createElement(D.a,{name:"close",onClick:this.handleDismiss}),_=Object(N.a)(a,this.props),P=Object(A.a)(a,this.props);return k.a.isNil(n)?C.a.createElement(P,l()({},_,{className:T}),L,D.a.create(h,{autoGenerateKey:!1}),(!O()(u)||!O()(i)||!O()(f))&&C.a.createElement(R,null,V.create(u,{autoGenerateKey:!1}),K.create(f,{autoGenerateKey:!1}),Object(S.c)(i,{autoGenerateKey:!1}))):C.a.createElement(P,l()({},_,{className:T}),L,n)}}]),a}(w.Component);b()(U,"Content",R),b()(U,"Header",V),b()(U,"List",K),b()(U,"Item",z),b()(U,"handledProps",["as","attached","children","className","color","compact","content","error","floating","header","hidden","icon","info","list","negative","onDismiss","positive","size","success","visible","warning"]),U.propTypes={}}}]);
//# sourceMappingURL=142.303a5002.chunk.js.map