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.148.108.174
(window.webpackJsonp=window.webpackJsonp||[]).push([[147],{1129:function(e,a,t){"use strict";t.r(a);var n=t(2),r=t(41),l=t.n(r),c=t(68),o=t(99),s=t(100),u=t(102),i=t(101),d=t(103),p=t(1),m=t.n(p),h=t(1139),f=t(1106),b=t(272),g=t(1098),E=t(317),C=t(1100),x=t(998),v=t(858),y=t(104),k=t(266),w=t(330),S=t(273),j=t.n(S),D=t(3),O=t(0),I=t(1101),T=function(e){function a(){var e,t;Object(o.a)(this,a);for(var n=arguments.length,r=new Array(n),s=0;s<n;s++)r[s]=arguments[s];return(t=Object(u.a)(this,(e=Object(i.a)(a)).call.apply(e,[this].concat(r)))).state={},t.changeCell=function(e,a,n){var r={};if("checkbox"==e.type){var l=e.checked?"T":"F";r=Object(O.a)({},a,Object(D.a)({},e.name,l)),t.props.changeSublvl(r,n)}else{var c;if("fsmaxmarks"==e.name)r=Object(O.a)({},a,(c={},Object(D.a)(c,e.name,e.value),Object(D.a)(c,"fvalmax",e.value),c)),t.props.changeSublvl(r,n);else r=Object(O.a)({},a,Object(D.a)({},e.name,e.value)),t.props.changeSublvl(r,n)}},t.add=Object(c.a)(l.a.mark(function e(){var a,n,r;return l.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a=t.props.subjectData.sublvl.length,""!==(n=t.props.subjectData.sublvl[a-1]).fssubcode&&""!==n.fssubname){e.next=6;break}return r={header:"Error",content:"Fill Details to Add next Row. "},t.props.showError(r),e.abrupt("return");case 6:return"ADD_SUBLVL",e.next=9,t.props.addRow("ADD_SUBLVL");case 9:t.setState({fssubcodeDis:!0});case 10:case"end":return e.stop()}},e)})),t}return Object(d.a)(a,e),Object(s.a)(a,[{key:"render",value:function(){var e=this,a=this.props.subjectData.sublvl;console.log("fssubcodefssubcode",a);var t=this.props.disabledStats;return m.a.createElement("div",{style:{overflowX:"scroll"},className:"mt-5"},m.a.createElement(I.a,{celled:!0,compact:!0},m.a.createElement(I.a.Header,null,m.a.createElement(I.a.Row,null,m.a.createElement(I.a.HeaderCell,{colSpan:"16",textAlign:"right"},m.a.createElement(f.a,{basic:!0,size:"small",onClick:this.add,color:"green",icon:"plus",content:"Add"}))),m.a.createElement(I.a.Row,{textAlign:"center"},m.a.createElement(I.a.HeaderCell,{width:"1"},"Code"),m.a.createElement(I.a.HeaderCell,{width:"9"},"Description"),m.a.createElement(I.a.HeaderCell,{width:"1"},"Short Name"),m.a.createElement(I.a.HeaderCell,{width:"1"},"Th"),m.a.createElement(I.a.HeaderCell,{width:"1"},"IA/ Viva"),m.a.createElement(I.a.HeaderCell,{width:"4"},"Retain Marks?"),m.a.createElement(I.a.HeaderCell,{width:"1"},"Group"),m.a.createElement(I.a.HeaderCell,{width:"1"},"Max. Marks"),m.a.createElement(I.a.HeaderCell,{width:"1"},"Min. Marks"),m.a.createElement(I.a.HeaderCell,{width:"1"},"Parent Sub"),m.a.createElement(I.a.HeaderCell,{width:"1"},"Mod Marks"),m.a.createElement(I.a.HeaderCell,{width:"1"},"Grace"),m.a.createElement(I.a.HeaderCell,{width:"1"},"Code No."),m.a.createElement(I.a.HeaderCell,{width:"1"},"QP Code"),m.a.createElement(I.a.HeaderCell,{width:"1"},"Val Max"),m.a.createElement(I.a.HeaderCell,{width:"1"},"Del?"))),m.a.createElement(I.a.Body,null,a.map(function(a,n){return console.log(a.fssubcode),m.a.createElement(I.a.Row,{key:n},m.a.createElement(I.a.Cell,{style:{padding:"0px 0px"},textAlign:"center"},m.a.createElement(g.a.Input,{style:{width:"50px"},type:"text",value:a.fssubcode,name:"fssubcode",readOnly:t,onChange:function(t,r){return e.changeCell(r,a,n)}})),m.a.createElement(I.a.Cell,{style:{padding:"0px 0px"}},m.a.createElement(g.a.Input,{type:"text",value:a.fssubname,style:{width:"100%"},name:"fssubname",onChange:function(t,r){return e.changeCell(r,a,n)}})),m.a.createElement(I.a.Cell,{style:{padding:"0px 0px"}},m.a.createElement(g.a.Input,{type:"text",name:"fshortname",value:a.fshortname,style:{width:"70px"},onChange:function(t,r){return e.changeCell(r,a,n)}})),m.a.createElement(I.a.Cell,{textAlign:"center",style:{padding:"0px 0px"}},m.a.createElement(g.a.Checkbox,{value:"T",name:"ftheory",checked:"T"==a.ftheory,onChange:function(t,r){return e.changeCell(r,a,n)}})),m.a.createElement(I.a.Cell,{textAlign:"center",style:{padding:"0px 0px"}},m.a.createElement(g.a.Checkbox,{value:"T",name:"fintass",checked:"T"==a.fintass,onChange:function(t,r){return e.changeCell(r,a,n)}})),m.a.createElement(I.a.Cell,{textAlign:"center",style:{padding:"0px 0px"}},m.a.createElement(g.a.Checkbox,{value:"T",name:"fretain",onChange:function(t,r){return e.changeCell(r,a,n)},checked:"T"==a.fretain})),m.a.createElement(I.a.Cell,{style:{padding:"0px 0px"}},m.a.createElement(g.a.Input,{type:"text",name:"fgroup",value:a.fgroup,style:{width:"70px"},maxLength:1,onChange:function(t,r){r.value=r.value.toUpperCase(),e.changeCell(r,a,n)}})),m.a.createElement(I.a.Cell,{style:{padding:"0px 0px"}},m.a.createElement(g.a.Input,{type:"text",name:"fsmaxmarks",value:a.fsmaxmarks,style:{width:"100px"},onChange:function(t,r){return e.changeCell(r,a,n)}})),m.a.createElement(I.a.Cell,{style:{padding:"0px 0px"}},m.a.createElement(g.a.Input,{type:"text",name:"fsminmarks",value:a.fsminmarks,style:{width:"100px"},onChange:function(t,r){return e.changeCell(r,a,n)}})),m.a.createElement(I.a.Cell,{style:{padding:"0px 0px"}},m.a.createElement(g.a.Input,{type:"text",name:"fparentsub",value:a.fparentsub,style:{width:"70px"},onChange:function(t,r){return e.changeCell(r,a,n)}})),m.a.createElement(I.a.Cell,{style:{padding:"0px 0px"}},m.a.createElement(g.a.Input,{type:"text",name:"fmodmarks",value:a.fmodmarks,style:{width:"60px"},onChange:function(t,r){return e.changeCell(r,a,n)}})),m.a.createElement(I.a.Cell,{textAlign:"center",style:{padding:"0px 0px"}},m.a.createElement(g.a.Checkbox,{value:"T",name:"fgrace",checked:"T"==a.fgrace,onChange:function(t,r){return e.changeCell(r,a,n)}})),m.a.createElement(I.a.Cell,{textAlign:"center",style:{padding:"0px 0px"}},m.a.createElement(g.a.Checkbox,{value:"T",name:"fcodeno",checked:"T"==a.fcodeno,onChange:function(t,r){return e.changeCell(r,a,n)}})),m.a.createElement(I.a.Cell,{style:{padding:"0px 0px"}},m.a.createElement(g.a.Input,{type:"text",name:"fqpcode",value:a.fqpcode,style:{width:"100px"},onChange:function(t,r){return e.changeCell(r,a,n)}})),m.a.createElement(I.a.Cell,{style:{padding:"0px 0px"}},m.a.createElement(g.a.Input,{type:"text",name:"fvalmax",value:a.fvalmax,style:{width:"50px"},onChange:function(t,r){return e.changeCell(r,a,n)}})),m.a.createElement(I.a.Cell,{textAlign:"center",style:{padding:"0px 0px"}},m.a.createElement(g.a.Checkbox,{value:"T",name:"fdeleted",checked:"T"==a.fdeleted,onChange:function(t,r){return e.changeCell(r,a,n)}})))}))))}}]),a}(p.Component),A=Object(y.b)(function(e){return{subjectData:e.subjectData}},{showError:k.w,changeSublvl:w.d,addRow:w.a})(T),M=t(1096),F=function(e){function a(){var e,t;Object(o.a)(this,a);for(var n=arguments.length,r=new Array(n),l=0;l<n;l++)r[l]=arguments[l];return(t=Object(u.a)(this,(e=Object(i.a)(a)).call.apply(e,[this].concat(r)))).state={fdegree:"",fsubcode:""},t.handleChange=function(e,a){console.log(a),t.setState(Object(D.a)({},a.name,a.value))},t.getSubectDetails=function(){var e=t.state,a=e.fdegree,n=e.fsubcode;if(""==n){t.props.showError({header:"Error",content:"Please Enter Subject Code"})}var r=a,l=n.split(","),c=n;void 0==l[1]?(r=t.props.degree,c=n):(r=l[0],c=l[1]),t.props.getOldSubDet(r,c),t.props.close()},t}return Object(d.a)(a,e),Object(s.a)(a,[{key:"render",value:function(){var e=this,a=this.state,t=(a.fdegree,a.fsubcode);return m.a.createElement("div",null,m.a.createElement(M.a,{style:{maxHeight:"60%",width:"50%"},dimmer:this.props.dim,open:this.props.open,onClose:this.props.close,closeOnDimmerClick:!1},m.a.createElement(M.a.Header,{style:{display:"flex"}},"Get Subject Details",m.a.createElement("div",{className:"ml-auto"},m.a.createElement(f.a,{basic:!0,color:"blue",content:"Submit",onClick:this.getSubectDetails,icon:"file pdf outline"}),m.a.createElement(f.a,{basic:!0,color:"black",icon:"ban",onClick:this.props.close,content:"Cancel"}))),m.a.createElement(M.a.Content,{style:{height:"40vh",overflowY:"auto"}},m.a.createElement(g.a,null,m.a.createElement(g.a.Group,null,m.a.createElement(g.a.Input,{placeholder:"Enter equivalent subject, if any (Different Course seperate by comma. Ex: BSC,A010', 'Subject code')",value:t,width:10,name:"fsubcode",label:"Enter equivalent subject, if any (Different Course seperate by comma. Ex: BSC,A010', 'Subject code')",onChange:function(a,t){return e.handleChange(a,t)}}))))))}}]),a}(p.Component),N=Object(y.b)(function(e){return{deggrp:e.deggrp,univ:e.univ}},{showError:k.w,getOldSubDet:w.f})(F),L=t(270),P=function(e){function a(){var e,t;Object(o.a)(this,a);for(var r=arguments.length,s=new Array(r),d=0;d<r;d++)s[d]=arguments[d];return(t=Object(u.a)(this,(e=Object(i.a)(a)).call.apply(e,[this].concat(s)))).state={fsubject:"",SubjectOpt:[],Disable:!1,fltp:"",open:!1,fssubcodeDis:!0,crdisable:!0},t.componentDidMount=Object(c.a)(l.a.mark(function e(){return l.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.props.fetchDegrees(t.props.user.fdeggrp);case 2:case"end":return e.stop()}},e)})),t.componentDidUpdate=function(e){t.props.getSubjects!==e.getSubjects&&t.setState({SubjectOpt:t.props.getSubjects})},t.show=function(){return t.setState({open:!0})},t.close=function(){t.setState({open:!1})},t.handleMaskChange=function(){var e=Object(c.a)(l.a.mark(function e(a){return l.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:t.setState({fltp:a.target.value},function(){return t.props.changeSubDet("fltp",t.state.fltp)});case 1:case"end":return e.stop()}},e)}));return function(a){return e.apply(this,arguments)}}(),t.handleChange=function(){var e=Object(c.a)(l.a.mark(function e(a,n){var r,c;return l.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=n.name,c=n.value,e.next=3,t.props.changeSubDet(r,c);case 3:if("fdegree"!=r){e.next=6;break}return e.next=6,t.props.getExamNo(c);case 6:if("fexamno"!=r&&("fdegree"!=r||""==t.props.subjectData.mainlvl.fexamno)){e.next=12;break}return e.next=9,t.props.getSubDet();case 9:return e.next=11,t.props.fetchBoards();case 11:"T"==t.props.ExamNoDet[0].FCREDIT&&t.setState({crdisable:!1});case 12:case"end":return e.stop()}},e)}));return function(a,t){return e.apply(this,arguments)}}(),t.handleSubjects=function(){var e=Object(c.a)(l.a.mark(function e(a,n){var r,c;return l.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=n.name,c=n.value,void 0==t.state.SubjectOpt.filter(function(e,a){return e.fsubcode==c.toUpperCase()})[0]){e.next=8;break}return e.next=5,t.props.changeSubDet(r,c);case 5:return e.next=7,t.props.getSubjectDet(c);case 7:t.setState({Disable:!0});case 8:case"end":return e.stop()}},e)}));return function(a,t){return e.apply(this,arguments)}}(),t.handleAddition=function(){var e=Object(c.a)(l.a.mark(function e(a,r){var c,o,s;return l.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(c=r.name,o=r.value,s={header:"Error",content:"Subject code can only have 4 characters."},t.show(),!(o.length>4)){e.next=7;break}t.props.showError(s),e.next=9;break;case 7:return e.next=9,t.setState({SubjectOpt:[].concat(Object(n.a)(t.state.SubjectOpt),[{fsubcode:o.toUpperCase()}])});case 9:t.props.changeSubDet(c,o),""==t.props.subjectData.sublvl[0].fssubcode&&t.setState({fssubcodeDis:!1});case 11:case"end":return e.stop()}},e)}));return function(a,t){return e.apply(this,arguments)}}(),t.handleChangedata=function(e,a){"fsubname"==a.name?(t.props.changeSubDet(a.name,a.value),t.props.changeSubDet("fmarkdesc1",a.value),t.props.changeSubDet("fsubshort",a.value.substring(0,4))):t.props.changeSubDet(a.name,a.value)},t.handleChekbox=function(e,a){var n=a.checked?"T":"F";t.props.changeSubDet(a.name,n)},t.handleSave=Object(c.a)(l.a.mark(function e(){var a,n,r,c,o,s,u,i,d,p,m;return l.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:for(a=t.props.subjectData.mainlvl,n=t.props.subjectData.sublvl,r="",""!=a.fdegree&&""!=a.fexamno||(r={header:"Error",content:"Please select Degree and Exam No."}),""!=a.fsubcode&&""!=a.fsubname||(r={header:"Error",content:"Subject Code or Subject Name cannot be empty."}),console.log(a.fblockno),""!=a.fblockno&&null!=a.fblockno&&(a.fblockno<=0||a.fblockno>9)&&(r={header:"Error",content:"Block No should be between 1 and 8."}),""==a.fboard&&(r={header:"Error",content:"Please select Board."}),(null==a.fmaxmarks||a.fmaxmarks<=0)&&(r={header:"Error",content:"Max. marks should be greater than 0"}),null==a.fminmarks||""==a.fminmarks?r={header:"Error",content:"Min. marks should not be Empty"}:parseInt(a.fminmarks)>parseInt(a.fmaxmarks)&&(r={header:"Error",content:"Min. marks should be less than max. marks"}),c=0,o=0,s=0;s<n.length;s++)c=parseInt(c)+parseInt(n[s].fsminmarks),o=parseInt(o)+parseInt(n[s].fsmaxmarks);if(null==a.ftheorymin||""==a.ftheorymin?r={header:"Error",content:"Theory Min. marks should not be Empty"}:parseInt(a.fminmarks)<parseInt(c)&&(r={header:"Error",content:"Theory min. marks should not be lesser than element min. marks"}),parseInt(a.fminmarks)>parseInt(o)&&(r={header:"Error",content:"Theory min. marks should not be > element max. marks"}),parseInt(a.fminmarks)>parseInt(a.fthelig)&&(0!=parseInt(a.fthelig)||0!=parseInt(a.fthelig))&&(r={header:"Error",content:"Theory min. marks should not be greater than theory exemption marks"}),(parseInt(a.ftheorymin)<=0||parseInt(a.ftheorymin)>parseInt(a.fminmarks))&&(r={header:"Error",content:"Min. marks to pass in Theory should be >= 0 and <= min marks"}),parseInt(a.fpractmin)>parseInt(c)&&(r={header:"Error",content:"Practical min. marks should not be < element min. marks"}),parseInt(a.fpractmin)>parseInt(o)&&(r={header:"Error",content:"Practical min. marks should not be > element max. marks"}),parseInt(a.fpractmin)>parseInt(a.fprelig)&&(r={header:"Error",content:"Practical min. marks should not be greater than practical exemption marks"}),((""!=parseInt(a.fpractmin)||0!=parseInt(a.fpractmin))&&parseInt(a.fpractmin)<0||parseInt(a.fpractmin)>parseInt(a.fminmarks)-parseInt(a.ftheorymin))&&(r={header:"Error",content:"Min. marks to pass in Practical should be >= 0 and <= min marks - theory min"}),console.log(a.fltp,a.fcredits),u=a.fltp.split(":"),i=u[0],d=u[1],p=u[2],m=parseInt(i)+parseInt(d)+parseInt(p),parseInt(m)!=parseInt(a.fcredits)&&"T"==t.props.ExamNoDet[0].FCREDIT&&(r={header:"Error",content:"LTP and Total Credits are not matching"}),""==r){e.next=33;break}return e.next=31,t.props.showError(r);case 31:e.next=35;break;case 33:return e.next=35,t.props.saveSubDet();case 35:return e.abrupt("return",t.setState({Disable:!1}));case 36:case"end":return e.stop()}},e)})),t.cancel=function(){t.props.cancelDet(),t.setState({Disable:!1})},t.delete=Object(c.a)(l.a.mark(function e(){var a,n,r,c,o,s;return l.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(""!=t.props.subjectData.mainlvl.fdegree){e.next=6;break}return a={header:"Error",content:"Please Select Degree"},e.next=4,t.props.showError(a);case 4:e.next=24;break;case 6:if(""!=t.props.subjectData.mainlvl.fexamno){e.next=12;break}return n={header:"Error",content:"Please Select Semester"},e.next=10,t.props.showError(n);case 10:e.next=24;break;case 12:if(""!=t.props.subjectData.mainlvl.fsubcode){e.next=18;break}return r={header:"Error",content:"Please Select Subject"},e.next=16,t.props.showError(r);case 16:e.next=24;break;case 18:return c=t.props.subjectData.mainlvl.fdegree,o=t.props.subjectData.mainlvl.fexamno,s=t.props.subjectData.mainlvl.fsubcode,e.next=23,t.props.deleteSub(c,o,s);case 23:t.setState({Disable:!1});case 24:case"end":return e.stop()}},e)})),t}return Object(d.a)(a,e),Object(s.a)(a,[{key:"render",value:function(){var e=this,a=this.props.ExamNoDet,t=this.props.degrees,n=this.state.SubjectOpt,r=this.props.subjectData.mainlvl,l=this.props.board,c=this.state,o=c.open,s=c.crdisable;return m.a.createElement(m.a.Fragment,null,m.a.createElement(h.a,{fluid:!0},m.a.createElement(h.a.Content,null,m.a.createElement(h.a.Header,{style:{display:"flex"}},m.a.createElement("h3",null,"Subject Entry"),m.a.createElement("div",{className:"ml-auto"},m.a.createElement(f.a,{basic:!0,color:"green",content:"Save",onClick:this.handleSave,icon:"upload"}),m.a.createElement(f.a,{basic:!0,onClick:this.delete,color:"red",icon:"trash",content:"Delete"}),m.a.createElement(f.a,{basic:!0,onClick:this.cancel,color:"black",icon:"times circle",content:"Cancel"}),m.a.createElement(v.a,{to:"/dashboard"},m.a.createElement(f.a,{basic:!0,color:"red",content:"Exit",icon:"home"})))),m.a.createElement(b.a,null),m.a.createElement(h.a.Description,null,m.a.createElement(g.a,null,m.a.createElement(E.a,{columns:"three",divided:!0,className:"mt-3"},m.a.createElement(E.a.Column,{width:6},m.a.createElement(g.a.Group,{style:{marginBottom:"1em"}},m.a.createElement(g.a.Field,{width:16},m.a.createElement("label",null,"Degree"),m.a.createElement(C.a,{search:!0,placeholder:"Degrees",selection:!0,options:t.map(function(e,a){return{key:a,value:e.fdegree,text:"".concat(e.fdegree," - ").concat(e.fdescpn)}}),name:"fdegree",value:r.fdegree,onChange:this.handleChange,disabled:this.state.Disable}))),m.a.createElement(g.a.Group,{style:{marginBottom:"1em"}},m.a.createElement(g.a.Field,null,m.a.createElement("label",null,"Exam No."),m.a.createElement(C.a,{placeholder:"Exam No.",search:!0,selection:!0,id:"fexamno",name:"fexamno",value:r.fexamno,options:a.map(function(e,a){return{key:a,value:e.FEXAMNO,text:"".concat(e.FEXAMNAME)}}),onChange:this.handleChange,disabled:this.state.Disable}))),m.a.createElement(g.a.Group,{style:{marginBottom:"1em"}},m.a.createElement(g.a.Field,{width:4},m.a.createElement("label",null,"Subject Code"),m.a.createElement(C.a,{compact:!0,placeholder:"Select",search:!0,selection:!0,allowAdditions:!0,openOnFocus:!1,selectOnBlur:!1,onAddItem:function(a,t){t.value=t.value.toUpperCase(),e.handleAddition(a,t)},id:"fsubject",searchQuery:this.state.fsubject,onSearchChange:function(a,t){var n=t.searchQuery;e.setState({fsubject:n.toUpperCase()})},name:"fsubcode",maxLength:"4",value:r.fsubcode,options:n.map(function(e,a){return{key:a,value:e.fsubcode,text:"".concat(e.fsubcode)}}),onChange:function(a,t){t.value=t.value.toUpperCase(),e.handleSubjects(a,t)},disabled:this.state.Disable})),m.a.createElement(g.a.Field,{width:12},m.a.createElement(g.a.Input,{placeholder:"Subject Name",value:r.fsubname,label:"Subject Name",name:"fsubname",onChange:this.handleChangedata}))),m.a.createElement(g.a.Group,{style:{marginBottom:"1em"}},m.a.createElement(g.a.Field,{width:5},m.a.createElement(g.a.Input,{placeholder:"Credits",value:r.fcredits,label:"Credits",name:"fcredits",maxLength:"2",disabled:s,onKeyPress:L.d,onChange:this.handleChangedata})),m.a.createElement(g.a.Field,{width:6},m.a.createElement(g.a.Input,{placeholder:"Th. Credits",value:r.fthcr,label:"Th. Credits",maxLength:"2",onKeyPress:L.d,name:"fthcr",disabled:s,onChange:this.handleChangedata})),m.a.createElement(g.a.Field,{width:5},m.a.createElement(g.a.Input,{placeholder:"Pr. Credits",value:r.fprcr,label:"Pr. Credits",maxLength:"2",onKeyPress:L.d,name:"fprcr",disabled:s,onChange:this.handleChangedata}))),m.a.createElement(g.a.Field,null,m.a.createElement(g.a.Input,{placeholder:"Subject Name for Marks Card",value:r.fmarkdesc1,label:"Subject Name for Marks Card",name:"fmarkdesc1",maxLength:"50",onChange:this.handleChangedata})),m.a.createElement(g.a.Field,null,m.a.createElement(g.a.Input,{placeholder:"FMARKDESC2",value:r.fmarkdesc2,maxLength:"50",name:"fmarkdesc2",onChange:this.handleChangedata}))),m.a.createElement(E.a.Column,{width:5},m.a.createElement(g.a.Group,{style:{marginBottom:"1em"}},m.a.createElement(g.a.Field,{width:8},m.a.createElement(g.a.Input,{placeholder:"Short Name",value:r.fsubshort,label:"Subject Short Name",name:"fsubshort",maxLength:"12",onChange:this.handleChangedata})),m.a.createElement(g.a.Field,{width:8},m.a.createElement(g.a.Input,{placeholder:"Block No.",value:r.fblockno,label:"Block No.",name:"fblockno",maxLength:"1",onKeyPress:L.f,onChange:this.handleChangedata}))),m.a.createElement(g.a.Group,null,m.a.createElement(g.a.Field,{width:8},m.a.createElement(g.a.Input,{placeholder:"Maximum Marks",value:r.fmaxmarks,label:"Maximum Marks",name:"fmaxmarks",maxLength:"4",onKeyPress:L.f,onChange:this.handleChangedata})),m.a.createElement(g.a.Field,{width:8},m.a.createElement(g.a.Input,{placeholder:"Minimum Marks",value:r.fminmarks,label:"Minimum Marks",name:"fminmarks",maxLength:"4",onKeyPress:L.f,onChange:this.handleChangedata}))),m.a.createElement(g.a.Group,{style:{marginBottom:"1em"}},m.a.createElement(g.a.Field,{width:8},m.a.createElement(g.a.Input,{placeholder:"Theory Ex. Marks",value:r.fthelig,label:"Th. Ex. Marks",name:"fthelig",onChange:function(a,t){t.value=t.value.toUpperCase(),e.handleChangedata(a,t)}})),m.a.createElement(g.a.Field,{width:8},m.a.createElement(g.a.Input,{placeholder:"Practical Ex. Marks",value:r.fprelig,label:"Pr. Ex. Marks",name:"fprelig",onChange:this.handleChangedata}))),m.a.createElement(g.a.Group,{style:{marginBottom:"1em"}},m.a.createElement(g.a.Field,{width:8},m.a.createElement(g.a.Input,{placeholder:"Theory Min.",value:r.ftheorymin,label:"Theory Min",name:"ftheorymin",onChange:this.handleChangedata})),m.a.createElement(g.a.Field,{width:8},m.a.createElement(g.a.Input,{placeholder:"Practical Min.",value:r.fpractmin,label:"Practical Min.",name:"fpractmin",onChange:this.handleChangedata}))),m.a.createElement(g.a.Group,{style:{marginBottom:"1em"}},m.a.createElement(g.a.Field,{width:8},m.a.createElement(g.a.Input,{placeholder:"Ex. Sub Code",value:r.fexsubcode,label:"Ex. Sub Code",name:"fexsubcode",onChange:function(a,t){t.value=t.value.toUpperCase(),e.handleChangedata(a,t)}})),m.a.createElement(g.a.Field,{width:8},m.a.createElement(g.a.Input,{placeholder:"Print Order",value:r.fprintord,label:"Print Order",name:"fprintord",maxLength:"3",onKeyPress:L.f,onChange:this.handleChangedata})))),m.a.createElement(E.a.Column,{width:5},m.a.createElement(g.a.Group,{style:{marginBottom:"1em"}},m.a.createElement(g.a.Field,{width:9},m.a.createElement(g.a.Input,{placeholder:"Carry Upto",value:r.fcarryupto,label:"Carry Upto",name:"fcarryupto",maxLength:"1",onChange:function(a,t){t.value=t.value.toUpperCase(),e.handleChangedata(a,t)}})),m.a.createElement(g.a.Field,{width:9},m.a.createElement("label",null," L /T /P "),m.a.createElement(j.a,{type:"text",formatChars:{n:"[0-9]",m:"[0-9]",e:"[0-9]",d:"[0-9]",z:"[0-9]",y:"[0-9]"},mask:"e:e:e",placeholder:"L:T:P",name:"fltp",value:r.fltp,disabled:s,onChange:this.handleMaskChange}))),m.a.createElement(g.a.Group,{style:{marginBottom:"1em"}},m.a.createElement(g.a.Field,{width:8},m.a.createElement(g.a.Input,{placeholder:"Departmen Code",value:r.fdeptcode,label:"Departmen Code",name:"fdeptcode",onChange:this.handleChangedata})),m.a.createElement(g.a.Field,{width:8},m.a.createElement("label",null,"Board"),m.a.createElement(C.a,{compact:!0,search:!0,selection:!0,value:r.fboard,name:"fboard",options:l.map(function(e,a){return{key:a,value:e.fboardcode,text:"".concat(e.fboardname)}}),onChange:this.handleChangedata}))),m.a.createElement(E.a.Column,null,m.a.createElement(g.a.Group,null,m.a.createElement(g.a.Field,{width:8},m.a.createElement(g.a.Input,{placeholder:"Th. Teach Hrs.",value:r.fthhrs,label:"Th. Teach Hrs.",name:"fthhrs",onChange:this.handleChangedata})),m.a.createElement(g.a.Field,{width:8},m.a.createElement(g.a.Input,{placeholder:"Pr. Teach Hrs.",value:r.fprhrs,label:"Pr. Teach Hrs.",name:"fprhrs",onChange:this.handleChangedata})))),m.a.createElement(E.a.Column,{style:{marginLeft:"1rem"}},m.a.createElement(g.a.Field,{control:x.a,label:"Mandatory",value:r.fmandatory,name:"fmandatory",checked:"T"==r.fmandatory,onChange:this.handleChekbox}),m.a.createElement(g.a.Field,{control:x.a,label:"Subsidary",value:r.fsubsidary,name:"fsubsidary",checked:"T"==r.fsubsidary,onChange:this.handleChekbox}),m.a.createElement(g.a.Field,{control:x.a,label:"Suspended",value:r.fsuspend,name:"fsuspend",checked:"T"==r.fsuspend,onChange:this.handleChekbox}))))),m.a.createElement(A,{disabledStats:this.state.fssubcodeDis}),m.a.createElement(N,{open:o,dim:"blurring",close:this.close,degree:r.fdegree})))))}}]),a}(p.Component);a.default=Object(y.b)(function(e){return{user:e.user,degrees:e.degrees,board:e.board,ExamNoDet:e.getExmNo,getSubjects:e.getSubjects,subjectData:e.subjectData}},{fetchDegrees:k.k,showError:k.w,getExamNo:k.q,changeSubDet:w.c,getSubDet:w.g,getSubjectDet:w.h,saveSubDet:w.i,fetchBoards:k.g,cancelDet:w.b,deleteSub:w.e})(P)},330:function(e,a,t){"use strict";t.d(a,"g",function(){return s}),t.d(a,"c",function(){return u}),t.d(a,"d",function(){return i}),t.d(a,"h",function(){return d}),t.d(a,"b",function(){return p}),t.d(a,"a",function(){return m}),t.d(a,"i",function(){return h}),t.d(a,"f",function(){return f}),t.d(a,"e",function(){return b});var n=t(41),r=t.n(n),l=t(68),c=t(269),o=t(266),s=function(){return function(){var e=Object(l.a)(r.a.mark(function e(a,t){var n,l,s,u;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t(),e.next=3,c.a.get("/app.php",{params:{a:"getSubDet",univcode:n.univ.funivcode,fdeggrp:n.user.fdeggrp,fdegree:n.subjectData.mainlvl.fdegree,fexamno:n.subjectData.mainlvl.fexamno}});case 3:"object"!==typeof(l=e.sent).data?(s={header:"Error",content:"Something went wrong"},a(Object(o.w)(s))):-1===l.data.error_code?(u={header:"Error",content:l.data.data.msg},a(Object(o.w)(u))):a({type:"GET_SUBJECTS",payload:l.data});case 5:case"end":return e.stop()}},e)}));return function(a,t){return e.apply(this,arguments)}}()},u=function(e,a){return{type:"CHANGE_SUB_DATA",payload:{name:e,value:a}}},i=function(e,a){return{type:"CHANGE_SUB_LVL",payload:{el:e,i:a}}},d=function(){return function(){var e=Object(l.a)(r.a.mark(function e(a,t){var n,l,s,u;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t(),a({type:"SET_LOADER"}),e.next=4,c.a.get("/app.php",{params:{a:"getSubjectData",univcode:n.univ.funivcode,fdegree:n.subjectData.mainlvl.fdegree,fexamno:n.subjectData.mainlvl.fexamno,fsubcode:n.subjectData.mainlvl.fsubcode}});case 4:l=e.sent,a({type:"UNSET_LOADER"}),console.log("Response",l),"object"!==typeof l.data?(s={header:"Error",content:"Something went wrong"},a(Object(o.w)(s))):-1===l.data.error_code?(u={header:"Error",content:l.data.data.msg},a(Object(o.w)(u))):a({type:"GET_SUBJECT_DATA",payload:l.data});case 8:case"end":return e.stop()}},e)}));return function(a,t){return e.apply(this,arguments)}}()},p=function(){return{type:"CANCEL_DET"}},m=function(e){return{type:e}},h=function(){return function(){var e=Object(l.a)(r.a.mark(function e(a,t){var n,l,s,u,i,d;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=t(),l=n.subjectData,a({type:"SET_LOADER"}),e.next=5,c.a.post("app.php?a=saveSubDet&univcode="+n.univ.funivcode,{data:l});case 5:s=e.sent,a({type:"UNSET_LOADER"}),"object"!==typeof s.data?(u={header:"Error",content:"Something went wrong"},a(Object(o.w)(u))):-1===s.data.error_code?(i={header:"Error",content:s.data.data.msg},a(Object(o.w)(i))):(d={header:"Success",content:s.data.data.msg},a(Object(o.w)(d)),a({type:"SUCC_SUBJECT"}));case 8:case"end":return e.stop()}},e)}));return function(a,t){return e.apply(this,arguments)}}()},f=function(e,a){return function(){var t=Object(l.a)(r.a.mark(function t(n,l){var s,u,i,d;return r.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return s=l(),n({type:"SET_LOADER"}),t.next=4,c.a.get("/app.php",{params:{a:"getSubjectData",univcode:s.univ.funivcode,fdegree:e,fsubcode:a,fexamno:s.subjectData.mainlvl.fexamno}});case 4:u=t.sent,n({type:"UNSET_LOADER"}),console.log("Response",u),"object"!==typeof u.data?(i={header:"Error",content:"Something went wrong"},n(Object(o.w)(i))):-1===u.data.error_code?(d={header:"Error",content:u.data.data.msg},n(Object(o.w)(d))):n({type:"GET_OLD_SUBJECT_DATA",payload:u.data});case 8:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()},b=function(e,a,t){return function(){var n=Object(l.a)(r.a.mark(function n(l,s){var u,i,d,p,m;return r.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return u=s(),l({type:"SET_LOADER"}),n.next=4,c.a.get("/app.php",{params:{a:"deleteSub",univcode:u.univ.funivcode,fdegree:e,fexamno:a,fsubcode:t}});case 4:i=n.sent,l({type:"UNSET_LOADER"}),"object"!==typeof i.data?(d={header:"Error",content:"Something went wrong"},l(Object(o.w)(d))):-1===i.data.error_code?(p={header:"Error",content:i.data.data.msg},l(Object(o.w)(p))):(m={header:"Success",content:i.data.data.msg},l(Object(o.w)(m)),l({type:"SUCC_SUBJECT"}));case 7:case"end":return n.stop()}},n)}));return function(e,a){return n.apply(this,arguments)}}()}}}]);
//# sourceMappingURL=147.a64ec70f.chunk.js.map
|