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.216.136.54
(window.webpackJsonp=window.webpackJsonp||[]).push([[159],{1081:function(e,t,a){"use strict";a.r(t);var r=a(41),n=a.n(r),c=a(68),l=a(69),o=a(1),u=a.n(o),i=a(269),s=a(104),d=a(1096),p=a(1106),m=a(1139),g=a(272),b=a(1098),f=a(1100),E=a(1e3),h=a(858),v=a(266),O=a(108);a(167);t.default=Object(s.b)(function(e){return console.log("from exam app: ",e),{user:e.user,univ:e.univ,deggrp:e.deggrp}},{})(function(e){var t=Object(o.useState)(""),a=Object(l.a)(t,2),r=a[0],s=a[1],j=Object(o.useState)(""),y=Object(l.a)(j,2),x=y[0],w=y[1],S=Object(o.useState)("0"),k=Object(l.a)(S,2),N=k[0],C=k[1],_=Object(o.useState)("z"),F=Object(l.a)(_,2),G=F[0],R=F[1],T=Object(o.useState)(""),z=Object(l.a)(T,2),D=z[0],M=z[1],P=Object(o.useState)([]),B=Object(l.a)(P,2),X=(B[0],B[1],Object(o.useState)("0")),H=Object(l.a)(X,2),A=H[0],I=H[1],J=Object(o.useState)("z"),L=Object(l.a)(J,2),K=L[0],q=L[1],Q=Object(o.useState)("0"),U=Object(l.a)(Q,2),V=U[0],W=U[1],Y=Object(o.useState)("z"),Z=Object(l.a)(Y,2),$=Z[0],ee=Z[1],te=Object(o.useContext)(O.a),ae=te.err_msg,re=(te.load,Object(l.a)(ae,2)),ne=re[0],ce=re[1],le=function(){var e=Object(c.a)(n.a.mark(function e(){return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:s(""),C("0"),R("z"),M("");case 4:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}();Object(o.useEffect)(function(){oe()},[]);var oe=function(){var t=Object(c.a)(n.a.mark(function t(){var a,r,c,l;return n.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.a.get("/app.php",{params:{a:"getDegreeGroup",univcode:e.user.fcuruniv}});case 2:if("object"===typeof(a=t.sent).data){t.next=9;break}return r={header:"Error",content:"Something went wrong"},Object(v.w)(r),t.abrupt("return");case 9:if(0!==a.data.error_code){t.next=15;break}return c=a.data.data.deggrp.map(function(e,t){return{key:t,value:e.fdeggrp,text:e.fdeggrp+"-"+e.fdescpn}}),w(c),t.abrupt("return");case 15:return l={header:"Error",content:a.data.data.msg},Object(v.w)(l),t.abrupt("return");case 18:case"end":return t.stop()}},t)}));return function(){return t.apply(this,arguments)}}(),ue=function(){var t=Object(c.a)(n.a.mark(function t(){var a,c,l;return n.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(""!=r){t.next=3;break}return ce({type:"OPEN_MSG_BOX",payload:{header:"Error",message:"Select Degree Group"}}),t.abrupt("return");case 3:if(""!=D){t.next=6;break}return ce({type:"OPEN_MSG_BOX",payload:{header:"Error",message:"Select Status"}}),t.abrupt("return");case 6:if(""!=N){t.next=9;break}return ce({type:"OPEN_MSG_BOX",payload:{header:"Error",message:"Enter Register no. From"}}),t.abrupt("return");case 9:if(""!=G){t.next=12;break}return ce({type:"OPEN_MSG_BOX",payload:{header:"Error",message:"Enter Register no. To"}}),t.abrupt("return");case 12:return t.next=14,i.a.post("/app.php?a=enableExamAppForm&univcode="+e.univ.funivcode,{data:{deggrp:r,regnofrom:N,regnoto:G,status:D,collfrom:V,collto:$,degfrom:A,degto:K}});case 14:if("object"===typeof(a=t.sent).data){t.next=21;break}return c={header:"Error",content:"Something went wrong"},Object(v.w)(c),t.abrupt("return");case 21:if(0!==a.data.error_code){t.next=29;break}return console.log(a.data.data.msg),ce({type:"OPEN_MSG_BOX",payload:{header:"Success",message:a.data.data.msg}}),t.next=26,le();case 26:return t.abrupt("return");case 29:return l={header:"Error",content:a.data.data.msg},Object(v.w)(l),t.abrupt("return");case 32:case"end":return t.stop()}},t)}));return function(){return t.apply(this,arguments)}}();return console.log("aaaaa: ",e.deggrp),e.deggrp.map(function(e,t){return{key:t,value:e.fdeggrp,text:"".concat(e.fdeggrp)}}),u.a.createElement(u.a.Fragment,null,u.a.createElement(d.a,{size:"mini",open:ne.open,dimmer:"inverted",style:{height:"180px"}},u.a.createElement(d.a.Header,{style:{backgroundColor:ne.color,color:"#fff"}},ne.header),u.a.createElement(d.a.Content,null,u.a.createElement("div",{dangerouslySetInnerHTML:{__html:ne.message}})),u.a.createElement(d.a.Actions,null,u.a.createElement(p.a,{positive:!0,onClick:function(){return ce({type:"CLOSE_MSG_BOX"})}},"OK"))),u.a.createElement("div",{className:"animated fadeIn"},u.a.createElement(m.a,{fluid:!0,style:{minHeight:"82vh"}},u.a.createElement(m.a.Content,null,u.a.createElement(m.a.Header,{style:{display:"flex"},className:"sticky"},u.a.createElement("h4",null,"Enable / Disable Exam Application Form (Studentwise)"),u.a.createElement("div",{className:"ml-auto"},u.a.createElement(p.a,{basic:!0,color:"black",content:"Cancel",icon:"ban",onClick:function(){le()}}),u.a.createElement(h.a,{to:"/dashboard"},u.a.createElement(p.a,{basic:!0,color:"red",content:"Exit",icon:"home"})))),u.a.createElement(g.a,null),u.a.createElement("div",{className:"col-md-6"},u.a.createElement(b.a,null,u.a.createElement(b.a.Field,{width:16},u.a.createElement("label",null,"Degree Group"),u.a.createElement(f.a,{placeholder:"Select Degree Group",name:"deggrp",value:r,selection:!0,search:!0,options:x,onChange:function(e,t){s(t.value)}})),u.a.createElement(b.a.Group,null,u.a.createElement(b.a.Field,{width:8},u.a.createElement("label",null,"College Range"),u.a.createElement(E.a,{type:"text",value:V,placeholder:"Reg. No. From",name:"collfrom",onChange:function(e){return W(e.target.value)}})),u.a.createElement(b.a.Field,{width:8},u.a.createElement(E.a,{type:"text",value:$,placeholder:"Reg. No. To",name:"collto",style:{marginTop:"22px"},onChange:function(e){return ee(e.target.value)}}))),u.a.createElement(b.a.Group,null,u.a.createElement(b.a.Field,{width:8},u.a.createElement("label",null,"Degree Range"),u.a.createElement(E.a,{type:"text",value:A,placeholder:"Reg. No. From",name:"degfrom",onChange:function(e){return I(e.target.value)}})),u.a.createElement(b.a.Field,{width:8},u.a.createElement(E.a,{type:"text",value:K,placeholder:"Reg. No. To",name:"degto",style:{marginTop:"22px"},onChange:function(e){return q(e.target.value)}}))),u.a.createElement(b.a.Group,null,u.a.createElement(b.a.Field,{width:8},u.a.createElement("label",null,"Reg. No. Range"),u.a.createElement(E.a,{type:"text",value:N,placeholder:"Reg. No. From",name:"regnofrom",onChange:function(e){return C(e.target.value)}})),u.a.createElement(b.a.Field,{width:8},u.a.createElement(E.a,{type:"text",value:G,placeholder:"Reg. No. To",name:"regnoto",style:{marginTop:"22px"},onChange:function(e){return R(e.target.value)}}))),u.a.createElement(b.a.Field,{width:16},u.a.createElement("label",null,"Status"),u.a.createElement(f.a,{placeholder:"-Select-",name:"status",value:D,selection:!0,options:[{key:"0",text:"Select",value:""},{key:"1",text:"Disable",value:"T"},{key:"2",text:"Enable",value:"F"}],onChange:function(e,t){M(t.value)}})),u.a.createElement("p",null,u.a.createElement("b",null,"Please disable student before enableing studentwise")),u.a.createElement(p.a,{color:"blue",onClick:ue},"Save")))))))},v.j)},272:function(e,t,a){"use strict";var r=a(268),n=a.n(r),c=a(265),l=a.n(c),o=a(1),u=a.n(o),i=a(333),s=a(551),d=a(549),p=a(267);function m(e){var t=e.children,a=e.className,r=e.clearing,c=e.content,o=e.fitted,g=e.hidden,b=e.horizontal,f=e.inverted,E=e.section,h=e.vertical,v=l()("ui",Object(i.a)(r,"clearing"),Object(i.a)(o,"fitted"),Object(i.a)(g,"hidden"),Object(i.a)(b,"horizontal"),Object(i.a)(f,"inverted"),Object(i.a)(E,"section"),Object(i.a)(h,"vertical"),"divider",a),O=Object(s.a)(m,e),j=Object(d.a)(m,e);return u.a.createElement(j,n()({},O,{className:v}),p.a.isNil(t)?c:t)}m.handledProps=["as","children","className","clearing","content","fitted","hidden","horizontal","inverted","section","vertical"],m.propTypes={},t.a=m}}]);
//# sourceMappingURL=159.d4d06641.chunk.js.map
|