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.156.226
(window.webpackJsonp=window.webpackJsonp||[]).push([[67],{1150:function(e,t,a){"use strict";a.r(t);var n=a(41),r=a.n(n),c=a(68),o=a(3),d=a(0),i=a(99),u=a(100),l=a(102),s=a(101),p=a(103),f=a(1),h=a.n(f),m=a(1139),b=a(1106),g=a(272),v=a(1101),E=a(1098),w=a(352),y=a(104),j=a(858),O=a(266),C=a(269),x=a(330),D=a(270),S=function(e){function t(){var e,a;Object(i.a)(this,t);for(var n=arguments.length,u=new Array(n),p=0;p<n;p++)u[p]=arguments[p];return(a=Object(l.a)(this,(e=Object(s.a)(t)).call.apply(e,[this].concat(u)))).state={codeDis:!0},a.changeCell=function(e,t,n){var r={},c="CHANGE_BOARDDET";if("checkbox"==e.type){var i=e.checked?"T":"F";r=Object(d.a)({},t,Object(o.a)({},e.name,i)),a.props.changeDet(r,n,c)}else r=Object(d.a)({},t,Object(o.a)({},e.name,e.value)),a.props.changeDet(r,n,c)},a.handleSave=function(){return a.showErr()},a.showErr=Object(c.a)(r.a.mark(function e(){var t;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!(a.props.boardList.filter(function(e,t){return""==e.fboardname}).length>2)){e.next=7;break}return t={header:"Error",content:"Fill Details Before saving. "},a.props.showError(t),e.abrupt("return");case 7:return e.next=9,a.props.saveBoardMaster();case 9:a.props.getBoardLists();case 10:case"end":return e.stop()}},e)})),a.add=Object(c.a)(r.a.mark(function e(){var t,n,c;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=a.props.boardList.length,""!==(n=a.props.boardList[t-1]).fboardcode&&""!==n.fboardname){e.next=6;break}return c={header:"Error",content:"Fill Details to Add next Row. "},a.props.showError(c),e.abrupt("return");case 6:return"ADD_BOARDS",e.next=9,a.props.addRow("ADD_BOARDS");case 9:case"end":return e.stop()}},e)})),a}return Object(p.a)(t,e),Object(u.a)(t,[{key:"componentDidMount",value:function(){var e=Object(c.a)(r.a.mark(function e(){return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.props.getBoardLists();case 2:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}()},{key:"render",value:function(){var e=this,t=this.props.boardList,a=Object(D.i)();return h.a.createElement(h.a.Fragment,null,h.a.createElement(m.a,{fluid:!0},h.a.createElement(m.a.Content,null,h.a.createElement(m.a.Header,{style:{display:"flex"}},h.a.createElement("h3",null,"Board Master"),h.a.createElement("div",{className:"ml-auto"},h.a.createElement(b.a,{basic:!0,size:"small",onClick:this.add,color:"blue",icon:"plus",content:"Add"}),h.a.createElement(b.a,{basic:!0,color:"green",content:"Save",onClick:this.handleSave,icon:"save"}),h.a.createElement(j.a,{to:"/dashboard"},h.a.createElement(b.a,{basic:!0,color:"red",content:"Exit",icon:"home"})))),h.a.createElement(g.a,null),h.a.createElement(m.a.Description,{style:{height:"".concat(a,"px"),overflowY:"auto"}},h.a.createElement(v.a,{celled:!0,compact:!0,style:{padding:"0%"}},h.a.createElement(v.a.Header,null,h.a.createElement(v.a.Row,{textAlign:"center"},h.a.createElement(v.a.HeaderCell,{width:"1"},"Sl. No."),h.a.createElement(v.a.HeaderCell,{width:"2"},"Code"),h.a.createElement(v.a.HeaderCell,{width:"4"},"Description"),h.a.createElement(v.a.HeaderCell,{width:"2"},"Chairman Code"),h.a.createElement(v.a.HeaderCell,{width:"4"},"Chairman Name"),h.a.createElement(v.a.HeaderCell,{width:"5"},"Mobile No."),h.a.createElement(v.a.HeaderCell,{width:"4"},"Email"),h.a.createElement(v.a.HeaderCell,{width:"1"},"Del"))),h.a.createElement(v.a.Body,null,t.map(function(a,n){return h.a.createElement(v.a.Row,null,h.a.createElement(v.a.Cell,{textAlign:"center"},n+1),h.a.createElement(v.a.Cell,{style:{padding:"0px 0px"}},h.a.createElement(E.a.Input,{placeholder:"Code",className:"center",value:a.fboardcode,style:{width:"65px",textAlign:"center"},name:"fboardcode",textAlign:"center",maxLength:4,readOnly:void 0==a.fedit,onChange:function(t,r){return e.changeCell(r,a,n)}})),h.a.createElement(v.a.Cell,{style:{padding:"0px 0px"}},h.a.createElement(E.a.Input,{placeholder:"Board Name",value:a.fboardname,style:{width:"100%"},name:"fboardname",onChange:function(t,r){return e.changeCell(r,a,n)}})),h.a.createElement(v.a.Cell,{style:{padding:"0px 0px"}},h.a.createElement(E.a.Input,{placeholder:"Chairman Code",value:a.fchairman,style:{width:"100%"},name:"fchairman",onChange:function(t,r){return e.changeCell(r,a,n)}})),h.a.createElement(v.a.Cell,{style:{padding:"0px 0px"}},h.a.createElement(E.a.Input,{placeholder:"Chairman Name",value:a.fboename,style:{width:"100%"},name:"fboename",onChange:function(t,r){return e.changeCell(r,a,n)}})),h.a.createElement(v.a.Cell,{style:{padding:"0px 0px"}},h.a.createElement(E.a.Input,{placeholder:"Mobile number",value:a.fboemobileno,style:{width:"100%"},name:"fboemobileno",onChange:function(t,r){return e.changeCell(r,a,n)}})),h.a.createElement(v.a.Cell,{style:{padding:"0px 0px"}},h.a.createElement(E.a.Input,{placeholder:"Email ID",value:a.fboeemail,style:{width:"100%"},name:"fboeemail",onChange:function(t,r){return e.changeCell(r,a,n)}})),h.a.createElement(v.a.Cell,{style:{padding:"0px 0px"},textAlign:"center"},t.length==n+1?h.a.createElement(E.a.Checkbox,{value:a.fdeleted,name:"fdeleted",checked:"T"==a.fdeleted,onChange:function(t,r){return e.changeCell(r,a,n)},onKeyDown:function(t){t.preventDefault(),9===t.keyCode&&e.add()}}):h.a.createElement(E.a.Checkbox,{value:a.fdeleted,name:"fdeleted",checked:"T"==a.fdeleted,onChange:function(t,r){return e.changeCell(r,a,n)}})))})))))))}}]),t}(f.Component);t.default=Object(y.b)(function(e){return console.log(e),{board:e.board,boardList:e.boardList}},{fetchBoards:O.g,getBoardLists:function(){return function(){var e=Object(c.a)(r.a.mark(function e(t,a){var n,c,o,d;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=a(),t({type:"SET_LOADER"}),e.next=4,C.a.get("/app.php",{params:{a:"getBoardLists",univcode:n.univ.funivcode}});case 4:c=e.sent,t({type:"UNSET_LOADER"}),console.log(c),"object"!==typeof c.data?(o={header:"Error",content:"Something went wrong"},t(Object(O.w)(o))):-1===c.data.error_code?(d={header:"Error",content:c.data.data.msg},t(Object(O.w)(d))):t({type:"GET_BOARD_LIST",payload:c.data});case 8:case"end":return e.stop()}},e)}));return function(t,a){return e.apply(this,arguments)}}()},changeDet:w.a,saveBoardMaster:function(){return function(){var e=Object(c.a)(r.a.mark(function e(t,a){var n,c,o,d,i;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=a(),e.next=3,C.a.post("app.php?a=saveBoardMaster&univcode="+n.univ.funivcode,{data:n.boardList});case 3:c=e.sent,console.log("REs",c),"object"!==typeof c.data?(o={header:"Error",content:"Something went wrong"},t(Object(O.w)(o))):-1===c.data.error_code?(d={header:"Error",content:c.data.data.msg},t(Object(O.w)(d))):(i={header:"Success",content:c.data.data.msg},t(Object(O.w)(i)));case 6:case"end":return e.stop()}},e)}));return function(t,a){return e.apply(this,arguments)}}()},showError:O.w,addRow:x.a})(S)},272:function(e,t,a){"use strict";var n=a(268),r=a.n(n),c=a(265),o=a.n(c),d=a(1),i=a.n(d),u=a(333),l=a(551),s=a(549),p=a(267);function f(e){var t=e.children,a=e.className,n=e.clearing,c=e.content,d=e.fitted,h=e.hidden,m=e.horizontal,b=e.inverted,g=e.section,v=e.vertical,E=o()("ui",Object(u.a)(n,"clearing"),Object(u.a)(d,"fitted"),Object(u.a)(h,"hidden"),Object(u.a)(m,"horizontal"),Object(u.a)(b,"inverted"),Object(u.a)(g,"section"),Object(u.a)(v,"vertical"),"divider",a),w=Object(l.a)(f,e),y=Object(s.a)(f,e);return i.a.createElement(y,r()({},w,{className:E}),p.a.isNil(t)?c:t)}f.handledProps=["as","children","className","clearing","content","fitted","hidden","horizontal","inverted","section","vertical"],f.propTypes={},t.a=f},330:function(e,t,a){"use strict";a.d(t,"g",function(){return i}),a.d(t,"c",function(){return u}),a.d(t,"d",function(){return l}),a.d(t,"h",function(){return s}),a.d(t,"b",function(){return p}),a.d(t,"a",function(){return f}),a.d(t,"i",function(){return h}),a.d(t,"f",function(){return m}),a.d(t,"e",function(){return b});var n=a(41),r=a.n(n),c=a(68),o=a(269),d=a(266),i=function(){return function(){var e=Object(c.a)(r.a.mark(function e(t,a){var n,c,i,u;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=a(),e.next=3,o.a.get("/app.php",{params:{a:"getSubDet",univcode:n.univ.funivcode,fdeggrp:n.user.fdeggrp,fdegree:n.subjectData.mainlvl.fdegree,fexamno:n.subjectData.mainlvl.fexamno}});case 3:"object"!==typeof(c=e.sent).data?(i={header:"Error",content:"Something went wrong"},t(Object(d.w)(i))):-1===c.data.error_code?(u={header:"Error",content:c.data.data.msg},t(Object(d.w)(u))):t({type:"GET_SUBJECTS",payload:c.data});case 5:case"end":return e.stop()}},e)}));return function(t,a){return e.apply(this,arguments)}}()},u=function(e,t){return{type:"CHANGE_SUB_DATA",payload:{name:e,value:t}}},l=function(e,t){return{type:"CHANGE_SUB_LVL",payload:{el:e,i:t}}},s=function(){return function(){var e=Object(c.a)(r.a.mark(function e(t,a){var n,c,i,u;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=a(),t({type:"SET_LOADER"}),e.next=4,o.a.get("/app.php",{params:{a:"getSubjectData",univcode:n.univ.funivcode,fdegree:n.subjectData.mainlvl.fdegree,fexamno:n.subjectData.mainlvl.fexamno,fsubcode:n.subjectData.mainlvl.fsubcode}});case 4:c=e.sent,t({type:"UNSET_LOADER"}),console.log("Response",c),"object"!==typeof c.data?(i={header:"Error",content:"Something went wrong"},t(Object(d.w)(i))):-1===c.data.error_code?(u={header:"Error",content:c.data.data.msg},t(Object(d.w)(u))):t({type:"GET_SUBJECT_DATA",payload:c.data});case 8:case"end":return e.stop()}},e)}));return function(t,a){return e.apply(this,arguments)}}()},p=function(){return{type:"CANCEL_DET"}},f=function(e){return{type:e}},h=function(){return function(){var e=Object(c.a)(r.a.mark(function e(t,a){var n,c,i,u,l,s;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=a(),c=n.subjectData,t({type:"SET_LOADER"}),e.next=5,o.a.post("app.php?a=saveSubDet&univcode="+n.univ.funivcode,{data:c});case 5:i=e.sent,t({type:"UNSET_LOADER"}),"object"!==typeof i.data?(u={header:"Error",content:"Something went wrong"},t(Object(d.w)(u))):-1===i.data.error_code?(l={header:"Error",content:i.data.data.msg},t(Object(d.w)(l))):(s={header:"Success",content:i.data.data.msg},t(Object(d.w)(s)),t({type:"SUCC_SUBJECT"}));case 8:case"end":return e.stop()}},e)}));return function(t,a){return e.apply(this,arguments)}}()},m=function(e,t){return function(){var a=Object(c.a)(r.a.mark(function a(n,c){var i,u,l,s;return r.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return i=c(),n({type:"SET_LOADER"}),a.next=4,o.a.get("/app.php",{params:{a:"getSubjectData",univcode:i.univ.funivcode,fdegree:e,fsubcode:t,fexamno:i.subjectData.mainlvl.fexamno}});case 4:u=a.sent,n({type:"UNSET_LOADER"}),console.log("Response",u),"object"!==typeof u.data?(l={header:"Error",content:"Something went wrong"},n(Object(d.w)(l))):-1===u.data.error_code?(s={header:"Error",content:u.data.data.msg},n(Object(d.w)(s))):n({type:"GET_OLD_SUBJECT_DATA",payload:u.data});case 8:case"end":return a.stop()}},a)}));return function(e,t){return a.apply(this,arguments)}}()},b=function(e,t,a){return function(){var n=Object(c.a)(r.a.mark(function n(c,i){var u,l,s,p,f;return r.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return u=i(),c({type:"SET_LOADER"}),n.next=4,o.a.get("/app.php",{params:{a:"deleteSub",univcode:u.univ.funivcode,fdegree:e,fexamno:t,fsubcode:a}});case 4:l=n.sent,c({type:"UNSET_LOADER"}),"object"!==typeof l.data?(s={header:"Error",content:"Something went wrong"},c(Object(d.w)(s))):-1===l.data.error_code?(p={header:"Error",content:l.data.data.msg},c(Object(d.w)(p))):(f={header:"Success",content:l.data.data.msg},c(Object(d.w)(f)),c({type:"SUCC_SUBJECT"}));case 7:case"end":return n.stop()}},n)}));return function(e,t){return n.apply(this,arguments)}}()}},352:function(e,t,a){"use strict";a.d(t,"b",function(){return i}),a.d(t,"a",function(){return u}),a.d(t,"c",function(){return l});var n=a(41),r=a.n(n),c=a(68),o=a(269),d=a(266),i=function(e){return function(){var t=Object(c.a)(r.a.mark(function t(a,n){var c,i,u,l;return r.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return c=n(),t.next=3,o.a.get("/app.php",{params:{a:"getreasoncd",univcode:c.univ.funivcode,reasonID:e}});case 3:i=t.sent,console.log(i),"object"!==typeof i.data?(u={header:"Error",content:"Something went wrong"},a(Object(d.w)(u))):-1===i.data.error_code?(l={header:"Error",content:i.data.data.msg},a(Object(d.w)(l))):a({type:"GET_REASONSID",payload:i.data});case 6:case"end":return t.stop()}},t)}));return function(e,a){return t.apply(this,arguments)}}()},u=function(e,t,a){return{type:a,payload:{el:e,i:t}}},l=function(){return function(){var e=Object(c.a)(r.a.mark(function e(t,a){var n,c,i,u,l;return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=a(),e.next=3,o.a.post("app.php?a=saveReasonMaster&univcode="+n.univ.funivcode,{data:n.getReasonsIDs});case 3:c=e.sent,console.log("REs",c),"object"!==typeof c.data?(i={header:"Error",content:"Something went wrong"},t(Object(d.w)(i))):-1===c.data.error_code?(u={header:"Error",content:c.data.data.msg},t(Object(d.w)(u))):(l={header:"Success",content:c.data.data.msg},t(Object(d.w)(l)));case 6:case"end":return e.stop()}},e)}));return function(t,a){return e.apply(this,arguments)}}()}}}]);
//# sourceMappingURL=67.55d135e1.chunk.js.map
|