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.144.252.243
(window.webpackJsonp=window.webpackJsonp||[]).push([[87],{1118:function(e,t,a){"use strict";a.r(t);var n=a(41),r=a.n(n),o=a(68),c=a(99),l=a(100),s=a(102),u=a(101),d=a(103),i=a(1),p=a.n(i),m=a(858),f=a(1139),b=a(1106),g=a(272),h=a(1098),v=a(1100),E=a(104),y=a(266),w=a(3),x=a(0),j=a(1101),S=(a(294),a(167),a(270)),O=a(269),k=function(e,t){return function(){var a=Object(o.a)(r.a.mark(function a(n,o){var c,l,s,u;return r.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return c=o(),console.log(c),console.log(e,t),a.next=5,O.a.get("app.php?a=SubmapTabledata&univcode="+c.univ.funivcode+"&fcollcode="+c.user.fcollcode+"°="+e+"&examno="+t);case 5:"object"!==typeof(l=a.sent).data?(s={header:"Error",content:"Something went wrong"},n(Object(y.w)(s))):-1===l.data.error_code?(u={header:"Error",content:l.data.data.msg},n(Object(y.w)(u))):(console.log(l.data),n({type:"SUB_MAP",payload:l.data}));case 7:case"end":return a.stop()}},a)}));return function(e,t){return a.apply(this,arguments)}}()},C=function(e){function t(){var e,a;Object(c.a)(this,t);for(var n=arguments.length,r=new Array(n),o=0;o<n;o++)r[o]=arguments[o];return(a=Object(s.a)(this,(e=Object(u.a)(t)).call.apply(e,[this].concat(r)))).state={tabledata:[{oldsub:"",oldsubname:"",newsubname:"",fdeleted:!1,fdisabled:!1}],fnewsub:"",degree:[],examno:""},a.changeNewSub=function(e,t,n){var r;console.log(e,t,n),r=Object(x.a)({},t,Object(w.a)({},e.name,e.value)),a.props.changeNewSubject(r,n)},a}return Object(d.a)(t,e),Object(l.a)(t,[{key:"componentDidMount",value:function(){console.log(this.props.deg),this.props.getsubmapdata(this.props.deg,this.props.examno)}},{key:"render",value:function(){var e=this,t=this.state;t.tabledata,t.tabledt,t.error,t.errorMessage,Object(S.i)();console.log(this.props),console.log(this.state);var a=this.props.submap.map(function(e,t){return{key:t,value:e.fsubcode,text:"".concat(e.fsubcode," - ").concat(e.fsubname)}});return p.a.createElement("div",{className:"animated fadeIn"},p.a.createElement("div",{className:"ui mini form"},p.a.createElement(j.a,{celled:!0,padded:!0,selectable:!0,structured:!0,size:"small",color:"olive",style:{marginTop:"25px"}},p.a.createElement(j.a.Header,{style:{fontSize:"1.2em"}},p.a.createElement(j.a.Row,null,p.a.createElement(j.a.HeaderCell,{style:{width:"5%"},singleLine:!0,textAlign:"center"},p.a.createElement("label",null,"Sl. No.")),p.a.createElement(j.a.HeaderCell,{style:{width:"30%"},textAlign:"center"},p.a.createElement("label",null,"Old Subject")),p.a.createElement(j.a.HeaderCell,{style:{width:"10%"},textAlign:"center"},p.a.createElement("label",null,"New Degree")),p.a.createElement(j.a.HeaderCell,{style:{width:"30%"},textAlign:"center"},p.a.createElement("label",null,"New Subject")))),p.a.createElement(j.a.Body,null,console.log(this.props.tabledt),this.props.tabledt.map(function(t,n){var r="".concat(t.fsubcode," - ").concat(t.fsubname);return p.a.createElement(j.a.Row,{key:n},p.a.createElement(j.a.Cell,{textAlign:"center",style:{fontSize:"1.2em"}},n+1),p.a.createElement(j.a.Cell,{textAlign:"left",style:{fontSize:"1.2em"}},r),p.a.createElement(j.a.Cell,{textAlign:"center",style:{fontSize:"1.2em"}},t.fdegree),p.a.createElement(j.a.Cell,{style:{padding:"0"}},p.a.createElement(h.a.Group,null,p.a.createElement(h.a.Field,{style:{marginBottom:"-0.1em"},width:16},p.a.createElement(v.a,{placeholder:"Select New Subject",name:"fnewsub",selection:!0,search:!0,id:n,value:t.fnewsub,options:a,style:{fontSize:"1.2em",marginBottom:"-0.5em",marginTop:"0.3em"},onChange:function(a,r){return e.changeNewSub(r,t,n)}})))))})))))}}]),t}(i.Component),T=Object(E.b)(function(e){return console.log(e.submapTabledata,"kkk"),{tabledt:e.submapTabledata.oldsub,submap:e.submapTabledata.newsub}},{getsubmapdata:k,changeNewSubject:function(e,t){return console.log(e,t),{type:"SUB_MAP_CHANGE",payload:{el:e,i:t}}}})(C),N=(a(271),function(e){function t(){var e,a;Object(c.a)(this,t);for(var n=arguments.length,l=new Array(n),d=0;d<n;d++)l[d]=arguments[d];return(a=Object(s.a)(this,(e=Object(u.a)(t)).call.apply(e,[this].concat(l)))).state={fstudydeg:"",displayTbl:!1,studyExamno:"",studySubject:"",tabledt:""},a.getDegrees=function(e,t){a.setState({frmDeggrp:t.value})},a.handleChangedeg=function(){var e=Object(o.a)(r.a.mark(function e(t,n){return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(a.props),e.next=3,a.props.fetchexamno(n.value);case 3:a.setState({fstudydeg:n.value,studyExamno:"",displayTbl:!1,studySubject:""}),console.log(a.props),console.log(a.state);case 6:case"end":return e.stop()}},e)}));return function(t,a){return e.apply(this,arguments)}}(),a.handleChangeexm=function(){var e=Object(o.a)(r.a.mark(function e(t,n){return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:console.log(a.state),a.setState({studyExamno:n.value,displayTbl:!1,studySubject:""});case 2:case"end":return e.stop()}},e)}));return function(t,a){return e.apply(this,arguments)}}(),a.handleChangesub=function(){var e=Object(o.a)(r.a.mark(function e(t,n){return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:console.log(a.state),a.setState({studySubject:n.value});case 2:case"end":return e.stop()}},e)}));return function(t,a){return e.apply(this,arguments)}}(),a.handleSubmit=Object(o.a)(r.a.mark(function e(){var t,n,o,c,l;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=a.props.user.fdeggrp,n=a.state,n.displayTbl,o=n.studyExamno,c=n.fstudydeg,n.studySubject,""!==t){e.next=6;break}return l={header:"Error",content:"Select Degree Group"},a.props.showError(l),e.abrupt("return");case 6:return console.log(c),e.next=9,a.props.getsubmapdata(c,o);case 9:a.setState({tabledt:""}),console.log(a.state,a.props),a.setState({displayTbl:!0});case 12:case"end":return e.stop()}},e)})),a.handleCancel=function(){a.setState({fstudydeg:"",displayTbl:!1,studyExamno:""})},a.handlesave=Object(o.a)(r.a.mark(function e(){var t,n,o,c;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(""!=a.state.fstudydeg){e.next=6;break}return t={header:"Error",content:"Select degree"},a.props.showError(t),e.abrupt("return");case 6:if(""!=a.state.studyExamno){e.next=10;break}return n={header:"Error",content:"Select examno"},a.props.showError(n),e.abrupt("return");case 10:return console.log(a.props.tabledt.oldsub),o=a.props.tabledt.oldsub,console.log(a.state),e.next=15,a.props.insertupdatesubmaping(o,a.state.fstudydeg,a.state.studyExamno);case 15:c={header:"Success",content:"Updated Successfully"},a.props.showError(c),a.handleCancel();case 18:case"end":return e.stop()}},e)})),a.renderHeader=function(){return p.a.createElement(f.a.Header,{style:{display:"flex"}},p.a.createElement("h3",null,"Subject Mapping"),p.a.createElement("div",{className:"ml-auto"},p.a.createElement(b.a,{basic:!0,color:"blue",icon:"save",onClick:a.handlesave,content:"Save"}),p.a.createElement(b.a,{basic:!0,color:"black",icon:"ban",onClick:a.handleCancel,content:"Cancel"}),p.a.createElement(m.a,{to:"/dashboard"},p.a.createElement(b.a,{basic:!0,color:"red",content:"Exit",icon:"home"}))))},a.renderForm=function(){var e=a.state,t=e.displayTbl,n=e.studyExamno,r=e.fstudydeg;e.studySubject;console.log(a.state);var o=a.props.degreeList.map(function(e){return{value:e.fdegree,text:"".concat(e.fdegree,"- ").concat(e.fdescpn)}}),c=a.props.examno.map(function(e){return{value:e.fexamno,text:"".concat(e.fexamno," - ").concat(e.fexamname)}}),l=(a.props.Subject.map(function(e){return{value:e.fsubcode,text:" ".concat(e.fsubname)}}),Object(S.i)());return p.a.createElement("div",{className:"animated fadeIn"},p.a.createElement(f.a,{fluid:!0},p.a.createElement(f.a.Content,null,a.renderHeader(),p.a.createElement(g.a,null),p.a.createElement(f.a.Description,{style:{overflowY:"auto",overflowX:"hidden",height:"".concat(l,"px")}},p.a.createElement("div",{className:"col-md-6"},p.a.createElement(h.a,null,p.a.createElement("div",null,p.a.createElement(h.a.Group,null,p.a.createElement(h.a.Field,{width:16},p.a.createElement("label",null,"Degree"),p.a.createElement(v.a,{placeholder:"Select Degree",name:"deg",value:r,selection:!0,search:!0,options:o,onChange:a.handleChangedeg})))),p.a.createElement(h.a.Group,null,p.a.createElement(h.a.Field,{width:16},p.a.createElement("label",null,"Exam No."),p.a.createElement(v.a,{placeholder:"Select Exam No.",name:"exmno",value:n,selection:!0,search:!0,options:c,onChange:a.handleChangeexm}))),p.a.createElement(b.a,{color:"blue",onClick:a.handleSubmit},"View"),p.a.createElement("br",null))),console.log(a.state),t?p.a.createElement(T,{examno:a.state.studyExamno,deg:a.state.fstudydeg}):null))))},a}return Object(d.a)(t,e),Object(l.a)(t,[{key:"componentDidMount",value:function(){this.props.getDegreeList()}},{key:"render",value:function(){return this.renderForm()}}]),t}(i.Component));t.default=Object(E.b)(function(e){return console.log(e),{deggrp:e.deggrp,collegeReport:e.collegeReport,univcode:e.univ.funivcode,user:e.user,degreeList:e.studyDegree,examno:e.studyExamno,Subject:e.studySubject,tabledt:e.submapTabledata}},{getDegreeList:function(){return function(){var e=Object(o.a)(r.a.mark(function e(t,a){var n,o,c,l;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=a(),console.log(n),e.next=4,O.a.get("app.php?a=SubmapDegreeList&univcode="+n.univ.funivcode+"&fcollcode="+n.user.fcollcode+"&fdeggrp="+n.user.fdeggrp);case 4:"object"!==typeof(o=e.sent).data?(c={header:"Error",content:"Something went wrong"},t(Object(y.w)(c))):-1===o.data.error_code?(l={header:"Error",content:o.data.data.msg},t(Object(y.w)(l))):(console.log(o.data),t({type:"ALL_DEGREE_LIST",payload:o.data}));case 6:case"end":return e.stop()}},e)}));return function(t,a){return e.apply(this,arguments)}}()},fetchexamno:function(e){return function(){var t=Object(o.a)(r.a.mark(function t(a,n){var o,c,l,s;return r.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o=n(),console.log(o),console.log(o),t.next=5,O.a.get("app.php?a=getexamno&univcode="+o.univ.funivcode+"°="+e);case 5:"object"!==typeof(c=t.sent).data?(l={header:"Error",content:"Something went wrong"},a(Object(y.w)(l))):-1===c.data.error_code?(s={header:"Error",content:c.data.data.msg},a(Object(y.w)(s))):(console.log(c.data),a({type:"STUDY_EXAMNO",payload:c.data}));case 7:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()},fetchsub:function(e,t){return function(){var a=Object(o.a)(r.a.mark(function a(n,o){var c,l,s,u;return r.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return c=o(),console.log(c),a.next=4,O.a.get("app.php?a=getstudysub&univcode="+c.univ.funivcode+"°="+t+"&exmno="+e);case 4:"object"!==typeof(l=a.sent).data?(s={header:"Error",content:"Something went wrong"},n(Object(y.w)(s))):-1===l.data.error_code?(u={header:"Error",content:l.data.data.msg},n(Object(y.w)(u))):(console.log(l.data),n({type:"STUDY_SUBJECT",payload:l.data}));case 6:case"end":return a.stop()}},a)}));return function(e,t){return a.apply(this,arguments)}}()},getsubmapdata:k,fetchDegGrp:y.j,showError:y.w,insertupdatesubmaping:function(e,t,a){return function(){var n=Object(o.a)(r.a.mark(function n(o,c){var l,s;return r.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return l=c(),console.log(l,e,t,a),o({type:"SET_LOADER"}),n.next=5,O.a.post("/app.php?a=insertUpdateSubmaping&univcode="+l.univ.funivcode,{data:{fdeggrp:l.user.fdeggrp,univcode:l.univ.funivcode,newOS:e,user:l.user,deg:t,examno:a}});case 5:s=n.sent,o({type:"UNSET_LOADER"}),"object"!==typeof s.data?o({type:"SET_ERROR",payload:{error_code:-1,data:{msg:"Something went wrong"},status:"failure"}}):o({type:"SET_ERROR",payload:s.data});case 8:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}()}})(N)},272:function(e,t,a){"use strict";var n=a(268),r=a.n(n),o=a(265),c=a.n(o),l=a(1),s=a.n(l),u=a(333),d=a(551),i=a(549),p=a(267);function m(e){var t=e.children,a=e.className,n=e.clearing,o=e.content,l=e.fitted,f=e.hidden,b=e.horizontal,g=e.inverted,h=e.section,v=e.vertical,E=c()("ui",Object(u.a)(n,"clearing"),Object(u.a)(l,"fitted"),Object(u.a)(f,"hidden"),Object(u.a)(b,"horizontal"),Object(u.a)(g,"inverted"),Object(u.a)(h,"section"),Object(u.a)(v,"vertical"),"divider",a),y=Object(d.a)(m,e),w=Object(i.a)(m,e);return s.a.createElement(w,r()({},y,{className:E}),p.a.isNil(t)?o:t)}m.handledProps=["as","children","className","clearing","content","fitted","hidden","horizontal","inverted","section","vertical"],m.propTypes={},t.a=m},294:function(e,t,a){}}]);
//# sourceMappingURL=87.450f51b4.chunk.js.map
|