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.15.34.105
(window.webpackJsonp=window.webpackJsonp||[]).push([[150],{1142:function(e,t,a){"use strict";a.r(t);var r=a(41),n=a.n(r),o=a(68),l=a(99),c=a(100),s=a(102),i=a(101),u=a(103),d=(a(874),a(104)),p=a(858),m=a(360),f=a(3),g=a(1),v=a.n(g),h=a(495),E=a(1101),y=a(317),b=a(1139),w=a(989),S=a(642),C=a(1106),x=a(272),j=a(309),R=(a(167),a(467),a(372)),k=a(478),O=(a(423),a(479)),_=a.n(O),T=(a(505),a(269),a(266)),G=a(271),N=function(e){function t(){var e,a;Object(l.a)(this,t);for(var r=arguments.length,c=new Array(r),u=0;u<r;u++)c[u]=arguments[u];return(a=Object(s.a)(this,(e=Object(i.a)(t)).call.apply(e,[this].concat(c)))).state={reply:"",msgsnt:!1,fclose:!1,qryclsd:!1,file:null,editorState:R.EditorState.createEmpty(),editor:""},a.setEditor=function(e){a.setState({editor:e})},a.onEditorStateChange=function(e){a.setState({editorState:e})},a.handleChange=function(e,t){switch(t.type){case"checkbox":return void a.setState(Object(f.a)({},t.name,t.checked));default:return void a.setState(Object(f.a)({},t.name,t.value))}},a.replyTxt=function(e){a.setState({reply:e.target.value})},a.sendRply=function(e){var t=_()(Object(R.convertToRaw)(a.state.editorState.getCurrentContent())),r="C"==e?"C":"";if(a.state.editorState.getCurrentContent().hasText())a.props.grvSend(a.props.header.fgrvid,t,r),a.setState({reply:"",file:null,msgsnt:!0,editorState:R.EditorState.createEmpty()}),console.log("case nt closed"),a.props.getGrv();else{console.log("no reply typed",a.state.reply);a.props.showError({header:"Error",content:"Enter the reply."})}},a.closeCase=Object(o.a)(n.a.mark(function e(){return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.sendRply("C");case 2:case"end":return e.stop()}},e)})),a}return Object(u.a)(t,e),Object(c.a)(t,[{key:"componentDidMount",value:function(){return this.state.msgsnt}},{key:"handleFile",value:function(e){var t=e.target.files[0];this.setState({file:t})}},{key:"render",value:function(){var e=this.state.editorState,t=this.props.txns,a=this.props.header,r=this.state,n=(r.fclose,r.msgsnt),o=r.qryclsd;return v.a.createElement("div",null,v.a.createElement("div",{style:{position:"sticky",top:"0",zIndex:"2",backgroundColor:"white"}},v.a.createElement(h.a.Group,null,v.a.createElement(h.a,null,v.a.createElement(h.a.Image,{size:"mini",style:{width:"85px",marginTop:"1rem"},src:"../../../../../assets/img/logos/".concat(a.funivshort,"_logo.jpg")}),v.a.createElement(h.a.Content,null,v.a.createElement(E.a,{basic:"very",celled:!0,collapsing:!0,columns:"16",padded:!0,singleLine:!0},v.a.createElement(E.a.Body,null,v.a.createElement(E.a.Row,null,v.a.createElement(E.a.Cell,null,"University"),v.a.createElement(E.a.Cell,null,v.a.createElement("b",null,"[",a.funivcode,"] ",a.funivname))),v.a.createElement(E.a.Row,null,v.a.createElement(E.a.Cell,null,"From"),v.a.createElement(E.a.Cell,null,v.a.createElement("b",null,"[",a.fregno,"] ",a.fgrvfrom))),v.a.createElement(E.a.Row,null,v.a.createElement(E.a.Cell,null,"Info"),v.a.createElement(E.a.Cell,null,v.a.createElement("b",null,"ID - ",a.fgrvid," submitted on ",a.fgrvdate))),v.a.createElement(E.a.Row,null,v.a.createElement(E.a.Cell,null,"Subject"),v.a.createElement(E.a.Cell,null,v.a.createElement("b",null,this.props.grv.header.fgrvsub))))))))),v.a.createElement(y.a.Row,{style:{margin:"0px"}},v.a.createElement(y.a.Column,{width:8,floated:"left"},v.a.createElement(b.a,{fluid:!0,color:"green",style:{width:"45vw",margin:"10px",background:"aliceblue"}},v.a.createElement(b.a.Content,{style:{textAlign:"left"}},v.a.createElement(w.a,{floated:"left",circular:!0,size:"mini",src:"https://react.semantic-ui.com/images/avatar/large/jenny.jpg"}),v.a.createElement(b.a.Header,{as:"h5"},a.fgrvfrom),v.a.createElement(b.a.Meta,{as:"h6"},a.fgrvdate),v.a.createElement(b.a.Description,null,v.a.createElement("div",{dangerouslySetInnerHTML:{__html:this.props.grv.header.fgrvmsg}}),console.log(this.props.grv.header.fgrvtranfile,G.d),""!=this.props.grv.header.fgrvtranfile?v.a.createElement("a",{href:this.props.grv.header.fgrvtranfile,style:{float:"right",color:"darkblue"},target:"_blank"},"View File"):null))))),v.a.createElement("div",{style:{overflowY:"hidden",paddingBottom:"1em"}},t.map(function(e,t){return v.a.createElement(y.a.Row,{style:{margin:"0px"}},v.a.createElement(y.a.Column,{width:8,floated:"RES"==e.fgrvtrantype?"right":"left"},v.a.createElement(b.a,{fluid:!0,key:t,color:"RES"==e.fgrvtrantype?"red":"green",style:"RES"==e.fgrvtrantype?{width:"45vw",margin:"15px",float:"left",background:"beige"}:{width:"45vw",margin:"15px",float:"left",background:"aliceblue"}},v.a.createElement(b.a.Content,{style:{textAlign:"left"}},v.a.createElement(w.a,{floated:"left",circular:!0,size:"mini",src:"https://react.semantic-ui.com/images/avatar/large/jenny.jpg"}),v.a.createElement(b.a.Header,{as:"h5"},e.ffromuser),v.a.createElement(b.a.Meta,{as:"h6"},e.fgrvtrandate),v.a.createElement(b.a.Description,null,console.log(e.fgrvtranmsg),v.a.createElement("div",{dangerouslySetInnerHTML:{__html:e.fgrvtranmsg}}),""!=e.fgrvtranfile?v.a.createElement("a",{href:G.d+e.fgrvtranfile,style:"RES"==e.fgrvtrantype?{float:"right",color:"crimson"}:{float:"left",color:"darkblue"},target:"_blank"},"View File"):null)))))}),1==o?v.a.createElement(S.a,{color:"red",horizontal:!0},"Issue cleared"):null),"C"!=this.props.grv.header.fgrvstatus?v.a.createElement("div",{className:"ml-auto"},v.a.createElement(C.a,{onClick:this.sendRply,basic:!0,color:"blue",icon:"send",content:"Send"}),v.a.createElement(C.a,{basic:!0,color:"black",icon:"ban",content:"Send & Close Case",onClick:this.closeCase})):null,v.a.createElement(x.a,null),"C"!=this.props.grv.header.fgrvstatus?v.a.createElement("div",{style:{border:"1px solid grey",minHeight:"40vh",marginTop:"20px"}},v.a.createElement(k.Editor,{editorState:e,toolbarClassName:"toolbarClassName",wrapperClassName:"wrapperClassName",editorClassName:"editorClassName",toolbar:{options:["inline","blockType","fontSize","fontFamily","colorPicker","list","textAlign","remove","history"]},onEditorStateChange:this.onEditorStateChange})):null,v.a.createElement("div",{className:"mt-1"},n?v.a.createElement(j.a,{floating:!0,content:"".concat(this.props.grvSnt),color:"olive",size:"small"}):null))}}]),t}(g.Component),L=Object(d.b)(function(e){return{grv:e.grv,grvSnt:e.grvSnt}},{getGrv:m.b,grvSend:m.d,clrGrv:m.a,showError:T.w})(N),D=a(337),H=function(e){function t(){var e,a;Object(l.a)(this,t);for(var r=arguments.length,n=new Array(r),o=0;o<r;o++)n[o]=arguments[o];return(a=Object(s.a)(this,(e=Object(i.a)(t)).call.apply(e,[this].concat(n)))).state={grvdet:!1,curgrv:""},a.contextRef=Object(g.createRef)(),a.unmount=function(){a.props.clrGrv(a.props.grv.header.fgrvid,"")},a.renderHeader=function(){return v.a.createElement(b.a.Header,{style:{display:"flex",padding:"1em 1em"}},v.a.createElement("h3",null,"Grievances"),v.a.createElement("div",{className:"ml-auto"},v.a.createElement(p.a,{to:"/dashboard"},v.a.createElement(C.a,{basic:!0,color:"red",content:"Exit",icon:"home"}))))},a}return Object(u.a)(t,e),Object(c.a)(t,[{key:"componentDidMount",value:function(){var e=Object(o.a)(n.a.mark(function e(){return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(console.log(this.props.match.params.grvid),1==this.props.match.params.grvid){e.next=6;break}return e.next=4,this.props.getGrv({paramgrvid:this.props.match.params.grvid});case 4:e.next=8;break;case 6:return e.next=8,this.props.getGrv();case 8:this.setState({grvdet:!0}),window.addEventListener("beforeunload",this.unmount,!1);case 10:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"componentWillUnmount",value:function(){window.removeEventListener("beforeunload",this.unmount,!1),this.unmount()}},{key:"render",value:function(){return v.a.createElement("div",{className:"animated fadeIn"},v.a.createElement(b.a,{fluid:!0,style:{minHeight:"82vh"}},this.renderHeader(),v.a.createElement(b.a.Content,null,v.a.createElement(y.a,{centered:!0,columns:2,style:{margin:"auto"}},v.a.createElement(y.a.Column,{width:16,style:{paddingLeft:"0em"}},""!=this.props.grv.header.fgrvid?v.a.createElement(D.a,{style:{maxHeight:"68vh",overflowY:"scroll",position:"initial",paddingTop:"0em"}},v.a.createElement(L,{txns:this.props.grv.txns,header:this.props.grv.header})):null)))))}}]),t}(g.Component);t.default=Object(d.b)(function(e){return{grvlst:e.grvlst,grv:e.grv,grv_det:e.grv_det}},{getGrvList:m.c,getGrv:m.b,clrGrv:m.a})(H)},360:function(e,t,a){"use strict";a.d(t,"c",function(){return s}),a.d(t,"b",function(){return i}),a.d(t,"e",function(){return u}),a.d(t,"d",function(){return d}),a.d(t,"a",function(){return p});var r=a(41),n=a.n(r),o=a(68),l=a(269),c=a(266),s=function(e){return function(){var t=Object(o.a)(n.a.mark(function t(a,r){var o,c;return n.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o=r(),t.next=3,l.a.get("/app.php",{params:{a:"getgrvlst",type:e,fuserid:o.user.fuserid}});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:"GET_GRV_LIST",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)}}()},i=function(e){return function(){var t=Object(o.a)(n.a.mark(function t(a,r){var o,s,i,u,d;return n.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o=r(),console.log(typeof e),s="","object"==typeof e?(s=e.paramgrvid,e=""):s="",a({type:"SET_LOADER"}),t.next=7,l.a.get("/app.php",{params:{a:"getgrv",univcode:o.user.fcuruniv,userid:o.user.fuserid,username:o.user.fname,fgrvid:e,fparamgrvid:s}});case 7:i=t.sent,a({type:"UNSET_LOADER"}),"object"!==typeof i.data?(u={header:"Error",content:"Something went wrong"},a(Object(c.w)(u))):0===i.data.error_code?a({type:"GET_GRV",payload:i.data}):(d={header:"Error",content:i.data.data.msg},a(Object(c.w)(d)));case 10:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()},u=function(e){return function(){var t=Object(o.a)(n.a.mark(function t(a,r){var o,s,i,u;return n.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o=r(),a({type:"SET_LOADER"}),t.next=4,l.a.post("/app.php?a=submitquery",{data:{user:o.user,query:e}});case 4:if(s=t.sent,a({type:"UNSET_LOADER"}),"object"===typeof s.data){t.next=12;break}return i={header:"Error",content:"Something went wrong"},a(Object(c.w)(i)),t.abrupt("return");case 12:return u={header:"Success",content:"Query submitted successfully. Your reference No. : "+s.data.data.msg},a(Object(c.w)(u)),t.abrupt("return",0);case 15:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()},d=function(e,t,a){return function(){var r=Object(o.a)(n.a.mark(function r(o,c){var s,i;return n.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return s=c(),s.grv.header,console.log("state",s.grv.header.fgrvid),r.next=5,l.a.post("/app.php?a=grvSend",{data:{fusername:s.user.fname,frply:t,grvid:e,stt:a}});case 5:"object"!==typeof(i=r.sent).data?o({type:"SET_ERROR",payload:{error_code:-1,data:{msg:"Something went wrong"},status:"failure"}}):0===i.data.error_code?(o({type:"GRV_SENT",payload:i.data}),o({type:"GET_LIST_GRV",payload:s.grv.header.fgrvid}),o({type:"GRV_DET",payload:s.grv.header.fgrvid})):o({type:"SET_ERROR",payload:i.data});case 7:case"end":return r.stop()}},r)}));return function(e,t){return r.apply(this,arguments)}}()},p=function(e,t){return function(){var a=Object(o.a)(n.a.mark(function a(r,o){var c;return n.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return c=o(),console.log("grv",e),a.next=4,l.a.post("/app.php?a=grvClr",{data:{fgrvstatus:t,fgrvid:e,univcode:c.user.fcuruniv}});case 4:a.sent;case 5:case"end":return a.stop()}},a)}));return function(e,t){return a.apply(this,arguments)}}()}}}]);
//# sourceMappingURL=150.17b692f9.chunk.js.map
|