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.145.168.68
(window.webpackJsonp=window.webpackJsonp||[]).push([[40],{1158:function(e,t,r){"use strict";r.r(t);var a=r(3),n=r(0),o=r(41),c=r.n(o),l=r(68),p=r(99),s=r(100),u=r(102),i=r(101),f=r(103),d=r(1),m=r.n(d),g=r(1139),E=r(1106),h=r(272),b=r(1101),y=r(104),x=r(266),v=r(315),T=r(1098),w=r(309),O=r(298),S=r(346),k=(r(273),function(e){function t(){var e,r;Object(p.a)(this,t);for(var n=arguments.length,o=new Array(n),s=0;s<n;s++)o[s]=arguments[s];return(r=Object(u.a)(this,(e=Object(i.a)(t)).call.apply(e,[this].concat(o)))).state={deggrp:[],fdeggrp:r.props.user.fdeggrp,fyear:r.props.user.fyear,fexamtype:r.props.user.fexamtype,fexamdate:r.props.user.fexamdate,fexamrange:r.props.user.fexamrange,fdaytype:"C",fsunday:!1,fstrdate:"",deggrpError:!1,fexamrangeError:!1,fstrdateError:!1,frmSubmit:!1,disabled:!1,table:!1},r.cancel=Object(l.a)(c.a.mark(function e(){return c.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r.setState({fdeggrp:r.props.user.fdeggrp,fyear:r.props.user.fyear,fexamtype:r.props.user.fexamtype,fexamdate:r.props.user.fexamdate,fexamrange:r.props.user.fexamrange,fdaytype:"C",fsunday:!1,fstrdate:Object(S.a)(),freset:!1,deggrpError:!1,fexamrangeError:!1,fstrdateError:!1,frmSubmit:!1,disabled:!1});case 1:case"end":return e.stop()}},e)})),r.changeDeggrp=function(e,t){var a=r.state.deggrp.filter(function(e,r){return e.fdeggrp===t.value})[0];r.setState({fyear:a.fyear,fexamtype:a.fexamtype,fexamdate:a.fexamdate,fdeggrp:a.fdeggrp})},r.handleChangedate=function(e){r.setState(Object(a.a)({},e.target.name,e.target.value))},r.handleChange=function(e,t){switch(t.type){case"text":case"radio":return void r.setState(Object(a.a)({},t.name,t.value));case"checkbox":return void r.setState(Object(a.a)({},t.name,t.checked));default:return}},r.validateForm=Object(l.a)(c.a.mark(function e(){var t,a,n,o,l,p,s,u,i;return c.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=r.state,a=t.fdeggrp,n=t.fyear,o=t.fexamtype,t.fstrdate,l=t.fexamrange,p=t.fdaytype,s=t.fsunday,u=t.table,""!=a){e.next=6;break}return r.setState({deggrpError:!0,ferror:!0,ferrorm:"Degree Group required."}),e.abrupt("return");case 6:r.setState({deggrpError:!1,ferror:!1,ferrorm:""});case 7:if(""!=l){e.next=12;break}return r.setState({fexamrangeError:!0,ferror:!0,ferrorm:"Exam Range required."}),e.abrupt("return");case 12:r.setState({fexamrangeError:!1,ferror:!1,ferrorm:""});case 13:return i={fdeggrp:a,fyear:n,fexamtype:o,fexamrange:l,fdaytype:p,fsunday:s,table:u},e.next=16,r.props.freezetimetable(i);case 16:return r.cancel(),e.abrupt("return",i);case 18:case"end":return e.stop()}},e)})),r.generateTimeTable=Object(l.a)(c.a.mark(function e(){var t;return c.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.validateForm();case 2:t=e.sent,r.props.generateTimetable(t);case 4:case"end":return e.stop()}},e)})),r.handlesubmit=Object(l.a)(c.a.mark(function e(){var t,a,n;return c.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=r.state,a=t.fdeggrp,t.fyear,t.fexamtype,t.fstrdate,n=t.fexamrange,t.fdaytype,t.fsunday,""!=a){e.next=6;break}return r.setState({deggrpError:!0,ferror:!0,ferrorm:"Degree Group required."}),e.abrupt("return");case 6:r.setState({deggrpError:!1,ferror:!1,ferrorm:""});case 7:if(""!=n){e.next=12;break}return r.setState({fexamrangeError:!0,ferror:!0,ferrorm:"Exam Range required."}),e.abrupt("return");case 12:r.setState({fexamrangeError:!1,ferror:!1,ferrorm:""});case 13:-1==r.props.getfreezeTimetable(r.state)?r.props.tablefalse():r.props.tabletrue();case 15:case"end":return e.stop()}},e)})),r}return Object(f.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){var e=Object(l.a)(c.a.mark(function e(){return c.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});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.fdeggrp,r=e.fyear,a=e.fexamtype,n=e.fexamdate,o=(e.fstrdate,e.fexamrange),c=(e.fdaytype,e.ferror),l=e.ferrorm,p=(e.fsunday,e.deggrpError),s=e.fexamrangeError,u=e.disabled;e.table;return m.a.createElement("div",null,m.a.createElement(T.a,{error:!0},c?m.a.createElement(w.a,{error:!0,content:l}):null,m.a.createElement(O.a,{changeDeggrp:this.changeDeggrp,disabled:u,frmDeggrp:t,dgerror:p}),m.a.createElement(T.a.Group,null,m.a.createElement(T.a.Input,{placeholder:"Exam Year",value:r,width:4,label:"Exam Year",readOnly:!0}),m.a.createElement(T.a.Input,{placeholder:"Exam Type",value:a,width:3,label:"Exam Type",readOnly:!0}),m.a.createElement(T.a.Input,{placeholder:"Exam Date",label:"Exam Date",width:10,value:n,readOnly:!0})),m.a.createElement(T.a.Group,null,m.a.createElement(T.a.Input,{placeholder:"Exam Range",width:5,onChange:this.handleChange,value:o,name:"fexamrange",label:"Exam Range",error:s,disabled:u})),m.a.createElement(E.a,{color:"blue",onClick:this.handlesubmit},"Submit")))}}]),t}(d.Component)),R=Object(y.b)(function(e){return{deggrp:e.deggrp,user:e.user}},{generateTimetable:v.e,getfreezeTimetable:v.f,fetchDegGrp:x.j,freezetimetable:v.d})(k),j=r(328),_=r(858),D=function(e){function t(){var e,r;Object(p.a)(this,t);for(var o=arguments.length,s=new Array(o),f=0;f<o;f++)s[f]=arguments[f];return(r=Object(u.a)(this,(e=Object(i.a)(t)).call.apply(e,[this].concat(s)))).state={ttform:{},trrefs:[],open:!1,frmDeggrp:"",frmdegree:"",deggrpError:!1,degreeError:!1,frmSubmit:!1,table:!1},r.tabletru=function(){r.setState({table:!0})},r.tablefls=function(){r.setState({table:!1})},r.cancel=function(){r.child.cancel(),r.props.cancelTimetable(),r.setState({frmSubmit:!1,table:!1})},r.show=function(e){return function(){return r.setState({dimmer:e,open:!0})}},r.close=function(e,t){"keydown"!=e.type&&r.setState({open:!1})},r.setFromValues=function(){var e=Object(l.a)(c.a.mark(function e(t){return c.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.setState({ttform:t,frmSubmit:!0});case 2:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),r.freezeTimeTable=Object(l.a)(c.a.mark(function e(){return c.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.child.validateForm();case 2:if(void 0!==e.sent){e.next=5;break}return e.abrupt("return");case 5:r.setState({table:!1});case 6:case"end":return e.stop()}},e)})),r.deleteRow=function(e,t,o){var c=Object(n.a)({},t,Object(a.a)({},e.target.name,e.target.checked?"T":"F"));r.props.changefreezetimetable(c,o)},r.selectall=function(e){console.log(e.target.checked),console.log(r.props.timetable),r.props.selectallchkbx(e.target.checked)},r.renderHeader=function(){return m.a.createElement(g.a.Header,{style:{display:"flex"}},m.a.createElement("h4",null,"Freeze Time Table"),m.a.createElement("div",{className:"ml-auto"},m.a.createElement(E.a,{basic:!0,onClick:r.freezeTimeTable,color:"teal",icon:"share square",content:"Freeze"}),m.a.createElement(E.a,{basic:!0,onClick:r.cancel,color:"black",icon:"times circle",content:"Cancel"}),m.a.createElement(_.a,{to:"/dashboard"},m.a.createElement(E.a,{basic:!0,color:"red",content:"Exit",icon:"home"}))))},r}return Object(f.a)(t,e),Object(s.a)(t,[{key:"componentDidMount",value:function(){this.props.fetchDegGrp()}},{key:"render",value:function(){var e=this,t=this.state,r=t.dimmer,a=t.open,n=t.table;return console.log(this.props.timetable),m.a.createElement("div",{className:"animated fadeIn"},m.a.createElement(g.a,{fluid:!0},m.a.createElement(g.a.Content,null,this.renderHeader(),m.a.createElement(h.a,null),m.a.createElement(g.a.Description,{style:{height:"72vh",overflowY:"auto"}},m.a.createElement("div",{className:"col-md-8 col-sm-9"},m.a.createElement(R,{setFromValues:this.setFromValues,onRef:function(t){return e.child=t},tabletrue:this.tabletru,tablefalse:this.tablefls})),m.a.createElement(j.a,{open:a,dim:r,close:this.close}),n?m.a.createElement("div",{className:"animated fadeIn"},m.a.createElement("div",{className:"ui mini form"},m.a.createElement(b.a,{celled:!0,padded:!0,selectable:!0,structured:!0,size:"large",color:"olive",style:{marginTop:"25px"}},m.a.createElement(b.a.Header,{style:{fontSize:"1.2em"}},m.a.createElement(b.a.Row,null,m.a.createElement(b.a.HeaderCell,{style:{width:"5%"},singleLine:!0,textAlign:"center"},m.a.createElement("label",null,"Sl. No.")),m.a.createElement(b.a.HeaderCell,{style:{width:"7%"},textAlign:"center"},m.a.createElement("label",null,"QP Code")),m.a.createElement(b.a.HeaderCell,{style:{width:"30%"},textAlign:"center"},m.a.createElement("label",null,"Subject Name")),m.a.createElement(b.a.HeaderCell,{style:{width:"10%"},textAlign:"center"},m.a.createElement("label",null,"Date")),m.a.createElement(b.a.HeaderCell,{style:{width:"20%"},textAlign:"center"},m.a.createElement("label",null,"Timings")),m.a.createElement(b.a.HeaderCell,{style:{width:"5%"},textAlign:"center"},m.a.createElement("label",null,"Freeze"),m.a.createElement("div",{className:"checkbox"},m.a.createElement("input",{type:"checkbox",name:"allfreeze",onChange:function(t){return e.selectall(t)},checked:this.props.timetable.freezeallcheck,disabled:this.props.timetable.frzdisable}))))),m.a.createElement(b.a.Body,null,this.props.timetable.frzarr.map(function(t,r){return m.a.createElement(b.a.Row,{key:r},m.a.createElement(b.a.Cell,{textAlign:"center"},r+1),m.a.createElement(b.a.Cell,{textAlign:"center"},t.fqpcode),m.a.createElement(b.a.Cell,{textAlign:"left"},t.fsubname),m.a.createElement(b.a.Cell,{textAlign:"center"},t.fdate),m.a.createElement(b.a.Cell,{textAlign:"center"},t.fdescpn),m.a.createElement(b.a.Cell,{textAlign:"center"},m.a.createElement("div",{className:"ui checkbox"},m.a.createElement("input",{type:"checkbox",name:"ffreeze",onChange:function(a){return e.deleteRow(a,t,r)},checked:"T"==t.ffreeze,disabled:"T"==t.frelease}),m.a.createElement("label",null," "))))}))))):null))))}}]),t}(m.a.Component);t.default=Object(y.b)(function(e){return{deggrp:e.deggrp,timetable:e.freezeTimeTable}},{fetchDegGrp:x.j,saveExamtimetable:v.l,cancelTimetable:v.a,releaseTimeTable:v.j,changefreezetimetable:v.b,selectallchkbx:v.n})(D)},298:function(e,t,r){"use strict";var a=r(99),n=r(100),o=r(102),c=r(101),l=r(103),p=r(1),s=r.n(p),u=r(104),i=r(1098),f=r(1100),d=r(266),m=function(e){function t(){return Object(a.a)(this,t),Object(o.a)(this,Object(c.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(i.a.Field,{width:"16"},s.a.createElement("label",null,"Degree Group"),s.a.createElement(f.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}(p.Component);t.a=Object(u.b)(function(e){return{deggrp:e.deggrp,user:e.user}},{fetchDegGrp:d.j})(m)},315:function(e,t,r){"use strict";r.d(t,"e",function(){return s}),r.d(t,"h",function(){return u}),r.d(t,"i",function(){return i}),r.d(t,"l",function(){return f}),r.d(t,"m",function(){return d}),r.d(t,"j",function(){return m}),r.d(t,"a",function(){return g}),r.d(t,"f",function(){return E}),r.d(t,"b",function(){return h}),r.d(t,"c",function(){return b}),r.d(t,"d",function(){return y}),r.d(t,"n",function(){return x}),r.d(t,"o",function(){return v}),r.d(t,"g",function(){return T}),r.d(t,"k",function(){return w});var a=r(0),n=r(41),o=r.n(n),c=r(68),l=r(269),p=r(266),s=function(e){return function(){var t=Object(c.a)(o.a.mark(function t(r,a){var n,c;return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=a(),r({type:"SET_LOADER"}),t.next=4,l.a.post("/app.php?a=generateExamTimetable&univcode="+n.univ.funivcode,{data:{frmvalues:e}});case 4:c=t.sent,r({type:"UNSET_LOADER"}),"object"!==typeof c.data?r({type:"SET_ERROR",payload:{error_code:-1,data:{msg:"Something went wrong"},status:"failure"}}):r({type:"SET_ERROR",payload:c.data});case 7:case"end":return t.stop()}},t)}));return function(e,r){return t.apply(this,arguments)}}()},u=function(e){return function(){var t=Object(c.a)(o.a.mark(function t(r,n){var c,s,u,i;return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return c=n(),console.log(e),r({type:"CANCEL_TIMETABLE"}),r({type:"SET_LOADER"}),console.log(e),t.next=7,l.a.post("/app.php?a=getupdateTimetableUT&univcode="+c.univ.funivcode,{data:{frmvalues:Object(a.a)({},c.user,{fexamrange:e.fexamrange,fdeggrp:e.fdeggrp,fyear:e.fyear,fexamtype:e.fexamtype,fexamdate:e.fexamdate,fdegree:e.fdegree})}});case 7:s=t.sent,r({type:"UNSET_LOADER"}),"object"!==typeof s.data?(u={header:"Error",content:"Something went wrong"},r(Object(p.w)(u))):-1===s.data.error_code?(i={header:"Error",content:s.data.data.msg},r(Object(p.w)(i))):r({type:"GENERATE_TIMETABLE",payload:s.data});case 10:case"end":return t.stop()}},t)}));return function(e,r){return t.apply(this,arguments)}}()},i=function(e){return function(){var t=Object(c.a)(o.a.mark(function t(r,a){var n,c,s,u;return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=a(),console.log(e),r({type:"SET_LOADER"}),r({type:"DEL_FETCH_DEGREES_TTM"}),t.next=6,l.a.get("/app.php",{params:{a:"getdegreettm",univcode:n.univ.funivcode,deggrp:e}});case 6:c=t.sent,console.log(c),r({type:"UNSET_LOADER"}),"object"!==typeof c.data?(s={header:"Error",content:"Something went wrong"},r(Object(p.w)(s))):-1===c.data.error_code?(u={header:"Error",content:c.data.data.msg},r(Object(p.w)(u))):r({type:"FETCH_DEGREES_TTM",payload:c.data});case 10:case"end":return t.stop()}},t)}));return function(e,r){return t.apply(this,arguments)}}()},f=function(e,t){return function(){var r=Object(c.a)(o.a.mark(function r(a,n){var c,s,u,i;return o.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return c=n(),a({type:"SET_LOADER"}),r.next=4,l.a.post("/app.php?a=saveExamTimetable&univcode="+c.univ.funivcode,{data:{timetable:e,params:t,user:c.user}});case 4:s=r.sent,a({type:"UNSET_LOADER"}),"object"!==typeof s.data?(u={header:"Error",content:"Something went wrong"},a(Object(p.w)(u))):(i={header:"Success",content:s.data.data.msg},a(Object(p.w)(i)));case 7:case"end":return r.stop()}},r)}));return function(e,t){return r.apply(this,arguments)}}()},d=function(e,t){return function(){var r=Object(c.a)(o.a.mark(function r(a,n){var c,s,u,i;return o.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:return c=n(),a({type:"SET_LOADER"}),r.next=4,l.a.post("/app.php?a=saveExamTimetableUT&univcode="+c.univ.funivcode,{data:{timetable:e,params:t,user:c.user}});case 4:s=r.sent,a({type:"UNSET_LOADER"}),"object"!==typeof s.data?(u={header:"Error",content:"Something went wrong"},a(Object(p.w)(u))):(i={header:"Success",content:s.data.data.msg},a(Object(p.w)(i)));case 7:case"end":return r.stop()}},r)}));return function(e,t){return r.apply(this,arguments)}}()},m=function(e){return function(){var t=Object(c.a)(o.a.mark(function t(r,a){var n,c;return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=a(),r({type:"SET_LOADER"}),t.next=4,l.a.post("/app.php?a=releaseExamTimetable&univcode="+n.univ.funivcode,{data:{params:e}});case 4:c=t.sent,r({type:"UNSET_LOADER"}),"object"!==typeof c.data?r({type:"SET_ERROR",payload:{error_code:-1,data:{msg:"Something went wrong"},status:"failure"}}):r({type:"SET_ERROR",payload:c.data});case 7:case"end":return t.stop()}},t)}));return function(e,r){return t.apply(this,arguments)}}()},g=function(){return{type:"CANCEL_TIMETABLE"}},E=function(e){return function(){var t=Object(c.a)(o.a.mark(function t(r,a){var n,c,s;return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=a(),n.user.fdeggrp,r({type:"SET_LOADER"}),r({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(c=t.sent,r({type:"UNSET_LOADER"}),"object"===typeof c.data){t.next=13;break}r({type:"SET_ERROR",payload:{error_code:-1,data:{msg:"Something went wrong"},status:"failure"}}),t.next=21;break;case 13:if(0!==c.data.error_code){t.next=17;break}r({type:"GET_FREEZE_TIME_TABLE",payload:c.data}),t.next=21;break;case 17:if(-1!==c.data.error_code){t.next=21;break}return s={header:"Error",content:"No data found for selected Exam Range..!"},r(Object(p.w)(s)),t.abrupt("return",-1);case 21:case"end":return t.stop()}},t)}));return function(e,r){return t.apply(this,arguments)}}()},h=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(c.a)(o.a.mark(function t(r,a){var n,c,s;return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=a(),console.log(e,n.freezeTimeTable),n.user.fdeggrp,r({type:"SET_LOADER"}),r({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(c=t.sent).data?r({type:"SET_ERROR",payload:{error_code:-1,data:{msg:"Something went wrong"},status:"failure"}}):0===c.data.error_code&&(s={header:"Success",content:c.data.data.msg},r(Object(p.w)(s)));case 9:case"end":return t.stop()}},t)}));return function(e,r){return t.apply(this,arguments)}}()},x=function(e){return{type:"FREEZE_SELECT_ALL_CHECKBOX",payload:e}},v=function(e){return{type:"RELEASE_SELECT_ALL_CHECKBOX",payload:e}},T=function(e){return function(){var t=Object(c.a)(o.a.mark(function t(r,a){var n,c,s;return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=a(),n.user.fdeggrp,r({type:"SET_LOADER"}),r({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(c=t.sent,r({type:"UNSET_LOADER"}),"object"===typeof c.data){t.next=13;break}r({type:"SET_ERROR",payload:{error_code:-1,data:{msg:"Something went wrong"},status:"failure"}}),t.next=22;break;case 13:if(0!==c.data.error_code){t.next=18;break}console.log(c.data),r({type:"GET_RELEASE_TIME_TABLE",payload:c.data}),t.next=22;break;case 18:if(-1!==c.data.error_code){t.next=22;break}return s={header:"Error",content:"No data found for selected Exam Range..! / Freezing Not Done"},r(Object(p.w)(s)),t.abrupt("return",-1);case 22:case"end":return t.stop()}},t)}));return function(e,r){return t.apply(this,arguments)}}()},w=function(e){return function(){var t=Object(c.a)(o.a.mark(function t(r,a){var n,c,s,u;return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=a(),n.user.fdeggrp,r({type:"SET_LOADER"}),r({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(c=t.sent).data?r({type:"SET_ERROR",payload:{error_code:-1,data:{msg:"Something went wrong"},status:"failure"}}):0===c.data.error_code?(s={header:"Success",content:c.data.data.msg},r(Object(p.w)(s))):-1===c.data.error_code&&(u={header:"Error",content:c.data.data.msg},r(Object(p.w)(u)));case 8:case"end":return t.stop()}},t)}));return function(e,r){return t.apply(this,arguments)}}()}},328:function(e,t,r){"use strict";var a=r(2),n=r(3),o=r(99),c=r(100),l=r(102),p=r(101),s=r(103),u=r(1),i=r.n(u),f=r(1096),d=r(1106),m=r(1098),g=r(309),E=r(1100),h=r(998),b=r(999),y=r(104),x=r(298),v=r(271),T=function(e){function t(){var e,r;Object(o.a)(this,t);for(var a=arguments.length,c=new Array(a),s=0;s<a;s++)c[s]=arguments[s];return(r=Object(l.a)(this,(e=Object(p.a)(t)).call.apply(e,[this].concat(c)))).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"},r.changeDeggrp=function(e,t){var a=r.state.deggrp.filter(function(e,r){return e.fdeggrp===t.value})[0];r.setState({fyear:a.fyear,fexamtype:a.fexamtype,fexamdate:a.fexamdate,fdeggrp:a.fdeggrp})},r.handleChange=function(e,t){r.setState(Object(n.a)({},t.name,t.value))},r.generateReport=function(){var e=r.state,t=e.fdeggrp,a=e.fexamrange,n=e.frtype,o=e.rftype,c=e.emptydates,l=e.fdegfrom,p=e.fdegto;if(""!=t)if(r.setState({deggrpError:!1,ferror:!1,ferrorm:""}),""!=a)if(r.setState({fexamrangeError:!1,ferror:!1,ferrorm:""}),""!=n)if(r.setState({frtypeError:!1,ferror:!1,ferrorm:""}),console.log(o),"Error Report"===n)window.open(v.c+"GenerateExamTimetableError°grp="+r.state.fdeggrp+"&univcode="+r.props.univ.funivcode+"&examrange="+r.state.fexamrange,"_blank");else if("Degree Wise"===n){console.log(n,o);var s=c?"T":"F";console.log(n,o,s),"Excel Format"==o?window.open(v.c+"examTimeTableDegreeWiseExcel°grp="+r.state.fdeggrp+"&univcode="+r.props.univ.funivcode+"&ignorett="+s+"&fdegfrom="+l+"&fdegto="+p+"&examrange="+r.state.fexamrange,"_blank"):window.open(v.c+"GenerateDGExamTimetable°grp="+r.state.fdeggrp+"&univcode="+r.props.univ.funivcode+"&ignorett="+s+"&fdegfrom="+l+"&fdegto="+p+"&examrange="+r.state.fexamrange,"_blank")}else"QP Code Wise"===n&&("Excel Format"==o?window.open(v.c+"examTimeTableQPWiseReportExcel°grp="+r.state.fdeggrp+"&univcode="+r.props.univ.funivcode+"&examrange="+r.state.fexamrange,"_blank"):window.open(v.c+"GenerateQPExamTimetable°grp="+r.state.fdeggrp+"&univcode="+r.props.univ.funivcode+"&examrange="+r.state.fexamrange,"_blank"));else r.setState({frtypeError:!0,ferror:!0,ferrorm:"Report Type required."});else r.setState({fexamrangeError:!0,ferror:!0,ferrorm:"Exam Range required."});else r.setState({deggrpError:!0,ferror:!0,ferrorm:"Degree Group required."})},r.changecheckempty=function(e,t){console.log(t.checked),r.setState({emptydates:t.checked})},r}return Object(s.a)(t,e),Object(c.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(a.a)(this.props.deggrp)})}},{key:"render",value:function(){var e=this,t=this.state,r=t.fdeggrp,a=t.fyear,o=t.fexamtype,c=t.fexamdate,l=t.fexamrange,p=t.frtype,s=t.frtypes,u=t.deggrpError,y=t.fexamrangeError,v=t.frtypeError,T=t.ferror,w=t.ferrorm,O=t.rftype,S=t.emptydates,k=t.fdegfrom,R=t.fdegto,j=s.map(function(e,t){return{key:t,value:e,text:e}});return i.a.createElement("div",null,i.a.createElement(f.a,{style:{maxHeight:"60%",width:"50%"},dimmer:this.props.dim,open:this.props.open,onClose:this.props.close,closeOnDimmerClick:!1},i.a.createElement(f.a.Header,{style:{display:"flex"}},"Time Table Report",i.a.createElement("div",{className:"ml-auto"},i.a.createElement(d.a,{basic:!0,color:"blue",content:"Generate",onClick:this.generateReport,icon:"file pdf outline"}),i.a.createElement(d.a,{basic:!0,color:"black",icon:"ban",onClick:this.props.close,content:"Cancel"}))),i.a.createElement(f.a.Content,{style:{height:"50vh",overflowY:"auto"}},i.a.createElement(m.a,{error:!0},T?i.a.createElement(g.a,{error:!0,content:w}):null,i.a.createElement(x.a,{changeDeggrp:this.changeDeggrp,frmDeggrp:r,dgerror:u}),i.a.createElement(m.a.Group,null,i.a.createElement(m.a.Input,{placeholder:"Exam Year",value:a,width:4,label:"Exam Year",readOnly:!0}),i.a.createElement(m.a.Input,{placeholder:"Exam Type",value:o,width:3,label:"Exam Type",readOnly:!0}),i.a.createElement(m.a.Input,{placeholder:"Exam Date",label:"Exam Date",width:10,value:c,readOnly:!0})),i.a.createElement("label",null,i.a.createElement("b",null,"Report Type")),i.a.createElement(E.a,{size:"mini",fluid:!0,search:!0,selection:!0,name:"frtype",value:p,onChange:this.handleChange,placeholder:"Report Type",label:"Report Type",error:v,options:j}),"Degree Wise"==p?i.a.createElement(m.a.Group,{style:{marginTop:"10px"}},i.a.createElement(m.a.Input,Object(n.a)({placeholder:"From",error:!1,width:5,onChange:this.handleChange,value:k,name:"fdegfrom",label:"Degree Range"},"error",y)),i.a.createElement(m.a.Input,Object(n.a)({placeholder:"To",error:!1,width:5,onChange:this.handleChange,value:R,name:"fdegto",style:{marginTop:"22px"}},"error",y))):null,i.a.createElement(m.a.Group,null,i.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"==p?i.a.createElement(h.a,{onChange:function(t,r){return e.changecheckempty(t,r)},value:S,checked:S,label:"Ignore empty Dates"}):null,i.a.createElement(m.a.Group,{inline:!0},i.a.createElement(m.a.Field,{control:b.a,name:"rftype",label:"PDF",value:"PDF Format",checked:"PDF Format"===O,onChange:this.handleChange}),i.a.createElement(m.a.Field,{control:b.a,name:"rftype",label:"EXCEL",value:"Excel Format",checked:"Excel Format"===O,onChange:this.handleChange}))))))}}]),t}(u.Component);t.a=Object(y.b)(function(e){return{deggrp:e.deggrp,univ:e.univ}},{})(T)},346:function(e,t,r){"use strict";t.a=function(){var e=new Date,t=e.getDate(),r=e.getMonth()+1,a=e.getFullYear();return t<10&&(t="0"+t),r<10&&(r="0"+r),e=t+"/"+r+"/"+a}}}]);
//# sourceMappingURL=40.75b5a08f.chunk.js.map
|