0xV3NOMx
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.217.242.39


Current Path : /var/www/egov/build/static/js/
Upload File :
Current File : /var/www/egov/build/static/js/66.d428363a.chunk.js

(window.webpackJsonp=window.webpackJsonp||[]).push([[66],{1060:function(e,t,a){"use strict";a.r(t);var n=a(3),r=a(41),c=a.n(r),l=a(68),o=a(99),i=a(100),s=a(102),d=a(101),u=a(103),p=a(1),m=a.n(p),f=a(1139),h=a(1106),E=a(272),g=a(1098),b=a(1100),v=a(104),C=a(858),R=a(266),y=a(381),M=a(488),O=function(e){function t(){var e,a;Object(o.a)(this,t);for(var r=arguments.length,i=new Array(r),u=0;u<r;u++)i[u]=arguments[u];return(a=Object(s.a)(this,(e=Object(d.a)(t)).call.apply(e,[this].concat(i)))).state={displayTbl:!1,fdegree:"",fexamno:"",frmSubmit:!1},a.componentDidMount=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,a.props.fetchDegrees(a.props.user.fdeggrp);case 2:case"end":return e.stop()}},e)})),a.handleChange=function(){var e=Object(l.a)(c.a.mark(function e(t,r){return c.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a.setState(Object(n.a)({},r.name,r.value)),"fdegree"!=r.name){e.next=4;break}return e.next=4,a.props.getExamNo(r.value);case 4:case"end":return e.stop()}},e)}));return function(t,a){return e.apply(this,arguments)}}(),a.getCreditRange=function(){a.props.getCreditMaster(a.state.fdegree,a.state.fexamno),a.setState({displayTbl:!0,frmSubmit:!0})},a.handleCancel=function(){a.setState({displayTbl:!1,fdegree:"",fexamno:"",frmSubmit:!1}),a.props.deleteCredit()},a.handleSave=Object(l.a)(c.a.mark(function e(){var t,n;return c.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=a.props.creditMaster,n=t.filter(function(e){if(""!==e.FFROMMARK&&""!==e.FTOMARK&&""!==e.FCREDIT&&""!==e.FGRADE)return e}),e.next=4,a.props.saveCreditMaster(a.state.fdegree,a.state.fexamno,n);case 4:0==a.props.error.error_code&&a.handleCancel();case 5:case"end":return e.stop()}},e)})),a.renderHeader=function(){return m.a.createElement(f.a.Header,{style:{display:"flex"}},m.a.createElement("h3",null,"Credit Master"),m.a.createElement("div",{className:"ml-auto"},m.a.createElement(h.a,{disabled:!a.state.frmSubmit,basic:!0,color:"green",content:"Save",onClick:a.handleSave,icon:"save"}),m.a.createElement(h.a,{basic:!0,onClick:a.handleCancel,color:"black",icon:"ban",content:"Cancel"}),m.a.createElement(C.a,{to:"/dashboard"},m.a.createElement(h.a,{basic:!0,color:"red",content:"Exit",icon:"home"}))))},a}return Object(u.a)(t,e),Object(i.a)(t,[{key:"render",value:function(){var e=this,t=this.state,a=t.displayTbl,n=t.fdegree,r=t.fexamno,c=this.props.degrees,l=this.props.ExamNoDet;return m.a.createElement("div",{className:"animated fadeIn"},m.a.createElement(f.a,{fluid:!0},m.a.createElement(f.a.Content,null,this.renderHeader(),m.a.createElement(E.a,null),m.a.createElement(f.a.Description,{style:{height:"72vh",overflowY:"auto"}},m.a.createElement(g.a,null,m.a.createElement("div",{className:"col-md-4"},m.a.createElement(g.a.Field,null,m.a.createElement("label",null,"Degree"),m.a.createElement(b.a,{size:"mini",fluid:!0,search:!0,selection:!0,value:n,name:"fdegree",onChange:this.handleChange,placeholder:"Select Degree",disabled:this.props.disabled,options:c.map(function(e,t){return{key:t,value:e.fdegree,text:"".concat(e.fdegree,"-").concat(e.fdescpn)}})})),m.a.createElement(g.a.Field,null,m.a.createElement("label",null,"Exam"),m.a.createElement(b.a,{size:"mini",fluid:!0,search:!0,selection:!0,name:"fexamno",value:r,onChange:this.handleChange,placeholder:"Select Semister",disabled:this.props.disabled,options:l.map(function(e,t){return{key:t,value:e.FEXAMNO,text:"".concat(e.FEXAMNAME)}})})),m.a.createElement(h.a,{color:"blue",className:"small ui button",onClick:this.getCreditRange},"Submit"))),a?m.a.createElement("div",{className:"col-md-8"},m.a.createElement(M.a,{onRef:function(t){return e.holidaytable=t}})):null))))}}]),t}(p.Component);t.default=Object(v.b)(function(e){return{user:e.user,error:e.error,degrees:e.degrees,ExamNoDet:e.getExmNo,creditMaster:e.creditMaster}},{fetchDegrees:R.k,showError:R.w,getExamNo:R.q,getCreditMaster:y.d,saveCreditMaster:y.e,deleteCredit:y.c})(O)},272:function(e,t,a){"use strict";var n=a(268),r=a.n(n),c=a(265),l=a.n(c),o=a(1),i=a.n(o),s=a(333),d=a(551),u=a(549),p=a(267);function m(e){var t=e.children,a=e.className,n=e.clearing,c=e.content,o=e.fitted,f=e.hidden,h=e.horizontal,E=e.inverted,g=e.section,b=e.vertical,v=l()("ui",Object(s.a)(n,"clearing"),Object(s.a)(o,"fitted"),Object(s.a)(f,"hidden"),Object(s.a)(h,"horizontal"),Object(s.a)(E,"inverted"),Object(s.a)(g,"section"),Object(s.a)(b,"vertical"),"divider",a),C=Object(d.a)(m,e),R=Object(u.a)(m,e);return i.a.createElement(R,r()({},C,{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},381:function(e,t,a){"use strict";a.d(t,"d",function(){return i}),a.d(t,"b",function(){return s}),a.d(t,"a",function(){return d}),a.d(t,"c",function(){return u}),a.d(t,"e",function(){return p});var n=a(41),r=a.n(n),c=a(68),l=a(269),o=a(266),i=function(e,t){return function(){var a=Object(c.a)(r.a.mark(function a(n,c){var o,i;return r.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return o=c(),n({type:"SET_LOADER"}),a.next=4,l.a.get("/app.php",{params:{a:"getCreditMaster",fdegree:e,fexamno:t,univcode:o.univ.funivcode}});case 4:i=a.sent,n({type:"UNSET_LOADER"}),"object"!==typeof i.data?n({type:"SET_ERROR",payload:{error_code:-1,data:{msg:"Something went wrong"},status:"failure"}}):-1===i.data.error_code?n({type:"SET_ERROR",payload:i.data}):n({type:"FETCH_CREDIT",payload:i.data});case 7:case"end":return a.stop()}},a)}));return function(e,t){return a.apply(this,arguments)}}()},s=function(e,t){return{type:"CHANGE_CREDIT",payload:{el:e,i:t}}},d=function(e,t){return{type:"ADD_CREDIT",payload:{el:e}}},u=function(){return{type:"DELETE_CREDIT"}},p=function(e,t,a){return function(){var n=Object(c.a)(r.a.mark(function n(c,i){var s,d,u;return r.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return s=i(),c({type:"SET_LOADER"}),n.next=4,l.a.post("/app.php?a=saveCreditMaster&univcode="+s.univ.funivcode,{data:{fdegree:e,fexamno:t,credits:a}});case 4:d=n.sent,c({type:"UNSET_LOADER"}),"object"!==typeof d.data?c({type:"SET_ERROR",payload:{error_code:-1,data:{msg:"Something went wrong"},status:"failure"}}):(u={header:"Success",content:d.data.data.msg},c(Object(o.w)(u)),c({type:"SET_ERROR",payload:d.data}));case 7:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}()}},488:function(e,t,a){"use strict";var n=a(3),r=a(0),c=a(99),l=a(100),o=a(102),i=a(101),s=a(103),d=a(1),u=a.n(d),p=a(104),m=a(272),f=a(1101),h=a(381),E=a(266),g=a(270),b=function(e){function t(){var e,a;Object(c.a)(this,t);for(var l=arguments.length,s=new Array(l),d=0;d<l;d++)s[d]=arguments[d];return(a=Object(o.a)(this,(e=Object(i.a)(t)).call.apply(e,[this].concat(s)))).changeCell=function(e,t,c){var l=Object(r.a)({},t,Object(n.a)({},e.target.name,e.target.value));a.props.changeCreditMaster(l,c)},a.addRow=function(){var e=a.props.creditMaster.length,t=a.props.creditMaster[e-1];if(""!==t.FFROMMARK&&""!==t.FTOMARK&&""!==t.FCREDIT&&""!==t.FGRADE){var n=!1;a.props.creditMaster.map(function(a,r){a.FCREDIT==t.FCREDIT&&e-1!==r&&(n=!0)});var r=!1,c=!1,l=0;if(a.props.creditMaster.map(function(e,t){e.FFROMMARK>0&&e.FFROMMARK<l&&(r=!0),e.FFROMMARK>e.FTOMARK&&(c=!0),e.FFROMMARK,l=e.FTOMARK}),n){a.props.showError({header:"Error",content:"Duplicate date. Enter another Credit."})}else if(r){a.props.showError({header:"Error",content:"From Marks should be grater than Previous To Marks"})}else if(c){a.props.showError({header:"Error",content:"To Marks should be grater than From Marks"})}else{a.props.addCredit({FFROMMARK:"",FTOMARK:"",FCREDIT:"",FGRADE:"",fdeleted:!1})}}else{a.props.showError({header:"Error",content:"Please fill all details"})}},a.deleteRow=function(e,t,c){var l=Object(r.a)({},t,Object(n.a)({},e.target.name,e.target.checked));a.props.changeCreditMaster(l,c)},a}return Object(s.a)(t,e),Object(l.a)(t,[{key:"componentDidMount",value:function(){this.props.onRef(this)}},{key:"render",value:function(){var e=this,t=this.props.creditMaster,a=t.length;return u.a.createElement("div",{className:"ui mini form"},u.a.createElement(m.a,null),u.a.createElement(f.a,{celled:!0,style:{fontSize:"1.2536em"}},u.a.createElement(f.a.Header,null,u.a.createElement(f.a.Row,null,u.a.createElement(f.a.HeaderCell,{style:{width:"5%"},singleLine:!0,textAlign:"center"},"Sl. No."),u.a.createElement(f.a.HeaderCell,{textAlign:"center"},"From Marks(>=)"),u.a.createElement(f.a.HeaderCell,{textAlign:"center"},"To Marks","(<)"),u.a.createElement(f.a.HeaderCell,{textAlign:"center"},"Credit Point"),u.a.createElement(f.a.HeaderCell,{textAlign:"center"},"Grade"),u.a.createElement(f.a.HeaderCell,{style:{width:"10%"},textAlign:"center"},"Del"))),u.a.createElement(f.a.Body,null,t.map(function(t,n){return u.a.createElement(f.a.Row,{key:n},u.a.createElement(f.a.Cell,{textAlign:"center"},n+1),u.a.createElement(f.a.Cell,null,u.a.createElement("div",{className:"field"},u.a.createElement("input",{className:"field",type:"text",name:"FFROMMARK",id:n,value:t.FFROMMARK,onKeyPress:g.d,maxLength:"5",onChange:function(a){return e.changeCell(a,t,n)},placeholder:"From Marks"}))),u.a.createElement(f.a.Cell,{textAlign:"center",singleLine:!0},u.a.createElement("input",{className:"field",type:"text",name:"FTOMARK",id:n,maxLength:"6",value:t.FTOMARK,onKeyPress:g.d,onChange:function(a){return e.changeCell(a,t,n)},placeholder:"To Marks"})),u.a.createElement(f.a.Cell,{textAlign:"center",singleLine:!0},u.a.createElement("input",{className:"field",type:"text",name:"FCREDIT",maxLength:"5",id:n,value:t.FCREDIT,onKeyPress:g.d,onChange:function(a){return e.changeCell(a,t,n)},placeholder:"Credit Point"})),u.a.createElement(f.a.Cell,{textAlign:"center",singleLine:!0},u.a.createElement("input",{className:"field",type:"text",name:"FGRADE",maxLength:"5",id:n,value:t.FGRADE,onChange:function(a){return e.changeCell(a,t,n)},placeholder:"Grade"})),u.a.createElement(f.a.Cell,{textAlign:"center"},a==n+1?u.a.createElement("div",{className:"ui checkbox"},u.a.createElement("input",{type:"checkbox",onKeyDown:function(t){return 9===t.keyCode&&e.addRow()},name:"fdeleted",value:t.fdeleted,onChange:function(a){return e.deleteRow(a,t,n)},checked:"true"==t.fdeleted?"checked":null}),u.a.createElement("label",null," ")):u.a.createElement("div",{className:"ui checkbox"},u.a.createElement("input",{type:"checkbox",name:"fdeleted",value:t.fdeleted,onChange:function(a){return e.deleteRow(a,t,n)},checked:"true"==t.fdeleted?"checked":null}),u.a.createElement("label",null," "))))}))))}}]),t}(d.Component);t.a=Object(p.b)(function(e){return{creditMaster:e.creditMaster}},{changeCreditMaster:h.b,showError:E.w,addCredit:h.a})(b)}}]);
//# sourceMappingURL=66.d428363a.chunk.js.map