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.12.76.168
(window.webpackJsonp=window.webpackJsonp||[]).push([[109],{1111:function(e,t,a){"use strict";a.r(t);var n=a(99),r=a(100),o=a(102),c=a(101),l=a(103),i=a(41),s=a.n(i),u=a(3),d=a(0),p=a(68),f=a(1),m=a.n(f),h=a(1100),b=a(1139),g=a(1106),E=a(272),w=a(1098),v=a(1101),O=a(104),C=a(269),x=a(266),y=function(e){return function(){var t=Object(p.a)(s.a.mark(function t(a,n){var r,o,c,l;return s.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=n(),a({type:"SET_LOADER"}),t.next=4,C.a.get("app.php?a=getSubjectCombination&univcode="+r.univ.funivcode+"&fcollcode="+e+"&fdeggrp="+r.user.fdeggrp);case 4:o=t.sent,a({type:"UNSET_LOADER"}),"object"!==typeof o.data?(c={header:"Error",content:"Something went wrong"},a(Object(x.w)(c))):-1===o.data.error_code?(l={header:"Error",content:o.data.data.msg},a(Object(x.w)(l))):a({type:"STUDENT_DEGREE_COMBINATION",payload:o.data});case 7:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()},D=function(){return{type:"STUDENT_DEGREE_COMBINATION_CHANGE"}},j=function(e,t){return{type:"CHANGE_ADMISSION_DATA",payload:{el:e,i:t}}},k=function(e){return function(){var t=Object(p.a)(s.a.mark(function t(a,n){var r;return s.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:n(),r={header:"Error",content:e},a(Object(x.w)(r));case 3:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()},S=a(482),A=a(858),L=a(270),_=a(1e3),T=function(e){function t(){return Object(n.a)(this,t),Object(o.a)(this,Object(c.a)(t).apply(this,arguments))}return Object(l.a)(t,e),Object(r.a)(t,[{key:"render",value:function(){return m.a.createElement(m.a.Fragment,null,m.a.createElement(h.a,{name:"fcombcode",fluid:!0,search:!0,selection:!0,disabled:!this.props.editFlage,placeholder:"Select Combination",options:this.props.options,value:this.props.value,onChange:this.props.onChange}))}}]),t}(f.Component),N=function(e){function t(){var e,a;Object(n.a)(this,t);for(var r=arguments.length,l=new Array(r),i=0;i<r;i++)l[i]=arguments[i];return(a=Object(o.a)(this,(e=Object(c.a)(t)).call.apply(e,[this].concat(l)))).state={addrowdata:!0,addrowData:!0},a.dd=[a.props.CurentDegree.particular_college_data.length],a.chnagedata=function(){var e=Object(p.a)(s.a.mark(function e(t,n,r){var o;return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return o=Object(d.a)({},n,Object(u.a)({},t.name,t.value)),e.next=3,a.props.changeAdmissionData(o,r);case 3:case"end":return e.stop()}},e)}));return function(t,a,n){return e.apply(this,arguments)}}(),a.onadd=Object(p.a)(s.a.mark(function e(){return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.props.particularData.map(function(){var e=Object(p.a)(s.a.mark(function e(t,n){return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n!=a.props.particularData.length-1||""!=t.fcombcode||""!=t.fdegree||""!=t.fintake||""!=t.fexamno){e.next=4;break}return alert("w"),e.next=4,a.setState({addrowData:!1});case 4:case"end":return e.stop()}},e)}));return function(t,a){return e.apply(this,arguments)}}());case 2:if(a.state.addrowData){e.next=7;break}return e.next=5,a.props.showErrorType("Enter all row data");case 5:e.next=10;break;case 7:return a.props.StudentDegreeCombinationADDrow(),e.next=10,a.setState({addrowData:!0});case 10:case"end":return e.stop()}},e)})),a.changeCell=function(e,t,n){var r=Object(d.a)({},t,Object(u.a)({},e.name,e.value));a.props.changeAdmissionData(r,n)},a.deleteRow=function(e,t,n){var r=Object(d.a)({},t,Object(u.a)({},e.target.name,e.target.checked?"T":"F"));a.props.changeAdmissionData(r,n)},a}return Object(l.a)(t,e),Object(r.a)(t,[{key:"render",value:function(){var e=this,t=this.props.degrees.map(function(e,t){return{key:t,value:e.fdegree,text:"".concat(e.fdegree," ").concat(e.fdescpn)}}),a=this.props.combs.filter(function(t,a){return t.fdegree==e.props.el.fdegree}).map(function(e,t){return{key:t,value:e.fcombcode,text:"".concat(e.fcombcode," ").concat(e.fcombdesc)}});return m.a.createElement(m.a.Fragment,null,m.a.createElement(v.a.Cell,{textAlign:"center"},this.props.i+1),m.a.createElement(v.a.Cell,{textAlign:"center",singleLine:!0},m.a.createElement(h.a,{size:"mini",fluid:!0,id:this.props.i,openOnFocus:!1,selectOnBlur:!1,placeholder:"Select Degree",name:"fdegree",disabled:!this.props.el.editFlage,value:this.props.el.fdegree,selection:!0,search:!0,options:t,onChange:function(t,a){return e.changeCell(a,e.props.el,e.props.i)}})),m.a.createElement(v.a.Cell,{textAlign:"center",singleLine:!0},m.a.createElement(_.a,{maxLength:"1",minLength:"1",className:"field",type:"text",name:"fexamno",readOnly:!this.props.el.editFlage,id:this.props.i,value:this.props.el.fexamno,style:{width:"5em"},onChange:function(t,a){if(""==a.value);else if(!/^[a-j]+$/i.test(a.value))return!1;a={name:"fexamno",value:a.value.toUpperCase()},e.changeCell(a,e.props.el,e.props.i)}})),m.a.createElement(v.a.Cell,null,m.a.createElement(T,{editFlage:this.props.el.editFlage,options:a,value:this.props.el.fcombcode,onChange:function(t,a){return e.changeCell(a,e.props.el,e.props.i)}})),m.a.createElement(v.a.Cell,null,m.a.createElement(_.a,{className:"field",pattern:"[0-9]*",onChange:function(t,a){isNaN(Number(t.target.value)||"Tab"===t.key)||e.changeCell(a,e.props.el,e.props.i)},type:"text",style:{textAlign:"center",width:"5em"},value:this.props.el.fintake,name:"fintake",maxLength:"3",minLength:"3",id:this.props.i})),m.a.createElement(v.a.Cell,{textAlign:"center"},m.a.createElement("div",{className:"ui checkbox"},m.a.createElement("input",{type:"checkbox",name:"fdeleted",onKeyDown:function(t){9==t.keyCode&&e.props.i==e.props.particularData.length-1&&e.onadd()},value:this.props.el.fdeleted,onChange:function(t){return e.deleteRow(t,e.props.el,e.props.i)},checked:"T"==this.props.el.fdeleted?"checked":null}),m.a.createElement("label",null," "))))}}]),t}(f.Component),F=Object(O.b)(function(e){return{CurentDegree:e.studentDegreeCombintaion,filterFcombdataList:e.filterFcombdata,degrees:e.studentDegreeCombintaion.degrees,combs:e.studentDegreeCombintaion.data,particularData:e.studentDegreeCombintaion.particular_college_data}},{StudentDegreeCombinationADDrow:D,studentDegreeCombintaion:y,changeAdmissionData:j,filterFcombdata:function(e){return{type:"FILTER_FCOMBCODE_DATA",payload:e}},showErrorType:k})(N),R=[],I=function(e){function t(){var e,a;Object(n.a)(this,t);for(var r=arguments.length,l=new Array(r),i=0;i<r;i++)l[i]=arguments[i];return(a=Object(o.a)(this,(e=Object(c.a)(t)).call.apply(e,[this].concat(l)))).state={emptyData:!0,saveButton:!0,duplicateData:!1,addrowState:!0,addrowdata:!0,addrowData:!0,dropDisable:!1,checkbox:"",fcollcode:"",showoption:!1,showfeild:!1,getallclg:!0,fcolcode:"",deggroup:[{fdeggrp:"",fdescpn:"",fyear:"",ftype:"",fexamdate:"",fdeleted:!1}]},a.onadd=Object(p.a)(s.a.mark(function e(){return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.props.collcomb.map(function(){var e=Object(p.a)(s.a.mark(function e(t,n){return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(console.log("ietm",t.fcombcode,t.fdegree,t.fintake,t.fexamno),n!=a.props.collcomb.length-1||""!=t.fcombcode||""!=t.fdegree||""!=t.fintake||""!=t.fexamno){e.next=5;break}return alert("w"),e.next=5,a.setState({addrowData:!1});case 5:case"end":return e.stop()}},e)}));return function(t,a){return e.apply(this,arguments)}}());case 2:if(console.log("addrowData",a.state.addrowData),a.state.addrowData){e.next=8;break}return e.next=6,a.props.showErrorType("Enter all row data");case 6:e.next=11;break;case 8:return a.props.StudentDegreeCombinationADDrow(),e.next=11,a.setState({addrowData:!0});case 11:case"end":return e.stop()}},e)})),a.changeCell=function(){var e=Object(p.a)(s.a.mark(function e(t,n,r){var o;return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.setState({frmsubmit:!0});case 2:return e.next=4,a.setState({duplicateData:!1});case 4:return console.log("droopp","e",t,"el",n,"i",r),o=Object(d.a)({},n,Object(u.a)({},t.target.name,t.target.value)),e.next=8,a.props.changeAdmissionData(o,r);case 8:case"end":return e.stop()}},e)}));return function(t,a,n){return e.apply(this,arguments)}}(),a.handleSave=Object(p.a)(s.a.mark(function e(){var t;return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.setState({duplicateData:!1});case 2:if(t=[],R=[],a.props.collcomb.map(function(){var e=Object(p.a)(s.a.mark(function e(n,r){return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r!=a.props.collcomb.length-1&&""!=n.fcombcode&&""!=n.fdegree&&""!=n.fintake&&""!=n.fexamno&&a.setState({emptyData:!1}),""!=n.fcombcode&&""!=n.fdegree&&""!=n.fintake&&""!=n.fexamno&&R.push({fdegree:n.fdegree,fexamno:n.fexamno,fcombcode:n.fcombcode,fintake:n.fintake,fdeleted:n.fdeleted}),console.log("after before hcek",t.indexOf("".concat(n.fcombcode,"+").concat(n.fdegree)),"check",t,"".concat(n.fcombcode,"+").concat(n.fdegree)),-1===t.indexOf("".concat(n.fcombcode,"+").concat(n.fdegree))){e.next=6;break}return e.next=6,a.setState({duplicateData:!0});case 6:t.push("".concat(n.fcombcode,"+").concat(n.fdegree));case 7:case"end":return e.stop()}},e)}));return function(t,a){return e.apply(this,arguments)}}()),0!=a.state.emptyData){e.next=12;break}return e.next=8,a.props.saveDegreeCombintaion(a.props.collcomb,a.state.fcollcode,a.state.duplicateData,a.state.emptyData,R);case 8:return e.next=10,a.props.studentDegreeCombintaion(a.state.fcollcode);case 10:e.next=13;break;case 12:a.props.showErrorType("Enter all data");case 13:case"end":return e.stop()}},e)})),a.getCollComb=Object(p.a)(s.a.mark(function e(){return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a.setState({saveButton:!1}),a.setState({dropDisable:!0}),e.next=4,a.props.studentDegreeCombintaion(a.state.fcollcode);case 4:a.setState({showTable:!0});case 5:case"end":return e.stop()}},e)})),a.handleClgChange=function(e,t){a.setState({fcollcode:t.value})},a.renderHeader=function(){return m.a.createElement(b.a.Header,{style:{display:"flex"}},m.a.createElement("h4",null,"College Wise Intake"),m.a.createElement("div",{className:"ml-auto"},m.a.createElement(g.a,{disabled:a.state.saveButton,basic:!0,color:"green",content:"Save",onClick:a.handleSave,icon:"save"}),m.a.createElement(g.a,{basic:!0,onClick:Object(p.a)(s.a.mark(function e(){return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return a.props.cancelCollegeComb(),e.next=3,a.setState({dropDisable:!1,saveButton:!0});case 3:return e.next=5,a.setState({showTable:!1});case 5:return e.next=7,a.setState({fcollcode:""});case 7:case"end":return e.stop()}},e)})),color:"black",icon:"ban",content:"Cancel"}),m.a.createElement(A.a,{to:"/dashboard"},m.a.createElement(g.a,{basic:!0,color:"red",content:"Exit",icon:"home"}))))},a}return Object(l.a)(t,e),Object(r.a)(t,[{key:"componentDidMount",value:function(){this.props.getCollegeList()}},{key:"render",value:function(){var e=this.props.collegeList.map(function(e){return{value:e.fcollcode,text:"".concat(e.fcollcode," ").concat(e.fcollname)}}),t=this.props.collcomb,a=Object(L.i)();return m.a.createElement("div",{className:"animated fadeIn"},m.a.createElement(b.a,{fluid:!0},m.a.createElement(b.a.Content,null,this.renderHeader(),m.a.createElement(E.a,null),m.a.createElement(b.a.Description,{style:{height:"".concat(a,"px"),overflowY:"auto"}},m.a.createElement("div",{className:"col-md-12"},m.a.createElement(w.a,null,m.a.createElement(w.a.Group,null,m.a.createElement(w.a.Field,{width:16},m.a.createElement("label",null,"College List"),m.a.createElement(h.a,{size:"mini",fluid:!0,disabled:!!this.state.dropDisable,openOnFocus:!1,selectOnBlur:!1,searchInput:{autoFocus:!0},placeholder:"Select College",name:"fcollcode",selection:!0,search:!0,value:this.state.fcollcode,options:e,onChange:this.handleClgChange}))),m.a.createElement(E.a,null),m.a.createElement(g.a,{disabled:""==this.state.fcollcode,onClick:this.getCollComb,color:"blue",content:"Submit"})),this.state.showTable&&m.a.createElement(m.a.Fragment,null,m.a.createElement(v.a,{celled:!0},m.a.createElement(v.a.Header,null,m.a.createElement(v.a.Row,null,m.a.createElement(v.a.HeaderCell,{colSpan:"9"},"Combination Wise Intake",m.a.createElement("b",{style:{float:"right"}},m.a.createElement(g.a,{basic:!0,color:"blue",content:"Add Row",icon:"plus",onClick:this.onadd}))))),m.a.createElement(v.a.Header,null,m.a.createElement(v.a.Row,null,m.a.createElement(v.a.HeaderCell,{style:{width:"5%"},singleLine:!0,textAlign:"center"},"Sl. No."),m.a.createElement(v.a.HeaderCell,{style:{width:"30%"},textAlign:"center"},"Degree"),m.a.createElement(v.a.HeaderCell,{style:{width:"5%"},textAlign:"center"},"Semester"),m.a.createElement(v.a.HeaderCell,{style:{width:"30%"},textAlign:"center"},"Combination"),m.a.createElement(v.a.HeaderCell,{style:{width:"5%"},textAlign:"center"},"Intake"),m.a.createElement(v.a.HeaderCell,{style:{width:"5%"},textAlign:"center"},"Del"))),m.a.createElement(v.a.Body,null,t.map(function(e,t){return m.a.createElement(v.a.Row,{key:t},m.a.createElement(F,{el:e,i:t}))}))))),m.a.createElement(E.a,null)))))}}]),t}(f.Component);t.default=Object(O.b)(function(e){return{collegeList:e.collegeList,collcomb:e.studentDegreeCombintaion.particular_college_data}},{StudentDegreeCombinationADDrow:D,studentDegreeCombintaion:y,showErrorType:k,changeAdmissionData:j,getCollegeList:S.e,saveDegreeCombintaion:function(e,t,a,n,r){return function(){var e=Object(p.a)(s.a.mark(function e(o,c){var l,i,u,d,p,f,m;return s.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(l=c(),!n){e.next=6;break}i={header:"Error",content:"You have empty data"},o(Object(x.w)(i)),e.next=17;break;case 6:if(!a){e.next=11;break}u={header:"Error",content:"You have dupilcate data"},o(Object(x.w)(u)),e.next=17;break;case 11:return o({type:"SET_LOADER"}),e.next=14,C.a.post("app.php?a=submitSubjectCombination&univcode="+l.univ.funivcode+"&fcollcode="+t,{submit:r});case 14:d=e.sent,o({type:"UNSET_LOADER"}),"object"!==typeof d.data?(p={header:"Error",content:"Something went wrong"},o(Object(x.w)(p))):-1===d.data.error_code?(f={header:"Error",content:d.data.msg},o(Object(x.w)(f))):(m={header:"Success",content:d.data.msg},o(Object(x.w)(m)));case 17:case"end":return e.stop()}},e)}));return function(t,a){return e.apply(this,arguments)}}()},cancelCollegeComb:function(){return{type:"CANCEL_COLLEGECOMB"}}})(I)},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),i=a.n(l),s=a(333),u=a(551),d=a(549),p=a(267);function f(e){var t=e.children,a=e.className,n=e.clearing,o=e.content,l=e.fitted,m=e.hidden,h=e.horizontal,b=e.inverted,g=e.section,E=e.vertical,w=c()("ui",Object(s.a)(n,"clearing"),Object(s.a)(l,"fitted"),Object(s.a)(m,"hidden"),Object(s.a)(h,"horizontal"),Object(s.a)(b,"inverted"),Object(s.a)(g,"section"),Object(s.a)(E,"vertical"),"divider",a),v=Object(u.a)(f,e),O=Object(d.a)(f,e);return i.a.createElement(O,r()({},v,{className:w}),p.a.isNil(t)?o:t)}f.handledProps=["as","children","className","clearing","content","fitted","hidden","horizontal","inverted","section","vertical"],f.propTypes={},t.a=f},482:function(e,t,a){"use strict";a.d(t,"b",function(){return i}),a.d(t,"a",function(){return s}),a.d(t,"e",function(){return u}),a.d(t,"c",function(){return d}),a.d(t,"d",function(){return p});var n=a(41),r=a.n(n),o=a(68),c=a(269),l=a(266),i=function(e,t){return{type:"COLLEGE_FORM",payload:{name:e,value:t}}},s=function(){return{type:"CANCEL_FORM",payload:1}},u=function(){return function(){var e=Object(o.a)(r.a.mark(function e(t,a){var n,o,i,s;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=a(),t({type:"SET_LOADER"}),e.next=4,c.a.get("app.php?a=GetAllCollegeList&univcode="+n.univ.funivcode);case 4:o=e.sent,t({type:"UNSET_LOADER"}),"object"!==typeof o.data?(i={header:"Error",content:"Something went wrong"},t(Object(l.w)(i))):-1===o.data.error_code?(s={header:"Error",content:o.data.data.msg},t(Object(l.w)(s))):t({type:"ALL_COLLEGE_LIST",payload:o.data});case 7:case"end":return e.stop()}},e)}));return function(t,a){return e.apply(this,arguments)}}()},d=function(e){return function(){var t=Object(o.a)(r.a.mark(function t(a,n){var o,i,s,u;return r.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o=n(),a({type:"SET_LOADER"}),t.next=4,c.a.get("app.php?a=GetSpecificCollege&collcode="+e+"&univcode="+o.univ.funivcode);case 4:i=t.sent,a({type:"UNSET_LOADER"}),"object"!==typeof i.data?(s={header:"Error",content:"Something went wrong"},a(Object(l.w)(s))):-1===i.data.error_code?(u={header:"Error",content:i.data.data.msg},a(Object(l.w)(u))):a({type:"GET_SPECIFIC_COLLEGE",payload:i.data});case 7:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()},p=function(e){return console.log(e),function(){var t=Object(o.a)(r.a.mark(function t(a,n){var o,i,s,u,d;return r.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return a({type:"SET_LOADER"}),o=n(),t.next=4,c.a.post("/app.php?a=InsertOrUpdateCollegeDetails&univcode="+o.univ.funivcode,{data:e});case 4:i=t.sent,a({type:"UNSET_LOADER"}),console.log("response",i,typeof i.data),"object"!==typeof i.data?(s={header:"Error",content:"Something went wrong"},a(Object(l.w)(s))):-1===i.data.error_code?(u={header:"Error",content:i.data.data.msg},a(Object(l.w)(u))):(d={header:"Success",content:i.data.msg},a(Object(l.w)(d)));case 8:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()}}}]);
//# sourceMappingURL=109.b43f796c.chunk.js.map
|