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.116.85.111
(window.webpackJsonp=window.webpackJsonp||[]).push([[88],{1153:function(e,a,t){"use strict";t.r(a);var n=t(41),r=t.n(n),o=t(68),c=t(99),l=t(100),u=t(102),i=t(101),d=t(103),s=t(1),p=t.n(s),f=t(858),m=(t(294),t(1139)),h=t(1106),w=t(272),E=t(1098),O=t(1100),g=t(998),b=t(104),v=t(266),y=t(269),C=t(270),j=function(e){function a(){var e,t;Object(c.a)(this,a);for(var n=arguments.length,l=new Array(n),d=0;d<n;d++)l[d]=arguments[d];return(t=Object(u.a)(this,(e=Object(i.a)(a)).call.apply(e,[this].concat(l)))).changeOutward=function(){var e=Object(o.a)(r.a.mark(function e(a,n){return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if("fltto"!=n.name){e.next=4;break}return t.props.cancelOutward(),e.next=4,t.props.loadData();case 4:"fconfi"==n.name?1==n.checked?t.props.changeOutward(n.name,"T"):t.props.changeOutward(n.name,"F"):t.props.changeOutward(n.name,n.value),"fcollcode"!=n.name&&"fregno"!=n.name||t.props.getName(n.name,n.value);case 6:case"end":return e.stop()}},e)}));return function(a,t){return e.apply(this,arguments)}}(),t.fromSubmitOutward=function(){t.props.fromSubmitOutward()},t.cancelOutward=function(){t.props.cancelOutward()},t}return Object(d.a)(a,e),Object(l.a)(a,[{key:"componentDidMount",value:function(){var e=Object(o.a)(r.a.mark(function e(){return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.props.loadData();case 2:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"componentWillUnmount",value:function(){this.props.cancelOutward()}},{key:"render",value:function(){var e=this.props.outwardCreation,a=e.college,t=e.to,n=e.fcollcode,r=e.fltto,o=e.fto,c=e.fname,l=e.fsubject,u=e.fregno,i=e.fothers,d=(e.fid,e.fconfi);console.log("this.props.outwardCreation : ",this.props.outwardCreation);var s=Object(C.i)();return p.a.createElement("div",null,p.a.createElement(m.a,{fluid:!0},p.a.createElement(m.a.Content,null,p.a.createElement(m.a.Header,{style:{display:"flex"}},p.a.createElement("h4",null,"Outward Entry"),p.a.createElement("div",{className:"ml-auto"},p.a.createElement(h.a,{basic:!0,onClick:this.cancelOutward,color:"black",icon:"times circle",content:"Cancel"}),p.a.createElement(f.a,{to:"/dashboard"},p.a.createElement(h.a,{basic:!0,color:"red",content:"Exit",icon:"home"})))),p.a.createElement(w.a,null),p.a.createElement(m.a.Description,{style:{overflowY:"auto",height:"".concat(s,"px")}},p.a.createElement(E.a,null,p.a.createElement("div",{className:"row clearfix",style:{marginRight:"0px",marginLeft:"-5px"}},p.a.createElement("div",{className:"col-md-8"},p.a.createElement(E.a.Group,null,p.a.createElement(E.a.Field,null,p.a.createElement("label",null,"Letter To"),p.a.createElement(O.a,{placeholder:"Select Later From",search:!0,selection:!0,name:"fltto",value:r,options:[{code:"",label:"-Select-"},{code:"CL",label:"College"},{code:"ST",label:"Student"},{code:"OT",label:"Others"}].map(function(e,a){return{key:a,value:e.code,text:e.label}}),onChange:this.changeOutward}))),"CL"==r?p.a.createElement(E.a.Group,null,p.a.createElement(E.a.Field,{width:16},p.a.createElement("label",null,"College "),p.a.createElement(O.a,{placeholder:"Select College Range",search:!0,selection:!0,name:"fcollcode",value:n,options:a.map(function(e,a){return{key:a,value:e.fcollcode,text:e.college_name}}),onChange:this.changeOutward}))):null,"ST"==r?p.a.createElement(E.a.Group,null,p.a.createElement(E.a.Field,{width:16},p.a.createElement(E.a.Input,{placeholder:"Register No.",name:"fregno",onChange:this.changeOutward,maxLength:"8",label:"Register No.",value:u}))):null,"OT"==r?p.a.createElement(E.a.Group,null,p.a.createElement(E.a.Field,{width:16},p.a.createElement(E.a.Input,{placeholder:"Others",name:"fothers",onChange:this.changeOutward,maxLength:"100",label:"Others",value:i}))):null,p.a.createElement(E.a.Group,null,p.a.createElement(E.a.Field,{width:16},p.a.createElement(E.a.Input,{placeholder:"Address / Name",name:"fname",onChange:this.changeOutward,label:"Address / Name",value:c}))),p.a.createElement(E.a.Group,null,p.a.createElement(E.a.Field,{width:16},p.a.createElement(E.a.Input,{placeholder:"From",name:"fsubject",onChange:this.changeOutward,label:"Subject",value:l}))),p.a.createElement(E.a.Group,null,p.a.createElement(E.a.Field,{width:16},p.a.createElement("label",null,"From "),p.a.createElement(O.a,{placeholder:"to",search:!0,selection:!0,name:"fto",value:o,options:t.map(function(e,a){return{key:a,value:e.fid,text:e.fdescpn}}),onChange:this.changeOutward}))),p.a.createElement(E.a.Group,null,p.a.createElement(E.a.Field,{width:16},p.a.createElement(g.a,{label:"Confidencial",onChange:this.changeOutward,name:"fconfi",checked:"T"==d}))),p.a.createElement("button",{class:"ui primary button",onClick:this.fromSubmitOutward},"Submit")),p.a.createElement("hr",null)))))))}}]),a}(s.Component);a.default=Object(b.b)(function(e){return{outwardCreation:e.outwardCreation}},{showError:v.w,loadData:function(e,a){return function(){var e=Object(o.a)(r.a.mark(function e(a,t){var n,o;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t(),e.next=3,y.a.get("app.php?a=loadData&univcode="+n.univ.funivcode);case 3:"object"!==typeof(o=e.sent).data?a({type:"SET_ERROR",payload:{error_code:-1,data:{msg:"Something went wrong"},status:"failure"}}):0===o.data.error_code?a({type:"OUTWARD_LOAD",payload:o.data}):a({type:"SET_ERROR",payload:o});case 5:case"end":return e.stop()}},e)}));return function(a,t){return e.apply(this,arguments)}}()},changeOutward:function(e,a){return{type:"CHANGE_OUTWARD",payload:{name:e,value:a}}},getName:function(e,a){return function(){var e=Object(o.a)(r.a.mark(function e(t,n){var o,c;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=n(),e.next=3,y.a.get("app.php?a=getName&univcode="+o.univ.funivcode+"&value="+a+"&fltfrom="+o.outwardCreation.fltto);case 3:"object"!==typeof(c=e.sent).data?t({type:"SET_ERROR",payload:{error_code:-1,data:{msg:"Something went wrong"},status:"failure"}}):0===c.data.error_code?t({type:"OUTWARD_GETNAME",payload:c.data}):t({type:"SET_ERROR",payload:c});case 5:case"end":return e.stop()}},e)}));return function(a,t){return e.apply(this,arguments)}}()},cancelOutward:function(){return{type:"CANCEL_OUTWARD"}},fromSubmitOutward:function(){return function(){var e=Object(o.a)(r.a.mark(function e(a,t){var n,o,c;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t(),console.log("state.outwardCreation.fconfi : ",n.outwardCreation.fconfi),e.next=4,y.a.post("app.php?a=fromSubmitInward&univcode="+n.univ.funivcode,{fltfrom:n.outwardCreation.fltto,fcollcode:n.outwardCreation.fcollcode,fto:n.outwardCreation.fto,fid:n.outwardCreation.fid,fname:n.outwardCreation.fname,fsubject:n.outwardCreation.fsubject,fregno:n.outwardCreation.fregno,fothers:n.outwardCreation.fothers,fconfi:n.outwardCreation.fconfi,ftype:"O"});case 4:"object"!==typeof(o=e.sent).data?a({type:"SET_ERROR",payload:{error_code:-1,data:{msg:"Something went wrong"},status:"failure"}}):0===o.data.error_code?(c={header:"Success",content:o.data.data.msg},a(Object(v.w)(c)),a({type:"CANCEL_OUTWARD"})):a({type:"SET_ERROR",payload:o});case 6:case"end":return e.stop()}},e)}));return function(a,t){return e.apply(this,arguments)}}()}})(j)},272:function(e,a,t){"use strict";var n=t(268),r=t.n(n),o=t(265),c=t.n(o),l=t(1),u=t.n(l),i=t(333),d=t(551),s=t(549),p=t(267);function f(e){var a=e.children,t=e.className,n=e.clearing,o=e.content,l=e.fitted,m=e.hidden,h=e.horizontal,w=e.inverted,E=e.section,O=e.vertical,g=c()("ui",Object(i.a)(n,"clearing"),Object(i.a)(l,"fitted"),Object(i.a)(m,"hidden"),Object(i.a)(h,"horizontal"),Object(i.a)(w,"inverted"),Object(i.a)(E,"section"),Object(i.a)(O,"vertical"),"divider",t),b=Object(d.a)(f,e),v=Object(s.a)(f,e);return u.a.createElement(v,r()({},b,{className:g}),p.a.isNil(a)?o:a)}f.handledProps=["as","children","className","clearing","content","fitted","hidden","horizontal","inverted","section","vertical"],f.propTypes={},a.a=f},294:function(e,a,t){}}]);
//# sourceMappingURL=88.cfc28253.chunk.js.map
|