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 : 13.59.183.77
(window.webpackJsonp=window.webpackJsonp||[]).push([[169],{1173:function(e,t,a){"use strict";a.r(t);var r=a(41),n=a.n(r),c=a(68),o=a(99),s=a(100),l=a(102),u=a(101),i=a(103),p=a(1),d=a.n(p),m=a(104),h=a(1139),f=a(1106),b=a(272),g=a(1098),v=a(1100),E=a(1101),w=a(998),j=a(858),x=a(266),y=a(269),O=function(e){function t(){var e,a;Object(o.a)(this,t);for(var r=arguments.length,s=new Array(r),i=0;i<r;i++)s[i]=arguments[i];return(a=Object(l.a)(this,(e=Object(u.a)(t)).call.apply(e,[this].concat(s)))).state={deggrp:"",semester:[],subject:[],frmsubmit:!1,table:a.props.getrvrttable},a.componentDidMount=Object(c.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.props.loadrvrtdeggrp();case 2:case"end":return e.stop()}},e)})),a.handleCancel=Object(c.a)(n.a.mark(function e(){return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:a.setState({deggrp:"",semester:[],subject:[],frmsubmit:!1});case 1:case"end":return e.stop()}},e)})),a.handleChangedeggrp=function(){var e=Object(c.a)(n.a.mark(function e(t,r){return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.setState({deggrp:r.value});case 2:return e.next=4,a.props.loaddexmno(a.state.deggrp);case 4:case"end":return e.stop()}},e)}));return function(t,a){return e.apply(this,arguments)}}(),a.handleChangeSemester=function(){var e=Object(c.a)(n.a.mark(function e(t,r){return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.setState({semester:r.value});case 2:return e.next=4,a.props.loadqpcode(a.state.semester);case 4:case"end":return e.stop()}},e)}));return function(t,a){return e.apply(this,arguments)}}(),a.handleChangeqp=function(){var e=Object(c.a)(n.a.mark(function e(t,r){return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.setState({subject:r.value});case 2:case"end":return e.stop()}},e)}));return function(t,a){return e.apply(this,arguments)}}(),a.handlechkboxchange=function(e,t){console.log(e,t);var r=a.state.table.map(function(a,r){return r===t&&(a.frvblock=e?"T":"F"),a});a.setState({table:r})},a.handleSave=Object(c.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.props.savervrtblock(a.state.table);case 2:case"end":return e.stop()}},e)})),a.handleSubmit=Object(c.a)(n.a.mark(function e(){var t,r,c;return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(""!==a.state.deggrp){e.next=4;break}return t={header:"Error",content:"Select Degree Group"},a.props.showError(t),e.abrupt("return");case 4:if(""!==a.state.subject){e.next=8;break}return r={header:"Error",content:"Select Semester"},a.props.showError(r),e.abrupt("return");case 8:if(""!==a.state.subject){e.next=12;break}return c={header:"Error",content:"Select QP Code"},a.props.showError(c),e.abrupt("return");case 12:return e.next=14,a.props.loadrvrttable(a.state);case 14:return a.setState({frmsubmit:!0}),e.next=17,a.setState({table:a.props.getrvrttable});case 17:case"end":return e.stop()}},e)})),a}return Object(i.a)(t,e),Object(s.a)(t,[{key:"render",value:function(){var e=this,t=this.state,a=t.deggrp,r=t.semester,n=t.subject,c=this.props.getrvrtdeggrp.map(function(e){return{key:e.fdeggrp,value:e.fdeggrp,text:e.fdescpn}}),o=this.props.getrvrtexamno.map(function(e,t){return{key:e.fexamno,value:e.fexamno,text:e.fexamname}}),s=this.props.getrvrtqpcode.map(function(e,t){return{key:e.fqpcode,value:e.fqpcode,text:e.fqpcode+" - "+e.fsubname}});return d.a.createElement("div",{className:"animated fadeIn"},d.a.createElement(h.a,{fluid:!0},d.a.createElement(h.a.Content,null,d.a.createElement(h.a.Header,{style:{display:"flex"}},d.a.createElement("h4",null,"RV RT Block"),d.a.createElement("div",{className:"ml-auto"},d.a.createElement(f.a,{basic:!0,color:"blue",onClick:this.handleSave,content:"Save",icon:"file"}),d.a.createElement(f.a,{basic:!0,color:"black",icon:"ban",onClick:this.handleCancel,content:"Cancel"}),d.a.createElement(j.a,{to:"/dashboard"},d.a.createElement(f.a,{basic:!0,color:"red",content:"Exit",icon:"home"})))),d.a.createElement(b.a,null),d.a.createElement(h.a.Description,{style:{overflowY:"auto",height:"800px"}},d.a.createElement("div",{className:"col-md-8 col-lg-8 col-sm-12"},d.a.createElement(g.a,null,d.a.createElement(g.a.Field,{width:12},d.a.createElement("label",null,"Degree Group"),d.a.createElement(v.a,{fluid:!0,search:!0,selection:!0,onChange:this.handleChangedeggrp,value:a,name:"deggrp",placeholder:"Degree Group",options:c})),d.a.createElement(g.a.Field,{width:12},d.a.createElement("label",null,"Semester"),d.a.createElement(v.a,{fluid:!0,search:!0,multiple:!0,selection:!0,onChange:this.handleChangeSemester,value:r,name:"semester",placeholder:"Semester",options:o})),d.a.createElement(g.a.Field,{width:12},d.a.createElement("label",null,"Subject"),d.a.createElement(v.a,{fluid:!0,search:!0,selection:!0,multiple:!0,onChange:this.handleChangeqp,value:n,name:"subject",placeholder:"Subject",options:s})),d.a.createElement(g.a.Field,null,d.a.createElement(f.a,{content:"Submit",color:"blue",onClick:this.handleSubmit}))),this.state.frmsubmit?d.a.createElement(E.a,{celled:!0,padded:!0,style:{width:"1100px"}},d.a.createElement(E.a.Header,null,d.a.createElement(E.a.Row,{className:"sticky"},d.a.createElement(E.a.HeaderCell,{singleLine:!0,style:{textAlign:"center"}},"Sl. No."),d.a.createElement(E.a.HeaderCell,{style:{textAlign:"center"}},"QP Code"),d.a.createElement(E.a.HeaderCell,{style:{textAlign:"center"}},"Subject Name"),d.a.createElement(E.a.HeaderCell,{style:{textAlign:"center"}},"Block"))),d.a.createElement(E.a.Body,null,this.props.getrvrttable.map(function(t,a){return d.a.createElement(E.a.Row,null,d.a.createElement(E.a.Cell,{style:{textAlign:"center"}},a+1),d.a.createElement(E.a.Cell,{style:{textAlign:"center"}},t.fqpcode),d.a.createElement(E.a.Cell,null,t.fsubname),d.a.createElement(E.a.Cell,{style:{textAlign:"center"}},d.a.createElement(w.a,{onChange:function(t,r){return e.handlechkboxchange(r.checked,a)},value:t.frvblock,checked:"T"==t.frvblock})))}))):null)))))}}]),t}(p.Component);t.default=Object(m.b)(function(e){return{univcode:e.univ.funivcode,getrvrtdeggrp:e.getrvrtdeggrp,getrvrtexamno:e.getrvrtexamno,getrvrtqpcode:e.getrvrtqpcode,getrvrttable:e.getrvrttable}},{showError:x.w,loadrvrtdeggrp:function(){return function(){var e=Object(c.a)(n.a.mark(function e(t,a){var r,c,o,s;return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=a(),t({type:"SET_LOADER"}),e.next=4,y.a.get("/app.php",{params:{a:"getdeggrprvrt",univcode:r.user.fcuruniv}});case 4:c=e.sent,t({type:"UNSET_LOADER"}),"object"!==typeof c.data?(o={header:"Error",content:"Something went wrong"},t(Object(x.w)(o))):-1===c.data.error_code?(s={header:"Error",content:c.data.data.msg},t(Object(x.w)(s))):t({type:"RVRT_DEGGRP",payload:c.data});case 7:case"end":return e.stop()}},e)}));return function(t,a){return e.apply(this,arguments)}}()},loaddexmno:function(e){return function(){var t=Object(c.a)(n.a.mark(function t(a,r){var c,o,s,l;return n.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return c=r(),a({type:"SET_LOADER"}),t.next=4,y.a.get("/app.php",{params:{a:"getexamnorvrt",univcode:c.user.fcuruniv,deggrp:e}});case 4:o=t.sent,a({type:"UNSET_LOADER"}),"object"!==typeof o.data?(s={header:"Error",content:"Something went wrong"},a(Object(x.w)(s))):-1===o.data.error_code?(l={header:"Error",content:o.data.data.msg},a(Object(x.w)(l))):a({type:"RVRT_EXAMNO",payload:o.data});case 7:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()},loadqpcode:function(e){return function(){var t=Object(c.a)(n.a.mark(function t(a,r){var c,o,s,l;return n.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return c=r(),a({type:"SET_LOADER"}),t.next=4,y.a.get("/app.php",{params:{a:"getqpcodervrt",univcode:c.user.fcuruniv,sem:e}});case 4:o=t.sent,a({type:"UNSET_LOADER"}),"object"!==typeof o.data?(s={header:"Error",content:"Something went wrong"},a(Object(x.w)(s))):-1===o.data.error_code?(l={header:"Error",content:o.data.data.msg},a(Object(x.w)(l))):a({type:"RVRT_SEM",payload:o.data});case 7:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()},loadrvrttable:function(e){return function(){var t=Object(c.a)(n.a.mark(function t(a,r){var c,o,s,l;return n.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return c=r(),a({type:"SET_LOADER"}),t.next=4,y.a.get("/app.php",{params:{a:"getrvrttable",univcode:c.user.fcuruniv,sem:e.semester,sub:e.subject}});case 4:o=t.sent,a({type:"UNSET_LOADER"}),"object"!==typeof o.data?(s={header:"Error",content:"Something went wrong"},a(Object(x.w)(s))):-1===o.data.error_code?(l={header:"Error",content:o.data.data.msg},a(Object(x.w)(l))):a({type:"RVRT_TABLE",payload:o.data});case 7:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()},savervrtblock:function(e){return function(){var t=Object(c.a)(n.a.mark(function t(a,r){var c,o,s,l,u;return n.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return c=r(),t.next=3,y.a.post("/app.php?a=saveRVRTBlock&univcode="+c.univ.funivcode,{data:e});case 3:o=t.sent,a({type:"UNSET_LOADER"}),"object"!==typeof o.data?(s={header:"Error",content:"Something went wrong"},a(Object(x.w)(s))):-1===o.data.error_code?(l={header:"Error",content:o.data.data.msg},a(Object(x.w)(l))):(u={header:"Success",content:o.data.data.msg},a(Object(x.w)(u)));case 6:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()}})(O)},272:function(e,t,a){"use strict";var r=a(268),n=a.n(r),c=a(265),o=a.n(c),s=a(1),l=a.n(s),u=a(333),i=a(551),p=a(549),d=a(267);function m(e){var t=e.children,a=e.className,r=e.clearing,c=e.content,s=e.fitted,h=e.hidden,f=e.horizontal,b=e.inverted,g=e.section,v=e.vertical,E=o()("ui",Object(u.a)(r,"clearing"),Object(u.a)(s,"fitted"),Object(u.a)(h,"hidden"),Object(u.a)(f,"horizontal"),Object(u.a)(b,"inverted"),Object(u.a)(g,"section"),Object(u.a)(v,"vertical"),"divider",a),w=Object(i.a)(m,e),j=Object(p.a)(m,e);return l.a.createElement(j,n()({},w,{className:E}),d.a.isNil(t)?c:t)}m.handledProps=["as","children","className","clearing","content","fitted","hidden","horizontal","inverted","section","vertical"],m.propTypes={},t.a=m}}]);
//# sourceMappingURL=169.a83fc56c.chunk.js.map
|