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 : 18.227.105.164
(window.webpackJsonp=window.webpackJsonp||[]).push([[179],{1025:function(e,r,t){"use strict";t.r(r);var a=t(41),n=t.n(a),o=t(68),s=t(69),c=t(1),u=t.n(c),l=t(627),E=t(1175),d=t(1139),m=t(1135),i=t(1106),h=t(272),g=t(1096),b=t(1098),f=t(1100),p=t(858),x=t(266),T=t(308),w=t(628),M=t(629),F=t(630),A=t(631),R=t(632),v=t(633),k=t(634),S=t(635),O=t(636),C=t(104),N=t(270);r.default=Object(C.b)(function(e){return{user:e.user,degSemList:e.getDegSemList,degsem:e.degsem}},{showError:x.w,getDegSemDetForEdit:T.f,changeDegSem:T.c,saveDegSemDet:T.i,emptyDegSem:T.e,getDegSemList:T.g,getNextDegree:T.h})(function(e){var r=Object(c.useState)(!1),t=Object(s.a)(r,2),a=t[0],x=t[1],T=Object(c.useState)(!1),C=Object(s.a)(T,2),D=C[0],j=C[1],G=Object(c.useState)(""),I=Object(s.a)(G,2),X=I[0],y=I[1],V=Object(c.useState)(0),P=Object(s.a)(V,2),B=P[0],U=P[1],L=Object(c.useState)(""),_=Object(s.a)(L,2),q=(_[0],_[1]),K=Object(c.useState)(""),H=Object(s.a)(K,2),Y=(H[0],H[1]);Object(c.useEffect)(function(){function r(){return(r=Object(o.a)(n.a.mark(function r(){return n.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,q(e.match.params.ifdegree);case 2:return r.next=4,Y(e.match.params.ifexamno);case 4:e.emptyDegSem(),e.getDegSemList(e.user.fdeggrp),"degree"!==e.match.params.ifdegree?(e.getDegSemDetForEdit(e.match.params.ifdegree,e.match.params.ifexamno),x(!0)):z.current.focus();case 7:case"end":return r.stop()}},r)}))).apply(this,arguments)}!function(){r.apply(this,arguments)}()},[e.match.params.ifdegree,e.match.params.ifexamno]);var J=function(r,t){var a=t.name,n=t.value;e.changeDegSem(a,n)},z=Object(c.useRef)(null),Q=Object(c.useRef)(null),W=function(){var r=Object(o.a)(n.a.mark(function r(){var t,a,o,s,c,u,l,E,d,m,i,h,g,b,f,p,x,T,w,M,F,A,R,v,k,S,O,C,N,D,j,G,I,X,y,V;return n.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(""!=e.degsem.FDEGREE){r.next=4;break}return t={header:"Error",content:"Enter Degree code!"},e.showError(t),r.abrupt("return");case 4:if(""!=e.degsem.FDESCPN){r.next=8;break}return a={header:"Error",content:"Enter Degree description!"},e.showError(a),r.abrupt("return");case 8:if(""!=e.degsem.FEXAMNO){r.next=12;break}return o={header:"Error",content:"Enter Exam no.!"},e.showError(o),r.abrupt("return");case 12:if(""!=e.degsem.FEXAMNAME){r.next=16;break}return s={header:"Error",content:"Enter Exam description!"},e.showError(s),r.abrupt("return");case 16:if(!(""!==e.degsem.FEXAMNAME&&e.degsem.FEXAMNAME.charCodeAt(0)<=e.degsem.FEXAMNO.charCodeAt(0))){r.next=20;break}return c={header:"Error",content:"Next exam should be greater than current exam."},e.showError(c),r.abrupt("return");case 20:if(""!=e.degsem.FCMAXTERMS){r.next=24;break}return u={header:"Error",content:"Enter Max. terms allowed for course completion!"},e.showError(u),r.abrupt("return");case 24:if(""!=e.degsem.FTOTSUB){r.next=31;break}return l={header:"Error",content:"Enter No. of subjects!"},r.next=28,U(0);case 28:return Q.current.focus(),e.showError(l),r.abrupt("return");case 31:if(""!=e.degsem.FMINTOT){r.next=35;break}return E={header:"Error",content:"Enter Min. no. of subjects to pass!"},e.showError(E),r.abrupt("return");case 35:if(""!=e.degsem.FTOTGRACE){r.next=39;break}return d={header:"Error",content:"Enter Max. grace marks!"},e.showError(d),r.abrupt("return");case 39:if(""!=e.degsem.FSUBGRPER){r.next=43;break}return m={header:"Error",content:"Enter Max. grace marks for the subject (in %)!"},e.showError(m),r.abrupt("return");case 43:if(""!=e.degsem.FSUBGRMARK){r.next=47;break}return i={header:"Error",content:"Enter Max. grace marks for the subject (in nos)!"},e.showError(i),r.abrupt("return");case 47:if(""!=e.degsem.FGRACESUB){r.next=51;break}return h={header:"Error",content:"Enter Max. graced subjects allowed!"},e.showError(h),r.abrupt("return");case 51:if(""!=e.degsem.FNOVAL){r.next=55;break}return g={header:"Error",content:"Enter No. of valuations!"},e.showError(g),r.abrupt("return");case 55:if(""!=e.degsem.FDEVPER){r.next=59;break}return b={header:"Error",content:"Enter Deviation %"},e.showError(b),r.abrupt("return");case 59:if(""!=e.degsem.FAGGRMIN){r.next=63;break}return f={header:"Error",content:"Enter AGGREGATE MIN. IN %"},e.showError(f),r.abrupt("return");case 63:if(""!=e.degsem.FRANKATT){r.next=67;break}return p={header:"Error",content:"Enter Max. attempts for Rank!"},e.showError(p),r.abrupt("return");case 67:if(""!=e.degsem.FFACULTY){r.next=71;break}return x={header:"Error",content:"Enter Faculty code!"},e.showError(x),r.abrupt("return");case 71:if(""!=e.degsem.FPERSET){r.next=75;break}return T={header:"Error",content:"Enter Codes per set!"},e.showError(T),r.abrupt("return");case 75:if(""!=e.degsem.FMCTYPE){r.next=79;break}return w={header:"Error",content:"Enter Marks card type!"},e.showError(w),r.abrupt("return");case 79:if(""!=e.degsem.FCOLLDEPT){r.next=83;break}return M={header:"Error",content:"Enter College / Department!"},e.showError(M),r.abrupt("return");case 83:if(""!=e.degsem.FNOTERMS){r.next=87;break}return F={header:"Error",content:"Enter No. of terms for the exam!"},e.showError(F),r.abrupt("return");case 87:if(""!=e.degsem.FMAXTERMS){r.next=91;break}return A={header:"Error",content:"Enter Max. terms allowed!"},e.showError(A),r.abrupt("return");case 91:if(""!=e.degsem.FMAXACTIVE){r.next=95;break}return R={header:"Error",content:"Enter Max. active terms allowed!"},e.showError(R),r.abrupt("return");case 95:if(""!=e.degsem.FMAXATT){r.next=99;break}return v={header:"Error",content:"Enter Max. attempts allowed!"},e.showError(v),r.abrupt("return");case 99:if(""!=e.degsem.FMAXAPP){r.next=103;break}return k={header:"Error",content:"Enter Max. appearance allowed!"},e.showError(k),r.abrupt("return");case 103:if(!(e.degsem.FTOTSUB<1||e.degsem.FTOTSUB>99)){r.next=107;break}return S={header:"Error",content:"Total subjects should be between 1 and 99"},e.showError(S),r.abrupt("return");case 107:if(!(e.degsem.FMINTOT>e.degsem.FTOTSUB)){r.next=111;break}return O={header:"Error",content:"Min. to pass should be less than or equal to total subjects"},e.showError(O),r.abrupt("return");case 111:if(!(e.degsem.FTOTGRACE<1||e.degsem.FTOTGRACE>99)){r.next=115;break}return C={header:"Error",content:"Max.grace allowed has to be between 1 and 99"},e.showError(C),r.abrupt("return");case 115:if(!(parseInt(e.degsem.FSUBGRMARK)>parseInt(e.degsem.FTOTGRACE))){r.next=119;break}return N={header:"Error",content:"Max.grace marks per subject has to be between 1 and max.grace marks allowed"},e.showError(N),r.abrupt("return");case 119:if(!(e.degsem.FGRACESUB<1||e.degsem.FGRACESUB>99)){r.next=123;break}return D={header:"Error",content:"Max.grace subjects allowed has to be between 1 and 99"},e.showError(D),r.abrupt("return");case 123:if(!(""==e.degsem.FNEXTEXAM&&e.degsem.FSUBFAIL>0)){r.next=127;break}return j={header:"Error",content:"Total failed subjects should not be greater than 0 for final exam"},e.showError(j),r.abrupt("return");case 127:if(e.degsem.FRANKATT>0){r.next=131;break}return G={header:"Error",content:"Rank attempts has to be greater than 0"},e.showError(G),r.abrupt("return");case 131:if(!(e.degsem.FNOVAL<1||e.degsem.FNOVAL>5)){r.next=135;break}return I={header:"Error",content:"No. of valuation should be less than or equal to 5."},e.showError(I),r.abrupt("return");case 135:if(!(e.degsem.FNOTERMS<1||parseInt(e.degsem.FNOTERMS)>parseInt(e.degsem.FCMAXTERMS))){r.next=140;break}return console.log(e.degsem.FCMAXTERMS),X={header:"Error",content:"No. of terms has to be greater than 0 and less than or equal to Max. terms to complete the course"},e.showError(X),r.abrupt("return");case 140:if(!(e.degsem.FMAXTERMS<1||parseInt(e.degsem.FMAXTERMS)>parseInt(e.degsem.FCMAXTERMS))){r.next=144;break}return y={header:"Error",content:"Max. terms has to be greater than 0 and less than or equal to Max. terms to complete the course"},e.showError(y),r.abrupt("return");case 144:if(!(e.degsem.FMAXACTIVE<1||parseInt(e.degsem.FMAXACTIVE)>parseInt(e.degsem.FMAXTERMS))){r.next=148;break}return V={header:"Error",content:"Max. active terms should be less than or equal to Max. terms."},e.showError(V),r.abrupt("return");case 148:console.log("all fields are valid"),e.saveDegSemDet();case 150:case"end":return r.stop()}},r)}));return function(){return r.apply(this,arguments)}}(),Z=Object(N.i)(),$=[];e.degSemList.forEach(function(e){$.findIndex(function(r){return r.fdegree==e.fdegree})<=-1&&$.push({fdegree:e.fdegree,fdescpn:e.fdescpn})});var ee=$.map(function(e,r){return{key:r,value:e.fdegree,text:"".concat(e.fdegree," - ").concat(e.fdescpn)}}),re=Object(c.useRef)(null),te=Object(c.useRef)(null),ae=Object(c.useRef)(null),ne=Object(c.useRef)(null),oe=Object(c.useRef)(null),se=Object(c.useRef)(null),ce=Object(c.useRef)(null),ue=function(r){if("FDEGREE"==r.target.name){if(""==r.target.value)return e.showError({header:"Error",content:"Enter Degree Code."}),void z.current.focus();var t=e.degSemList.filter(function(e){return e.fdegree==r.target.value}),a=t.filter(function(e){return""==e.fnextexam});if(console.log(a.length),a.length>0)return e.showError({header:"Error",content:"All exams for this degree already defined."}),void z.current.focus();t.length>0?function(){var r=Object(o.a)(n.a.mark(function r(){var a,o;return n.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e.getDegSemDetForEdit(t[0].fdegree,t[0].fexamno);case 2:a=t[t.length-1].fexamno,console.log(String.fromCharCode(a.charCodeAt(0)+1)),console.log(String.fromCharCode(a.charCodeAt(0)+2)),o={name:"FEXAMNO",value:String.fromCharCode(a.charCodeAt(0)+1)},document.createEvent("MouseEvent"),J(0,o),o={name:"FNEXTEXAM",value:String.fromCharCode(a.charCodeAt(0)+2)},J(0,o);case 10:case"end":return r.stop()}},r)}));return function(){return r.apply(this,arguments)}}()():j(!0)}"FNEXTEXAM"==r.target.name&&""!==r.target.value&&r.target.value.charCodeAt(0)<=e.degsem.FEXAMNO.charCodeAt(0)?e.showError({header:"Error",content:"Next exam should be greater than current exam."}):"FMINTOT"==r.target.name&&parseInt(r.target.value)>parseInt(e.degsem.FTOTSUB)?e.showError({header:"Error",content:"Min. to pass should be less than or equal to total subjects"}):("FTOTGRACE"==r.target.name&&(r.target.value<1||r.target.value>99)&&e.showError({header:"Error",content:"Max.grace allowed has to be between 1 and 99"}),"FSUBGRMARK"==r.target.name&&parseInt(r.target.value)>parseInt(e.degsem.FTOTGRACE)&&(console.log("FSUBGRMARK=>",r.target.value),console.log("FTOTGRACE=>",e.degsem.FTOTGRACE),e.showError({header:"Error",content:"Max.grace marks per subject has to be between 1 and max.grace marks allowed"})),"FGRACESUB"==r.target.name&&(r.target.value<1||r.target.value>99)&&e.showError({header:"Error",content:"Max.grace subjects allowed has to be between 1 and 99"}),"FSUBFAIL"==r.target.name&&""==e.degsem.FNEXTEXAM&&r.target.value>0&&e.showError({header:"Error",content:"Total failed subjects should not be greater than 0 for final exam"}),"FRANKATT"!=r.target.name||r.target.value>0||e.showError({header:"Error",content:"Rank attempts has to be greater than 0"}),"FNOVAL"==r.target.name&&(r.target.value<1||r.target.value>5)&&e.showError({header:"Error",content:"No. of valuation should be less than or equal to 5."}),"FNOTERMS"==r.target.name&&(r.target.value<1||parseInt(r.target.value)>parseInt(e.degsem.FCMAXTERMS))&&(console.log(e.degsem.FCMAXTERMS),e.showError({header:"Error",content:"No. of terms has to be greater than 0 and less than or equal to Max. terms to complete the course"})),"FMAXTERMS"==r.target.name&&(r.target.value<1||r.target.value>e.degsem.FCMAXTERMS)&&e.showError({header:"Error",content:"Max. terms has to be greater than 0 and less than or equal to Max. terms to complete the course"}),"FMAXACTIVE"==r.target.name&&(r.target.value<1||r.target.value>e.degsem.FMAXTERMS)&&e.showError({header:"Error",content:"Max. active terms should be less than or equal to Max. terms."}))},le=function(){var e=Object(o.a)(n.a.mark(function e(r){return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,U(r);case 2:e.t0=r,e.next=0===e.t0?5:1===e.t0?7:2===e.t0?10:3===e.t0?13:4===e.t0?15:6===e.t0?17:7===e.t0?19:21;break;case 5:return Q.current.focus(),e.abrupt("break",21);case 7:return console.log("1, graceRef"),re.current.focus(),e.abrupt("break",21);case 10:return console.log("2, subfailRef"),te.current.focus(),e.abrupt("break",21);case 13:return ae.current.focus(),e.abrupt("break",21);case 15:return ne.current.focus(),e.abrupt("break",21);case 17:return se.current.focus(),e.abrupt("break",21);case 19:return ce.current.focus(),e.abrupt("break",21);case 21:case"end":return e.stop()}},e)}));return function(r){return e.apply(this,arguments)}}(),Ee=[{menuItem:"Subjects",render:function(){return u.a.createElement(E.a.Pane,null,u.a.createElement(w.a,{setTab:U,isValid:ue,totsub_ref:Q,shiftTab:le}))}},{menuItem:"Gracing",render:function(){return u.a.createElement(E.a.Pane,null,u.a.createElement(M.a,{setTab:U,isValid:ue,graceRef:re,shiftTab:le}))}},{menuItem:"General Eligibility",render:function(){return u.a.createElement(E.a.Pane,null,u.a.createElement(F.a,{setTab:U,isValid:ue,subfailRef:te,shiftTab:le}))}},{menuItem:"Computation",render:function(){return u.a.createElement(E.a.Pane,null,u.a.createElement(S.a,{setTab:U,isValid:ue,noval_ref:ae,shiftTab:le}))}},{menuItem:"Class / Rank",render:function(){return u.a.createElement(E.a.Pane,null,u.a.createElement(k.a,{setTab:U,isValid:ue,class_ref:ne,shiftTab:le}))}},{menuItem:"Closing",render:function(){return u.a.createElement(E.a.Pane,null,u.a.createElement(A.a,{setTab:U,isValid:ue,initqp_ref:oe,shiftTab:le}))}},{menuItem:"General",render:function(){return u.a.createElement(E.a.Pane,null,u.a.createElement(R.a,{setTab:U,isValid:ue,faculty_ref:se,shiftTab:le}))}},{menuItem:"Regulations",render:function(){return u.a.createElement(E.a.Pane,null,u.a.createElement(v.a,{setTab:U,isValid:ue,regrefno_ref:ce,shiftTab:le}))}}],de={GET_NEXT_DEGREE:function(){e.getNextDegree("NEXT")},GET_PREV_DEGREE:function(){e.getNextDegree("PREV")}};return u.a.createElement(u.a.Fragment,null,u.a.createElement(l.HotKeys,{keyMap:{GET_NEXT_DEGREE:"f3",GET_PREV_DEGREE:"f2"},handlers:de},u.a.createElement(d.a,{fluid:!0},u.a.createElement(d.a.Content,null,u.a.createElement(d.a.Header,{style:{display:"flex"}},u.a.createElement(m.a,{as:"h3"},"Edit Degree Details"),u.a.createElement("div",{className:"ml-auto"},u.a.createElement(p.a,{to:{pathname:"/masters/degreeActionsScreen"}},u.a.createElement(i.a,{basic:!0,color:"blue",content:"Back",icon:"arrow left"})),u.a.createElement(i.a,{basic:!0,color:"green",icon:"save",onClick:W,content:"Save"}),u.a.createElement(p.a,{to:"/dashboard"},u.a.createElement(i.a,{basic:!0,color:"red",content:"Exit",icon:"home"})))),u.a.createElement(h.a,null),u.a.createElement(d.a.Description,{style:{overflowY:"auto",height:"".concat(Z,"px")}},u.a.createElement(g.a,{style:{maxHeight:"35%",width:"35%"},open:D,onClose:function(){return j(!1)},closeOnDimmerClick:!1},u.a.createElement(g.a.Header,{style:{display:"flex"}},"Select Equivalent Degree"),u.a.createElement(g.a.Content,{style:{height:"50vh",overflowY:"auto"}},u.a.createElement(b.a,null,u.a.createElement(b.a.Field,null,u.a.createElement("label",null,"Degree"),u.a.createElement(f.a,{size:"mini",className:"modal1",fluid:!0,search:!0,selection:!0,value:X,onChange:function(e,r){y(r.value)},placeholder:"Select Degree Group",openOnFocus:!1,options:ee,selectOnBlur:!1,searchInput:{autoFocus:!0}})),u.a.createElement(b.a.Field,null,u.a.createElement(i.a,{style:{float:"right"},color:"blue",onClick:Object(o.a)(n.a.mark(function r(){var t,a,o;return n.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(""!=X){r.next=4;break}return t={header:"Error",content:"Select Degree ...!"},e.showError(t),r.abrupt("return");case 4:return a=e.degsem.FDEGREE,r.next=7,e.getDegSemDetForEdit(X,"A");case 7:j(!1),o={name:"FDEGREE",value:a},document.createEvent("MouseEvent"),J(0,o);case 11:case"end":return r.stop()}},r)})),content:"Submit"}))))),u.a.createElement(O.a,{edit:a,open:D,setOpen:j,degree_ref:z,isValid:ue}),u.a.createElement(d.a,{fluid:!0,style:{margin:"5px auto",padding:"10px",width:"98%"}},u.a.createElement(E.a,{menu:{attached:!0,tabular:!0,color:"blue",className:"wrapped"},panes:Ee,activeIndex:B,onTabChange:function(e,r){var t=r.activeIndex;return U(t)}})))))))})}}]);
//# sourceMappingURL=179.17e5f7ef.chunk.js.map
|