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.141.201.46
(window.webpackJsonp=window.webpackJsonp||[]).push([[17],{1103:function(e,t,a){"use strict";a.r(t);var r=a(41),n=a.n(r),c=a(68),o=a(99),l=a(100),i=a(102),s=a(101),u=a(103),p=a(1),d=a.n(p),f=a(1139),m=a(1106),g=a(272),h=a(1101),E=a(104),b=a(266),y=a(315),v=a(3),x=a(1098),O=a(309),j=a(1100),w=(a(298),a(346)),T=a(288),S=function(e){function t(){var e,a;Object(o.a)(this,t);for(var r=arguments.length,l=new Array(r),u=0;u<r;u++)l[u]=arguments[u];return(a=Object(i.a)(this,(e=Object(s.a)(t)).call.apply(e,[this].concat(l)))).state={fexamrange:"ABCDEFGHIJ",frmSubmit:!1,disabled:!1,fdeggrp:"",fyear:"",fexamtype:"",fexamdate:"",fdegree:"",exams:[{key:"All",value:"ABCDEFGHIJ",text:"All"},{key:"A",value:"A",text:"I Semester"},{key:"B",value:"B",text:"II Semester"},{key:"C",value:"C",text:"III Semester"},{key:"D",value:"D",text:"IV Semester"},{key:"E",value:"E",text:"V Semester"},{key:"F",value:"F",text:"VI Semester"},{key:"G",value:"G",text:"VII Semester"},{key:"H",value:"H",text:"VIII Semester"},{key:"I",value:"I",text:"IX Semester"},{key:"J",value:"J",text:"X Semester"}]},a.cancel=function(){a.setState({fexamrange:"",frmSubmit:!1,disabled:!1,fdeggrp:"",fyear:"",fexamtype:"",fexamdate:"",fdegree:""})},a.handleChange=function(e,t){switch(t.type){case"text":case"radio":return void a.setState(Object(v.a)({},t.name,t.value));case"checkbox":return void a.setState(Object(v.a)({},t.name,t.checked));default:return}},a.changeDegree=function(e,t){console.log(t.value),a.setState({fdegree:t.value})},a.changeexamno=function(e,t){console.log(t.value),a.setState({fexamrange:t.value})},a.generateTimeTable=function(){var e=a.state,t=e.fdeggrp,r=e.fyear,n=e.fexamtype,c=e.fexamrange,o=e.fdegree;if(""!=c){a.setState({disabled:!0});var l={fdeggrp:t,fyear:r,fexamtype:n,fexamrange:c,fdegree:o};a.props.setFromValues(l),a.props.getupdateTimetable(l)}else{a.props.showError({header:"Error",content:"Exam Range required."})}},a.changeDeggrp=function(){var e=Object(c.a)(n.a.mark(function e(t,r){var c,o;return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("aaaa: ",r.value),c=a.props.deggrp.filter(function(e,t){return e.fdeggrp===r.value}),o=c[0],a.setState({fyear:o.fyear,fexamtype:o.fexamtype,fexamdate:o.fexamdate,fdeggrp:o.fdeggrp,frmSubmit:!1}),e.next=6,a.props.loaddegreettm(o.fdeggrp);case 6:case"end":return e.stop()}},e)}));return function(t,a){return e.apply(this,arguments)}}(),a}return Object(u.a)(t,e),Object(l.a)(t,[{key:"componentDidMount",value: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:return e.next=2,this.props.fetchDegGrp();case 2:this.props.onRef(this),this.setState({deggrp:this.props.deggrp,fstrdate:Object(w.a)()});case 4:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"render",value:function(){var e=this.state,t=e.fexamrange,a=e.ferror,r=e.ferrorm,n=(e.fexamrangeError,e.disabled,e.fdeggrp),c=e.fyear,o=e.fexamtype,l=e.fexamdate,i=e.fdegree;console.log(s,"hkjbkjb");var s=[];return this.props.degreettm.map(function(e,t){s.push({key:t,value:e.fdegree,text:"".concat(e.fdegree," - ").concat(e.fdescpn)})}),d.a.createElement("div",null,d.a.createElement(x.a,{error:!0},a?d.a.createElement(O.a,{error:!0,content:r}):null,d.a.createElement(T.a,{pdeggrp:{fdeggrp:n,fyear:c,fexamtype:o,fexamdate:l},changeDeggrp:this.changeDeggrp}),d.a.createElement(x.a.Field,null,d.a.createElement("label",null,"Degree"),d.a.createElement(j.a,{size:"mini",fluid:!0,search:!0,selection:!0,value:i,onChange:this.changeDegree,placeholder:"Select Degree",openOnFocus:!1,options:s,selectOnBlur:!1})),d.a.createElement(x.a.Group,null,d.a.createElement(x.a.Field,{width:10},d.a.createElement("label",null,"Semester"),d.a.createElement(j.a,{size:"mini",fluid:!0,search:!0,selection:!0,value:t,name:"fexamrange",onChange:this.changeexamno,placeholder:"Select examno",openOnFocus:!1,options:this.state.exams,selectOnBlur:!1}))),d.a.createElement(m.a,{color:"blue",onClick:this.generateTimeTable},"Submit")))}}]),t}(p.Component),k=Object(E.b)(function(e){return{deggrp:e.deggrp,user:e.user,degreettm:e.degreettm}},{fetchDegGrp:b.j,loaddegreettm:y.i,showError:b.w,getupdateTimetable:y.h})(S),D=a(328),C=a(0),R=function(e){function t(){return Object(o.a)(this,t),Object(i.a)(this,Object(s.a)(t).apply(this,arguments))}return Object(u.a)(t,e),Object(l.a)(t,[{key:"render",value:function(){var e=this.props.reason.map(function(e,t){return{key:t,value:e.freasoncd,text:"".concat(e.freasoncd," - ").concat(e.fdescpn)}});return d.a.createElement(x.a.Field,null,d.a.createElement(j.a,{fluid:!0,search:!0,selection:!0,name:this.props.name,value:this.props.reasonval,onChange:this.props.changeReason,placeholder:"Select Session",selectOnBlur:!1,disabled:"T"==this.props.ffreeze,options:e}))}}]),t}(p.Component),_=Object(E.b)(function(e){return{reason:e.reason}},{})(R),A=function(e){function t(){return Object(o.a)(this,t),Object(i.a)(this,Object(s.a)(t).apply(this,arguments))}return Object(u.a)(t,e),Object(l.a)(t,[{key:"render",value:function(){var e=this.props.masdate.map(function(e,t){return{key:t,value:e.fdatecode,text:"".concat(e.fdatecode," - ").concat(e.fdate)}});return d.a.createElement(x.a.Field,null,d.a.createElement(j.a,{fluid:!0,search:!0,name:this.props.name,selection:!0,value:this.props.dateval,onChange:this.props.changedate,placeholder:"Select date",selectOnBlur:!1,disabled:"T"==this.props.ffreeze,options:e}))}}]),t}(p.Component),N=Object(E.b)(function(e){return{masdate:e.masdate}},{})(A),L=function(e){function t(){var e,a;Object(o.a)(this,t);for(var r=arguments.length,n=new Array(r),c=0;c<r;c++)n[c]=arguments[c];return(a=Object(i.a)(this,(e=Object(s.a)(t)).call.apply(e,[this].concat(n)))).state={el:{}},a.changeCell=function(e,t,r){console.log(e,t,r);var n=Object(C.a)({},t,Object(v.a)({},e.name,e.value));a.setState({el:Object(C.a)({},n)})},a}return Object(u.a)(t,e),Object(l.a)(t,[{key:"componentDidMount",value:function(){this.setState({el:Object(C.a)({},this.props.el),i:this.props.i,qpcode:this.props.qpcode}),this.props.onRef(this)}},{key:"render",value:function(){var e=this,t=this.state,a=t.i,r=t.el;return d.a.createElement(h.a.Row,{key:a},d.a.createElement(h.a.Cell,{textAlign:"center"},a+1),d.a.createElement(h.a.Cell,{textAlign:"center",singleLine:!0},r.fqpcode),d.a.createElement(h.a.Cell,null,r.fsubname),d.a.createElement(h.a.Cell,null,d.a.createElement(N,{dateval:r.fdatecodep,name:"fdatecodep",ffreeze:r.ffreeze,changedate:function(t,n){return e.changeCell(n,r,a)}})),d.a.createElement(h.a.Cell,null,d.a.createElement(N,{dateval:r.fdatecodet,name:"fdatecodet",ffreeze:r.ffreeze,changedate:function(t,n){return e.changeCell(n,r,a)}})),d.a.createElement(h.a.Cell,null,d.a.createElement(_,{reasonval:r.fsession,name:"fsession",ffreeze:r.ffreeze,changeReason:function(t,n){return e.changeCell(n,r,a)}})),d.a.createElement(h.a.Cell,{textAlign:"center"},d.a.createElement("div",{className:"ui checkbox"},d.a.createElement("input",{type:"checkbox",name:"fdeleted",value:r.fdeleted,disabled:"T"==r.ffreeze,onChange:function(t){return e.deleteRow(t,r,a)},checked:"true"==r.fdeleted?"checked":null}),d.a.createElement("label",null," "))))}}]),t}(p.Component),F=Object(E.b)(function(e){return{timetable:e.timetable}},{changett:b.c})(L),G=a(858),I=function(e){function t(){var e,a;Object(o.a)(this,t);for(var r=arguments.length,l=new Array(r),u=0;u<r;u++)l[u]=arguments[u];return(a=Object(i.a)(this,(e=Object(s.a)(t)).call.apply(e,[this].concat(l)))).state={ttform:{},trrefs:[],open:!1,frmDeggrp:"",frmdegree:"",deggrpError:!1,degreeError:!1,frmSubmit:!1},a.renderHeader=function(){return d.a.createElement(f.a.Header,{style:{display:"flex"}},d.a.createElement("h4",null,"Update Time Table (First Exam)"),d.a.createElement("div",{className:"ml-auto"},d.a.createElement(m.a,{disabled:!a.state.frmSubmit,basic:!0,color:"green",content:"Save",onClick:a.handleSave,icon:"save"}),d.a.createElement(m.a,{basic:!0,onClick:a.cancel,color:"black",icon:"ban",content:"Cancel"}),d.a.createElement(m.a,{onClick:a.show("blurring"),basic:!0,color:"blue",content:"Report",icon:"file"}),d.a.createElement(G.a,{to:"/dashboard"},d.a.createElement(m.a,{basic:!0,color:"red",content:"Exit",icon:"home"}))))},a.cancel=function(){a.child.cancel(),a.props.cancelTimetable(),a.setState({frmSubmit:!1})},a.show=function(e){return function(){return a.setState({dimmer:e,open:!0})}},a.close=function(e,t){"keydown"!=e.type&&a.setState({open:!1})},a.setFromValues=function(){var e=Object(c.a)(n.a.mark(function e(t){return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.setState({ttform:t,frmSubmit:!0});case 2:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),a.handleSave=Object(c.a)(n.a.mark(function e(){var t;return n.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.state.trrefs.map(function(e,t){return e.state.el}),e.next=3,a.props.saveExamtimetableUT(t,a.state.ttform);case 3:a.cancel();case 4:case"end":return e.stop()}},e)})),a.renderForm=function(){var e=a.state,t=e.frmSubmit,r=e.dimmer,n=e.open,c=a.props.timetable,o=70*window.innerHeight/100;return d.a.createElement("div",{className:"animated fadeIn"},d.a.createElement(f.a,{fluid:!0},d.a.createElement(f.a.Content,null,a.renderHeader(),d.a.createElement(g.a,null),d.a.createElement(f.a.Description,{style:{height:"".concat(o,"px"),overflowY:"auto"}},d.a.createElement("div",{className:"col-md-8 col-sm-9"},d.a.createElement(k,{setFromValues:a.setFromValues,onRef:function(e){return a.child=e}})),t?d.a.createElement("div",{className:"ui mini form"},d.a.createElement(g.a,null),d.a.createElement(h.a,{celled:!0,style:{fontSize:"1.1536em"}},d.a.createElement(h.a.Header,null,d.a.createElement(h.a.Row,null,d.a.createElement(h.a.HeaderCell,{style:{width:"5%"},singleLine:!0,textAlign:"center"},"Sl. No."),d.a.createElement(h.a.HeaderCell,{style:{width:"8%"},textAlign:"center"},"QP Code"),d.a.createElement(h.a.HeaderCell,{textAlign:"center"},"Subject Name"),d.a.createElement(h.a.HeaderCell,{style:{width:"20%"},textAlign:"center"},"Perm. Date"),d.a.createElement(h.a.HeaderCell,{style:{width:"20%"},textAlign:"center"},"Temp. Date"),d.a.createElement(h.a.HeaderCell,{style:{width:"25%"},textAlign:"center"},"Time"),d.a.createElement(h.a.HeaderCell,{style:{width:"5%"},textAlign:"center"},"Del"))),d.a.createElement(h.a.Body,null,console.log(c),c.map(function(e,t){var r=e.toJS();return d.a.createElement(F,{key:t,i:t,el:r,onRef:function(e){return a.state.trrefs[t]=e}})})))):null,d.a.createElement(D.a,{open:n,dim:r,close:a.close})))))},a}return Object(u.a)(t,e),Object(l.a)(t,[{key:"componentDidMount",value:function(){this.props.fetchDegGrp()}},{key:"render",value:function(){return this.renderForm()}}]),t}(d.a.Component);t.default=Object(E.b)(function(e){return{deggrp:e.deggrp,timetable:e.timetable}},{fetchDegGrp:b.j,saveExamtimetableUT:y.m,cancelTimetable:y.a})(I)},272:function(e,t,a){"use strict";var r=a(268),n=a.n(r),c=a(265),o=a.n(c),l=a(1),i=a.n(l),s=a(333),u=a(551),p=a(549),d=a(267);function f(e){var t=e.children,a=e.className,r=e.clearing,c=e.content,l=e.fitted,m=e.hidden,g=e.horizontal,h=e.inverted,E=e.section,b=e.vertical,y=o()("ui",Object(s.a)(r,"clearing"),Object(s.a)(l,"fitted"),Object(s.a)(m,"hidden"),Object(s.a)(g,"horizontal"),Object(s.a)(h,"inverted"),Object(s.a)(E,"section"),Object(s.a)(b,"vertical"),"divider",a),v=Object(u.a)(f,e),x=Object(p.a)(f,e);return i.a.createElement(x,n()({},v,{className:y}),d.a.isNil(t)?c:t)}f.handledProps=["as","children","className","clearing","content","fitted","hidden","horizontal","inverted","section","vertical"],f.propTypes={},t.a=f},288:function(e,t,a){"use strict";var r=a(41),n=a.n(r),c=a(68),o=a(99),l=a(100),i=a(102),s=a(101),u=a(103),p=a(1),d=a.n(p),f=a(104),m=a(1098),g=a(1100),h=a(266),E=function(e){function t(){return Object(o.a)(this,t),Object(i.a)(this,Object(s.a)(t).apply(this,arguments))}return Object(u.a)(t,e),Object(l.a)(t,[{key:"componentDidMount",value: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:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}()},{key:"render",value:function(){var e=this.props.deggrp.map(function(e,t){return{key:t,value:e.fdeggrp,text:"".concat(e.fdeggrp," - ").concat(e.fdescpn)}});console.log(this.props.pdeggrp);var t=this.props.pdeggrp,a=t.fdeggrp,r=t.fyear,n=t.fexamtype,c=t.fexamdate;return d.a.createElement("div",null,d.a.createElement(m.a.Field,null,d.a.createElement("label",null,"Degree Group"),d.a.createElement(g.a,{size:"mini",fluid:!0,search:!0,selection:!0,value:a,onChange:this.props.changeDeggrp,placeholder:"Select Degree Group",disabled:this.props.disabled,openOnFocus:!1,options:e,selectOnBlur:!1})),d.a.createElement(m.a.Group,null,d.a.createElement(m.a.Input,{placeholder:"Year",value:r,width:4,label:"Year",readOnly:!0}),d.a.createElement(m.a.Input,{placeholder:"Type",value:n,width:3,label:"Type",readOnly:!0}),d.a.createElement(m.a.Input,{placeholder:"Exam Date",label:"Exam Date",width:10,value:c,readOnly:!0})))}}]),t}(p.Component);t.a=Object(f.b)(function(e){return{deggrp:e.deggrp,user:e.user}},{fetchDegGrp:h.j})(E)},298:function(e,t,a){"use strict";var r=a(99),n=a(100),c=a(102),o=a(101),l=a(103),i=a(1),s=a.n(i),u=a(104),p=a(1098),d=a(1100),f=a(266),m=function(e){function t(){return Object(r.a)(this,t),Object(c.a)(this,Object(o.a)(t).apply(this,arguments))}return Object(l.a)(t,e),Object(n.a)(t,[{key:"componentDidMount",value:function(){this.props.fetchDegGrp()}},{key:"componentDidUpdate",value:function(e){this.props.user!==e.user&&this.props.fetchDegGrp()}},{key:"render",value:function(){var e=this.props.deggrp.map(function(e,t){return{key:t,value:e.fdeggrp,text:"".concat(e.fdeggrp," - ").concat(e.fdescpn)}});return s.a.createElement(p.a.Field,{width:"16"},s.a.createElement("label",null,"Degree Group"),s.a.createElement(d.a,{size:"mini",error:this.props.dgerror,fluid:!0,search:!0,selection:!0,value:this.props.frmDeggrp,onChange:this.props.changeDeggrp,placeholder:"Select Degree Group",disabled:this.props.disabled,openOnFocus:!1,options:e,selectOnBlur:!1}))}}]),t}(i.Component);t.a=Object(u.b)(function(e){return{deggrp:e.deggrp,user:e.user}},{fetchDegGrp:f.j})(m)},309:function(e,t,a){"use strict";var r=a(268),n=a.n(r),c=a(277),o=a.n(c),l=a(279),i=a.n(l),s=a(280),u=a.n(s),p=a(278),d=a.n(p),f=a(281),m=a.n(f),g=a(282),h=a.n(g),E=a(276),b=a.n(E),y=a(289),v=a.n(y),x=(a(275),a(265)),O=a.n(x),j=a(1),w=a.n(j),T=a(333),S=a(551),k=a(549),D=a(267),C=a(554),R=a(645);function _(e){var t=e.children,a=e.className,r=e.content,c=O()("content",a),o=Object(S.a)(_,e),l=Object(k.a)(_,e);return w.a.createElement(l,n()({},o,{className:c}),D.a.isNil(t)?r:t)}_.handledProps=["as","children","className","content"],_.propTypes={};var A=_;function N(e){var t=e.children,a=e.className,r=e.content,c=O()("header",a),o=Object(S.a)(N,e),l=Object(k.a)(N,e);return w.a.createElement(l,n()({},o,{className:c}),D.a.isNil(t)?r:t)}N.handledProps=["as","children","className","content"],N.propTypes={},N.create=Object(C.e)(N,function(e){return{content:e}});var L=N,F=a(283),G=a.n(F);function I(e){var t=e.children,a=e.className,r=e.content,c=O()("content",a),o=Object(S.a)(I,e),l=Object(k.a)(I,e);return w.a.createElement(l,n()({},o,{className:c}),D.a.isNil(t)?r:t)}I.handledProps=["as","children","className","content"],I.propTypes={},I.defaultProps={as:"li"},I.create=Object(C.e)(I,function(e){return{content:e}});var z=I;function H(e){var t=e.children,a=e.className,r=e.items,c=O()("list",a),o=Object(S.a)(H,e),l=Object(k.a)(H,e);return w.a.createElement(l,n()({},o,{className:c}),D.a.isNil(t)?G()(r,z.create):t)}H.handledProps=["as","children","className","items"],H.propTypes={},H.defaultProps={as:"ul"},H.create=Object(C.e)(H,function(e){return{items:e}});var B=H;a.d(t,"a",function(){return P});var P=function(e){function t(){var e,a;o()(this,t);for(var r=arguments.length,n=new Array(r),c=0;c<r;c++)n[c]=arguments[c];return a=u()(this,(e=d()(t)).call.apply(e,[this].concat(n))),b()(h()(h()(a)),"handleDismiss",function(e){var t=a.props.onDismiss;t&&t(e,a.props)}),a}return m()(t,e),i()(t,[{key:"render",value:function(){var e=this.props,a=e.attached,r=e.children,c=e.className,o=e.color,l=e.compact,i=e.content,s=e.error,u=e.floating,p=e.header,d=e.hidden,f=e.icon,m=e.info,g=e.list,h=e.negative,E=e.onDismiss,b=e.positive,y=e.size,x=e.success,j=e.visible,_=e.warning,N=O()("ui",o,y,Object(T.a)(l,"compact"),Object(T.a)(s,"error"),Object(T.a)(u,"floating"),Object(T.a)(d,"hidden"),Object(T.a)(f,"icon"),Object(T.a)(m,"info"),Object(T.a)(h,"negative"),Object(T.a)(b,"positive"),Object(T.a)(x,"success"),Object(T.a)(j,"visible"),Object(T.a)(_,"warning"),Object(T.b)(a,"attached"),"message",c),F=E&&w.a.createElement(R.a,{name:"close",onClick:this.handleDismiss}),G=Object(S.a)(t,this.props),I=Object(k.a)(t,this.props);return D.a.isNil(r)?w.a.createElement(I,n()({},G,{className:N}),F,R.a.create(f,{autoGenerateKey:!1}),(!v()(p)||!v()(i)||!v()(g))&&w.a.createElement(A,null,L.create(p,{autoGenerateKey:!1}),B.create(g,{autoGenerateKey:!1}),Object(C.c)(i,{autoGenerateKey:!1}))):w.a.createElement(I,n()({},G,{className:N}),F,r)}}]),t}(j.Component);b()(P,"Content",A),b()(P,"Header",L),b()(P,"List",B),b()(P,"Item",z),b()(P,"handledProps",["as","attached","children","className","color","compact","content","error","floating","header","hidden","icon","info","list","negative","onDismiss","positive","size","success","visible","warning"]),P.propTypes={}},315:function(e,t,a){"use strict";a.d(t,"e",function(){return s}),a.d(t,"h",function(){return u}),a.d(t,"i",function(){return p}),a.d(t,"l",function(){return d}),a.d(t,"m",function(){return f}),a.d(t,"j",function(){return m}),a.d(t,"a",function(){return g}),a.d(t,"f",function(){return h}),a.d(t,"b",function(){return E}),a.d(t,"c",function(){return b}),a.d(t,"d",function(){return y}),a.d(t,"n",function(){return v}),a.d(t,"o",function(){return x}),a.d(t,"g",function(){return O}),a.d(t,"k",function(){return j});var r=a(0),n=a(41),c=a.n(n),o=a(68),l=a(269),i=a(266),s=function(e){return function(){var t=Object(o.a)(c.a.mark(function t(a,r){var n,o;return c.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=r(),a({type:"SET_LOADER"}),t.next=4,l.a.post("/app.php?a=generateExamTimetable&univcode="+n.univ.funivcode,{data:{frmvalues:e}});case 4:o=t.sent,a({type:"UNSET_LOADER"}),"object"!==typeof o.data?a({type:"SET_ERROR",payload:{error_code:-1,data:{msg:"Something went wrong"},status:"failure"}}):a({type:"SET_ERROR",payload:o.data});case 7:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()},u=function(e){return function(){var t=Object(o.a)(c.a.mark(function t(a,n){var o,s,u,p;return c.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return o=n(),console.log(e),a({type:"CANCEL_TIMETABLE"}),a({type:"SET_LOADER"}),console.log(e),t.next=7,l.a.post("/app.php?a=getupdateTimetableUT&univcode="+o.univ.funivcode,{data:{frmvalues:Object(r.a)({},o.user,{fexamrange:e.fexamrange,fdeggrp:e.fdeggrp,fyear:e.fyear,fexamtype:e.fexamtype,fexamdate:e.fexamdate,fdegree:e.fdegree})}});case 7:s=t.sent,a({type:"UNSET_LOADER"}),"object"!==typeof s.data?(u={header:"Error",content:"Something went wrong"},a(Object(i.w)(u))):-1===s.data.error_code?(p={header:"Error",content:s.data.data.msg},a(Object(i.w)(p))):a({type:"GENERATE_TIMETABLE",payload:s.data});case 10:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()},p=function(e){return function(){var t=Object(o.a)(c.a.mark(function t(a,r){var n,o,s,u;return c.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=r(),console.log(e),a({type:"SET_LOADER"}),a({type:"DEL_FETCH_DEGREES_TTM"}),t.next=6,l.a.get("/app.php",{params:{a:"getdegreettm",univcode:n.univ.funivcode,deggrp:e}});case 6:o=t.sent,console.log(o),a({type:"UNSET_LOADER"}),"object"!==typeof o.data?(s={header:"Error",content:"Something went wrong"},a(Object(i.w)(s))):-1===o.data.error_code?(u={header:"Error",content:o.data.data.msg},a(Object(i.w)(u))):a({type:"FETCH_DEGREES_TTM",payload:o.data});case 10:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()},d=function(e,t){return function(){var a=Object(o.a)(c.a.mark(function a(r,n){var o,s,u,p;return c.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return o=n(),r({type:"SET_LOADER"}),a.next=4,l.a.post("/app.php?a=saveExamTimetable&univcode="+o.univ.funivcode,{data:{timetable:e,params:t,user:o.user}});case 4:s=a.sent,r({type:"UNSET_LOADER"}),"object"!==typeof s.data?(u={header:"Error",content:"Something went wrong"},r(Object(i.w)(u))):(p={header:"Success",content:s.data.data.msg},r(Object(i.w)(p)));case 7:case"end":return a.stop()}},a)}));return function(e,t){return a.apply(this,arguments)}}()},f=function(e,t){return function(){var a=Object(o.a)(c.a.mark(function a(r,n){var o,s,u,p;return c.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return o=n(),r({type:"SET_LOADER"}),a.next=4,l.a.post("/app.php?a=saveExamTimetableUT&univcode="+o.univ.funivcode,{data:{timetable:e,params:t,user:o.user}});case 4:s=a.sent,r({type:"UNSET_LOADER"}),"object"!==typeof s.data?(u={header:"Error",content:"Something went wrong"},r(Object(i.w)(u))):(p={header:"Success",content:s.data.data.msg},r(Object(i.w)(p)));case 7:case"end":return a.stop()}},a)}));return function(e,t){return a.apply(this,arguments)}}()},m=function(e){return function(){var t=Object(o.a)(c.a.mark(function t(a,r){var n,o;return c.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=r(),a({type:"SET_LOADER"}),t.next=4,l.a.post("/app.php?a=releaseExamTimetable&univcode="+n.univ.funivcode,{data:{params:e}});case 4:o=t.sent,a({type:"UNSET_LOADER"}),"object"!==typeof o.data?a({type:"SET_ERROR",payload:{error_code:-1,data:{msg:"Something went wrong"},status:"failure"}}):a({type:"SET_ERROR",payload:o.data});case 7:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()},g=function(){return{type:"CANCEL_TIMETABLE"}},h=function(e){return function(){var t=Object(o.a)(c.a.mark(function t(a,r){var n,o,s;return c.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=r(),n.user.fdeggrp,a({type:"SET_LOADER"}),a({type:"CLEAR_FREEZE_TIME_TABLE"}),t.next=6,l.a.get("/app.php",{params:{a:"getfreezeTimetable",univcode:n.univ.funivcode,dgp:e.fdeggrp,year:e.fyear,examtype:e.fexamtype,examrange:e.fexamrange,fcurtype:n.user.fcurtype}});case 6:if(o=t.sent,a({type:"UNSET_LOADER"}),"object"===typeof o.data){t.next=13;break}a({type:"SET_ERROR",payload:{error_code:-1,data:{msg:"Something went wrong"},status:"failure"}}),t.next=21;break;case 13:if(0!==o.data.error_code){t.next=17;break}a({type:"GET_FREEZE_TIME_TABLE",payload:o.data}),t.next=21;break;case 17:if(-1!==o.data.error_code){t.next=21;break}return s={header:"Error",content:"No data found for selected Exam Range..!"},a(Object(i.w)(s)),t.abrupt("return",-1);case 21:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()},E=function(e,t){return{type:"GET_FREEZE_TIME_TABLE_CHANGE",payload:{el:e,i:t}}},b=function(e,t){return{type:"GET_RELEASE_TIME_TABLE_CHANGE",payload:{el:e,i:t}}},y=function(e){return function(){var t=Object(o.a)(c.a.mark(function t(a,r){var n,o,s;return c.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=r(),console.log(e,n.freezeTimeTable),n.user.fdeggrp,a({type:"SET_LOADER"}),a({type:"UNSET_LOADER"}),t.next=7,l.a.post("/app.php?a=freezetimetable&univcode="+n.univ.funivcode,{data:{dgp:e.fdeggrp,year:e.fyear,examtype:e.fexamtype,examrange:e.fexamrange,user:n.user.fname,tabledata:n.freezeTimeTable.frzarr}});case 7:"object"!==typeof(o=t.sent).data?a({type:"SET_ERROR",payload:{error_code:-1,data:{msg:"Something went wrong"},status:"failure"}}):0===o.data.error_code&&(s={header:"Success",content:o.data.data.msg},a(Object(i.w)(s)));case 9:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()},v=function(e){return{type:"FREEZE_SELECT_ALL_CHECKBOX",payload:e}},x=function(e){return{type:"RELEASE_SELECT_ALL_CHECKBOX",payload:e}},O=function(e){return function(){var t=Object(o.a)(c.a.mark(function t(a,r){var n,o,s;return c.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=r(),n.user.fdeggrp,a({type:"SET_LOADER"}),a({type:"CLEAR_RELEASE_TIME_TABLE"}),t.next=6,l.a.get("/app.php",{params:{a:"getreleaseTimetable",univcode:n.univ.funivcode,dgp:e.fdeggrp,year:e.fyear,examtype:e.fexamtype,examrange:e.fexamrange}});case 6:if(o=t.sent,a({type:"UNSET_LOADER"}),"object"===typeof o.data){t.next=13;break}a({type:"SET_ERROR",payload:{error_code:-1,data:{msg:"Something went wrong"},status:"failure"}}),t.next=22;break;case 13:if(0!==o.data.error_code){t.next=18;break}console.log(o.data),a({type:"GET_RELEASE_TIME_TABLE",payload:o.data}),t.next=22;break;case 18:if(-1!==o.data.error_code){t.next=22;break}return s={header:"Error",content:"No data found for selected Exam Range..! / Freezing Not Done"},a(Object(i.w)(s)),t.abrupt("return",-1);case 22:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()},j=function(e){return function(){var t=Object(o.a)(c.a.mark(function t(a,r){var n,o,s,u;return c.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=r(),n.user.fdeggrp,a({type:"SET_LOADER"}),a({type:"UNSET_LOADER"}),t.next=6,l.a.post("/app.php?a=releasetimetable&univcode="+n.univ.funivcode,{data:{dgp:e.fdeggrp,year:e.fyear,examtype:e.fexamtype,examrange:e.fexamrange,user:n.user.fname,tabledata:n.releaseTimeTable.relarr}});case 6:"object"!==typeof(o=t.sent).data?a({type:"SET_ERROR",payload:{error_code:-1,data:{msg:"Something went wrong"},status:"failure"}}):0===o.data.error_code?(s={header:"Success",content:o.data.data.msg},a(Object(i.w)(s))):-1===o.data.error_code&&(u={header:"Error",content:o.data.data.msg},a(Object(i.w)(u)));case 8:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()}},328:function(e,t,a){"use strict";var r=a(2),n=a(3),c=a(99),o=a(100),l=a(102),i=a(101),s=a(103),u=a(1),p=a.n(u),d=a(1096),f=a(1106),m=a(1098),g=a(309),h=a(1100),E=a(998),b=a(999),y=a(104),v=a(298),x=a(271),O=function(e){function t(){var e,a;Object(c.a)(this,t);for(var r=arguments.length,o=new Array(r),s=0;s<r;s++)o[s]=arguments[s];return(a=Object(l.a)(this,(e=Object(i.a)(t)).call.apply(e,[this].concat(o)))).state={deggrp:[],fdeggrp:"",fyear:"",fexamtype:"",fexamdate:"",fexamrange:"ABCDEF",deggrpError:!1,frtype:"QP Code Wise",frtypes:["Error Report","QP Code Wise","Degree Wise"],fexamrangeError:!1,frtypeError:!1,ferror:!1,ferrorm:"",rftype:"PDF Format",emptydates:!1,fdegfrom:"0",fdegto:"ZZZZ"},a.changeDeggrp=function(e,t){var r=a.state.deggrp.filter(function(e,a){return e.fdeggrp===t.value})[0];a.setState({fyear:r.fyear,fexamtype:r.fexamtype,fexamdate:r.fexamdate,fdeggrp:r.fdeggrp})},a.handleChange=function(e,t){a.setState(Object(n.a)({},t.name,t.value))},a.generateReport=function(){var e=a.state,t=e.fdeggrp,r=e.fexamrange,n=e.frtype,c=e.rftype,o=e.emptydates,l=e.fdegfrom,i=e.fdegto;if(""!=t)if(a.setState({deggrpError:!1,ferror:!1,ferrorm:""}),""!=r)if(a.setState({fexamrangeError:!1,ferror:!1,ferrorm:""}),""!=n)if(a.setState({frtypeError:!1,ferror:!1,ferrorm:""}),console.log(c),"Error Report"===n)window.open(x.c+"GenerateExamTimetableError°grp="+a.state.fdeggrp+"&univcode="+a.props.univ.funivcode+"&examrange="+a.state.fexamrange,"_blank");else if("Degree Wise"===n){console.log(n,c);var s=o?"T":"F";console.log(n,c,s),"Excel Format"==c?window.open(x.c+"examTimeTableDegreeWiseExcel°grp="+a.state.fdeggrp+"&univcode="+a.props.univ.funivcode+"&ignorett="+s+"&fdegfrom="+l+"&fdegto="+i+"&examrange="+a.state.fexamrange,"_blank"):window.open(x.c+"GenerateDGExamTimetable°grp="+a.state.fdeggrp+"&univcode="+a.props.univ.funivcode+"&ignorett="+s+"&fdegfrom="+l+"&fdegto="+i+"&examrange="+a.state.fexamrange,"_blank")}else"QP Code Wise"===n&&("Excel Format"==c?window.open(x.c+"examTimeTableQPWiseReportExcel°grp="+a.state.fdeggrp+"&univcode="+a.props.univ.funivcode+"&examrange="+a.state.fexamrange,"_blank"):window.open(x.c+"GenerateQPExamTimetable°grp="+a.state.fdeggrp+"&univcode="+a.props.univ.funivcode+"&examrange="+a.state.fexamrange,"_blank"));else a.setState({frtypeError:!0,ferror:!0,ferrorm:"Report Type required."});else a.setState({fexamrangeError:!0,ferror:!0,ferrorm:"Exam Range required."});else a.setState({deggrpError:!0,ferror:!0,ferrorm:"Degree Group required."})},a.changecheckempty=function(e,t){console.log(t.checked),a.setState({emptydates:t.checked})},a}return Object(s.a)(t,e),Object(o.a)(t,[{key:"componentDidMount",value:function(){this.setState({deggrp:this.props.deggrp})}},{key:"componentDidUpdate",value:function(e){this.props.deggrp!==e.deggrp&&this.setState({deggrp:Object(r.a)(this.props.deggrp)})}},{key:"render",value:function(){var e=this,t=this.state,a=t.fdeggrp,r=t.fyear,c=t.fexamtype,o=t.fexamdate,l=t.fexamrange,i=t.frtype,s=t.frtypes,u=t.deggrpError,y=t.fexamrangeError,x=t.frtypeError,O=t.ferror,j=t.ferrorm,w=t.rftype,T=t.emptydates,S=t.fdegfrom,k=t.fdegto,D=s.map(function(e,t){return{key:t,value:e,text:e}});return p.a.createElement("div",null,p.a.createElement(d.a,{style:{maxHeight:"60%",width:"50%"},dimmer:this.props.dim,open:this.props.open,onClose:this.props.close,closeOnDimmerClick:!1},p.a.createElement(d.a.Header,{style:{display:"flex"}},"Time Table Report",p.a.createElement("div",{className:"ml-auto"},p.a.createElement(f.a,{basic:!0,color:"blue",content:"Generate",onClick:this.generateReport,icon:"file pdf outline"}),p.a.createElement(f.a,{basic:!0,color:"black",icon:"ban",onClick:this.props.close,content:"Cancel"}))),p.a.createElement(d.a.Content,{style:{height:"50vh",overflowY:"auto"}},p.a.createElement(m.a,{error:!0},O?p.a.createElement(g.a,{error:!0,content:j}):null,p.a.createElement(v.a,{changeDeggrp:this.changeDeggrp,frmDeggrp:a,dgerror:u}),p.a.createElement(m.a.Group,null,p.a.createElement(m.a.Input,{placeholder:"Exam Year",value:r,width:4,label:"Exam Year",readOnly:!0}),p.a.createElement(m.a.Input,{placeholder:"Exam Type",value:c,width:3,label:"Exam Type",readOnly:!0}),p.a.createElement(m.a.Input,{placeholder:"Exam Date",label:"Exam Date",width:10,value:o,readOnly:!0})),p.a.createElement("label",null,p.a.createElement("b",null,"Report Type")),p.a.createElement(h.a,{size:"mini",fluid:!0,search:!0,selection:!0,name:"frtype",value:i,onChange:this.handleChange,placeholder:"Report Type",label:"Report Type",error:x,options:D}),"Degree Wise"==i?p.a.createElement(m.a.Group,{style:{marginTop:"10px"}},p.a.createElement(m.a.Input,Object(n.a)({placeholder:"From",error:!1,width:5,onChange:this.handleChange,value:S,name:"fdegfrom",label:"Degree Range"},"error",y)),p.a.createElement(m.a.Input,Object(n.a)({placeholder:"To",error:!1,width:5,onChange:this.handleChange,value:k,name:"fdegto",style:{marginTop:"22px"}},"error",y))):null,p.a.createElement(m.a.Group,null,p.a.createElement(m.a.Input,Object(n.a)({placeholder:"Exam Range",error:!1,width:5,onChange:this.handleChange,value:l,name:"fexamrange",label:"Exam Range"},"error",y))),"Degree Wise"==i?p.a.createElement(E.a,{onChange:function(t,a){return e.changecheckempty(t,a)},value:T,checked:T,label:"Ignore empty Dates"}):null,p.a.createElement(m.a.Group,{inline:!0},p.a.createElement(m.a.Field,{control:b.a,name:"rftype",label:"PDF",value:"PDF Format",checked:"PDF Format"===w,onChange:this.handleChange}),p.a.createElement(m.a.Field,{control:b.a,name:"rftype",label:"EXCEL",value:"Excel Format",checked:"Excel Format"===w,onChange:this.handleChange}))))))}}]),t}(u.Component);t.a=Object(y.b)(function(e){return{deggrp:e.deggrp,univ:e.univ}},{})(O)},346:function(e,t,a){"use strict";t.a=function(){var e=new Date,t=e.getDate(),a=e.getMonth()+1,r=e.getFullYear();return t<10&&(t="0"+t),a<10&&(a="0"+a),e=t+"/"+a+"/"+r}}}]);
//# sourceMappingURL=17.0eecf4d5.chunk.js.map
|