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.227.46.202


Current Path : /var/www/egov/build/static/js/
Upload File :
Current File : /var/www/egov/build/static/js/296.18ab5afe.chunk.js

(window.webpackJsonp=window.webpackJsonp||[]).push([[296],{1283:function(e,t,a){"use strict";a.r(t);var r=a(3),n=a(68),o=a(100),l=a(101),c=a(103),i=a(102),s=a(104),d=a(2),u=a.n(d),h=a(941),p=a(105),f=a(1377),m=a(1343),y=a(272),g=a(1335),b=a(1337),v=a(267),E=a(298),x=a(300),w=a(419),C=a(287),k=a.n(C);function S(){S=function(){return t};var e,t={},a=Object.prototype,r=a.hasOwnProperty,n=Object.defineProperty||function(e,t,a){e[t]=a.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",i=o.toStringTag||"@@toStringTag";function s(e,t,a){return Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(e){s=function(e,t,a){return e[t]=a}}function d(e,t,a,r){var o=t&&t.prototype instanceof g?t:g,l=Object.create(o.prototype),c=new L(r||[]);return n(l,"_invoke",{value:T(e,a,c)}),l}function u(e,t,a){try{return{type:"normal",arg:e.call(t,a)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var h="suspendedStart",p="suspendedYield",f="executing",m="completed",y={};function g(){}function b(){}function v(){}var E={};s(E,l,function(){return this});var x=Object.getPrototypeOf,w=x&&x(x(F([])));w&&w!==a&&r.call(w,l)&&(E=w);var C=v.prototype=g.prototype=Object.create(E);function k(e){["next","throw","return"].forEach(function(t){s(e,t,function(e){return this._invoke(t,e)})})}function D(e,t){function a(n,o,l,c){var i=u(e[n],e,o);if("throw"!==i.type){var s=i.arg,d=s.value;return d&&"object"==typeof d&&r.call(d,"__await")?t.resolve(d.__await).then(function(e){a("next",e,l,c)},function(e){a("throw",e,l,c)}):t.resolve(d).then(function(e){s.value=e,l(s)},function(e){return a("throw",e,l,c)})}c(i.arg)}var o;n(this,"_invoke",{value:function(e,r){function n(){return new t(function(t,n){a(e,r,t,n)})}return o=o?o.then(n,n):n()}})}function T(t,a,r){var n=h;return function(o,l){if(n===f)throw new Error("Generator is already running");if(n===m){if("throw"===o)throw l;return{value:e,done:!0}}for(r.method=o,r.arg=l;;){var c=r.delegate;if(c){var i=j(c,r);if(i){if(i===y)continue;return i}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===h)throw n=m,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=f;var s=u(t,a,r);if("normal"===s.type){if(n=r.done?m:p,s.arg===y)continue;return{value:s.arg,done:r.done}}"throw"===s.type&&(n=m,r.method="throw",r.arg=s.arg)}}}function j(t,a){var r=a.method,n=t.iterator[r];if(n===e)return a.delegate=null,"throw"===r&&t.iterator.return&&(a.method="return",a.arg=e,j(t,a),"throw"===a.method)||"return"!==r&&(a.method="throw",a.arg=new TypeError("The iterator does not provide a '"+r+"' method")),y;var o=u(n,t.iterator,a.arg);if("throw"===o.type)return a.method="throw",a.arg=o.arg,a.delegate=null,y;var l=o.arg;return l?l.done?(a[t.resultName]=l.value,a.next=t.nextLoc,"return"!==a.method&&(a.method="next",a.arg=e),a.delegate=null,y):l:(a.method="throw",a.arg=new TypeError("iterator result is not an object"),a.delegate=null,y)}function O(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function L(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function F(t){if(t||""===t){var a=t[l];if(a)return a.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var n=-1,o=function a(){for(;++n<t.length;)if(r.call(t,n))return a.value=t[n],a.done=!1,a;return a.value=e,a.done=!0,a};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return b.prototype=v,n(C,"constructor",{value:v,configurable:!0}),n(v,"constructor",{value:b,configurable:!0}),b.displayName=s(v,i,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,s(e,i,"GeneratorFunction")),e.prototype=Object.create(C),e},t.awrap=function(e){return{__await:e}},k(D.prototype),s(D.prototype,c,function(){return this}),t.AsyncIterator=D,t.async=function(e,a,r,n,o){void 0===o&&(o=Promise);var l=new D(d(e,a,r,n),o);return t.isGeneratorFunction(a)?l:l.next().then(function(e){return e.done?e.value:l.next()})},k(C),s(C,i,"Generator"),s(C,l,function(){return this}),s(C,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),a=[];for(var r in t)a.push(r);return a.reverse(),function e(){for(;a.length;){var r=a.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=F,L.prototype={constructor:L,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var a in this)"t"===a.charAt(0)&&r.call(this,a)&&!isNaN(+a.slice(1))&&(this[a]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var a=this;function n(r,n){return c.type="throw",c.arg=t,a.next=r,n&&(a.method="next",a.arg=e),!!n}for(var o=this.tryEntries.length-1;o>=0;--o){var l=this.tryEntries[o],c=l.completion;if("root"===l.tryLoc)return n("end");if(l.tryLoc<=this.prev){var i=r.call(l,"catchLoc"),s=r.call(l,"finallyLoc");if(i&&s){if(this.prev<l.catchLoc)return n(l.catchLoc,!0);if(this.prev<l.finallyLoc)return n(l.finallyLoc)}else if(i){if(this.prev<l.catchLoc)return n(l.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<l.finallyLoc)return n(l.finallyLoc)}}}},abrupt:function(e,t){for(var a=this.tryEntries.length-1;a>=0;--a){var n=this.tryEntries[a];if(n.tryLoc<=this.prev&&r.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var l=o?o.completion:{};return l.type=e,l.arg=t,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(l)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),y},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.finallyLoc===e)return this.complete(a.completion,a.afterLoc),A(a),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.tryLoc===e){var r=a.completion;if("throw"===r.type){var n=r.arg;A(a)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(t,a,r){return this.delegate={iterator:F(t),resultName:a,nextLoc:r},"next"===this.method&&(this.arg=e),y}},t}var D=function(e){function t(){var e,a;Object(o.a)(this,t);for(var l=arguments.length,s=new Array(l),d=0;d<l;d++)s[d]=arguments[d];return(a=Object(c.a)(this,(e=Object(i.a)(t)).call.apply(e,[this].concat(s)))).state={exam:"",board:"All",qpcode:"All",data:[],teach:[],check:"F",emailcheck:"F",formSubmit:!1,teachMob:"",frmdate:"",todate:"",type:"Current",ftoday:k()()},a.componentDidMount=function(){a.props.loadYearAndMode(a.state.type)},a.submitModeratorHandler=Object(n.a)(S().mark(function e(){var t,r,n;return S().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(""!==a.state.exam){e.next=6;break}return t={header:"Error",content:"Select Exam Type"},a.props.showError(t),e.abrupt("return");case 6:if(""!==a.state.board){e.next=10;break}return r={header:"Error",content:"Select Board"},a.props.showError(r),e.abrupt("return");case 10:return e.next=12,a.props.assignModeratorDet(a.state.board,a.state.qpcode,a.state.exam);case 12:n=[],a.props.modDet.map(function(e,t){var a={};null!==e.fteachcode&&(a.data={},a.data.value=e.fteachcode+"-"+e.fmobile,a.data.label=e.fteachcode+" - "+e.fteachname),a.fdeleted=e.fdeleted,a.fmobile=e.fmobile,a.fqpcode=e.fqpcode,a.fstatus=e.fstatus,a.fsubname=e.fsubname,a.fteachcode=e.fteachcode,a.fteachname=e.fteachname,a.fset=e.fset,a.ffromdate=e.ffromdate,a.ftodate=e.ftodate,e.uploaded<=-1?a.uploaded="":a.uploaded=e.uploaded,n.push(a)}),a.setState({data:n}),a.setState({teach:a.props.teachDet}),a.setState({formSubmit:!0});case 17:case"end":return e.stop()}},e)})),a.handleSelectChange=function(){var e=Object(n.a)(S().mark(function e(t,n){var o,l;return S().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:o=t.value.split("-"),l=a.state.data.map(function(e,a){return a===n&&(e.fteachcode=o[0],e.fmobile=o[1],e.data=t),e}),a.setState({data:Object(r.a)(l)});case 3:case"end":return e.stop()}},e)}));return function(t,a){return e.apply(this,arguments)}}(),a.checkDate=function(e,t,r,n){if("from"==n){if(a.state.ftoday.format("YYYY-MM-DD")>e){alert("Enter vaild From date");var o=a.state.data.map(function(e,t){return t===r&&(e.ftodate=""),e});return void a.setState({data:o})}}else if("to"==n&&a.state.ftoday.format("YYYY-MM-DD")>e){alert("Enter vaild To date");var l=a.state.data.map(function(e,t){return t===r&&(e.ffromdate=""),e});return void a.setState({data:l})}},a.handleAllCheckBox=function(e){e.target.checked?a.setState({check:"T"}):a.setState({check:"F"});var t=a.state.data.map(function(t,a){return!0===e.target.checked?(t.fstatus="T",t.onChangeDone="T"):(t.fstatus="F",t.onChangeDone="T"),t});a.setState({data:t})},a.handleAllSentEmail=function(e){e.target.checked?a.setState({emailcheck:"T"}):a.setState({emailcheck:"F"});var t=a.state.data.map(function(t,a){return!0===e.target.checked?(t.emailstatus="T",t.onChangeDone="T"):(t.emailstatus="F",t.onChangeDone="T"),t});a.setState({data:t})},a.handleCheckBox=function(e,t){var n=a.state.data.map(function(a,r){return r===t?(e.target.checked?(a.fstatus="T",a.onChangeDone="T"):(a.fstatus="F",a.onChangeDone="T"),a):a});a.setState({data:Object(r.a)(n)})},a.handleCheckBoxDel=function(e,t){var n=a.state.data.map(function(a,r){return t===r?(e.target.checked?(a.fdeleted="T",a.onChangeDone="T"):(a.fdeleted="F",a.onChangeDone="T"),a):a});a.setState({data:Object(r.a)(n)})},a.handleCheckBoxEmailSent=function(e,t,n){var o=a.state.data.map(function(a,r){return t===r?(e.target.checked?(a.emailstatus="T",a.emailstatus="T",a.onChangeDone="T"):(a.emailstatus="F",a.emailstatus="F",a.onChangeDone="T"),a):a});a.setState({data:Object(r.a)(o)})},a.handleSave=function(){if(""!==a.state.exam)if(""!==a.state.board){var e=a.state,t=e.exam,r=e.board,n=e.qpcode,o=e.data,l=[];o.map(function(e,t){(e.onChangeDone="T")&&l.push(e)});var c=[];l.map(function(e,t){""!==e.fstatus&&null!==e.fteachcode&&"Select"!==e.fteachcode&&c.push(e)});var i=new FormData;i.append("user",a.props.user),i.append("exam",t),i.append("board",r),i.append("qpcode",n),i.append("data",JSON.stringify(c)),a.props.saveAssignModerator(i)}else{a.props.showError({header:"Error",content:"Pick Board"})}else{a.props.showError({header:"Error",content:"Pick Exam"})}},a.changeFrmDate=function(e,t){var n=a.state.data.map(function(a,r){return a.fqpcode===t&&(a.ffromdate=e.target.value,e.onChangeDone="T"),a});a.setState({data:Object(r.a)(n)})},a.changeTodate=function(e,t){var n=a.state.data.map(function(a,r){return a.fqpcode===t&&(a.ftodate=e.target.value,e.onChangeDone="T"),a});a.setState({data:Object(r.a)(n)})},a}return Object(s.a)(t,e),Object(l.a)(t,[{key:"render",value:function(){var e=this,t=this.props.year.map(function(e,t){return{key:t,text:e.fdesexam,value:e.fexamyear}}),a=[{key:"All",text:"All",value:"All"}],n=this.props.loadBoard.map(function(e,t){return{key:t,text:e.fboardname,value:e.fboardcode}}),o=[].concat(a,Object(r.a)(n)),l=this.props.loadQp.map(function(e,t){return{key:t,text:"".concat(e.fqpcode," - ").concat(e.fsubname),value:e.fqpcode}}),c=[].concat(a,Object(r.a)(l)),i=this.state.teach.map(function(e,t){return{value:e.fteachcode+"-"+e.fmobile,label:e.fteachcode+" - "+e.fteachname}}),s=[].concat([{value:"Select",label:"Select"}],Object(r.a)(i));return u.a.createElement(f.a,{fluid:!0},u.a.createElement(f.a.Content,null,u.a.createElement(f.a.Header,{style:{display:"flex"}},u.a.createElement("h4",null,"Assign Moderator"),u.a.createElement("div",{className:"ml-auto"},u.a.createElement(m.a,{basic:!0,color:"green",icon:"save",onClick:this.handleSave,content:"Save"}),u.a.createElement(m.a,{basic:!0,color:"black",icon:"ban",content:"Clear",onClick:function(){e.setState({exam:"",board:"",qpcode:"All",data:[],teach:[],check:"F",formSubmit:!1,type:""})}}),u.a.createElement(h.a,{to:"/dashboard"},u.a.createElement(m.a,{basic:!0,color:"red",content:"Exit",icon:"home"})))),u.a.createElement(y.a,null),u.a.createElement(f.a.Description,null,u.a.createElement(g.a,null,u.a.createElement(g.a.Group,null,u.a.createElement(g.a.Field,{width:4},u.a.createElement("label",null,"Type"),u.a.createElement(b.a,{fluid:!0,search:!0,selection:!0,value:this.state.type,options:[{key:"Current",text:"Current",value:"Current"},{key:"Old",text:"Old",value:"old"}],placeholder:"Select Type",onChange:function(t,a){e.setState({type:a.value,exam:"",formSubmit:!1,qpcode:"All",data:[],teach:[],check:"F"}),e.props.loadYearAndMode(a.value)}})),u.a.createElement(g.a.Field,{width:4},u.a.createElement("label",null,"Exam"),u.a.createElement(b.a,{fluid:!0,search:!0,selection:!0,value:this.state.exam,options:t,allowAdditions:!0,placeholder:"Select Exam",onChange:function(t,a){e.setState({exam:a.value}),e.props.getBoardDet(a.value),e.setState({formSubmit:!1}),e.setState({board:"All"}),e.setState({qpcode:"All"})}})),u.a.createElement(g.a.Field,{width:4},u.a.createElement("label",null,"Board"),u.a.createElement(b.a,{fluid:!0,search:!0,selection:!0,value:this.state.board,options:o,allowAdditions:!0,placeholder:"Select Board",onChange:function(t,a){e.setState({board:a.value}),e.setState({formSubmit:!1}),e.setState({qpcode:"All"}),e.props.getBoardSubj(e.state.exam,a.value)}})),u.a.createElement(g.a.Field,{width:4},u.a.createElement("label",null,"Qp Code"),u.a.createElement(b.a,{fluid:!0,search:!0,selection:!0,value:this.state.qpcode,options:c,allowAdditions:!0,placeholder:"qpcode",onChange:function(t,a){e.setState({qpcode:a.value}),e.setState({formSubmit:!1})}})),u.a.createElement(g.a.Field,{width:4},u.a.createElement(m.a,{style:{position:"absolute",bottom:"3px"},basic:!0,content:"Submit",color:"blue",onClick:function(){return e.submitModeratorHandler()}})))),this.state.formSubmit&&u.a.createElement("div",{style:{height:"550px",overflowY:"auto",border:"1px solid grey"}},u.a.createElement("table",{style:{width:"100%",borderCollapse:"collapse"}},u.a.createElement("thead",{style:{backgroundColor:"tan",height:"40px",position:"sticky",top:0,textAlign:"center",zIndex:2}},u.a.createElement("tr",null,u.a.createElement("th",{style:{borderRight:"1px solid grey",borderCollapse:"collapse",width:"5%"}},"Sl. No."),u.a.createElement("th",{style:{borderRight:"1px solid grey",borderCollapse:"collapse",width:"10%"}},"QP Code"),u.a.createElement("th",{style:{borderRight:"1px solid grey",borderCollapse:"collapse",width:"36%"}},"Subject Name"),u.a.createElement("th",{style:{borderRight:"1px solid grey",borderCollapse:"collapse",width:"5%"}},"QP Count"),u.a.createElement("th",{style:{borderRight:"1px solid grey",borderCollapse:"collapse",width:"5%"}},"Uploaded Count"),u.a.createElement("th",{style:{borderRight:"1px solid grey",borderCollapse:"collapse",width:"25%"}},"Moderator"),u.a.createElement("th",{style:{borderRight:"1px solid grey",borderCollapse:"collapse",width:"25%"}},"From Date"),u.a.createElement("th",{style:{borderRight:"1px solid grey",borderCollapse:"collapse",width:"25%"}},"To Date"),u.a.createElement("th",{style:{borderRight:"1px solid grey",borderCollapse:"collapse",width:"6%"}},"Allow Login? ",u.a.createElement("br",null),u.a.createElement("input",{type:"checkbox",checked:"T"===this.state.check,onChange:function(t){return e.handleAllCheckBox(t)}})),u.a.createElement("th",{style:{borderRight:"1px solid grey",borderCollapse:"collapse",width:"5%"}},"Email Send ",u.a.createElement("br",null),u.a.createElement("input",{type:"checkbox",checked:"T"===this.state.emailcheck,onChange:function(t){return e.handleAllSentEmail(t)}})),u.a.createElement("th",{style:{borderRight:"1px solid grey",borderCollapse:"collapse",width:"5%"}},"Deleted?"))),u.a.createElement("tbody",null,this.props.modDet.length>0?this.state.data.map(function(t,a){return u.a.createElement("tr",{key:a},u.a.createElement("td",{align:"center",style:{border:"1px solid grey",borderCollapse:"collapse"}},a+1),u.a.createElement("td",{align:"center",style:{border:"1px solid grey",borderCollapse:"collapse"}},t.fqpcode),u.a.createElement("td",{style:{border:"1px solid grey",borderCollapse:"collapse",paddingLeft:"10px"}},t.fsubname),u.a.createElement("td",{align:"center",style:{border:"1px solid grey",borderCollapse:"collapse"}},t.fset),u.a.createElement("td",{align:"center",style:{border:"1px solid grey",borderCollapse:"collapse"}},t.uploaded),u.a.createElement("td",{align:"center",style:{border:"1px solid grey",borderCollapse:"collapse"}},u.a.createElement(w.a,{isSearchable:!0,placeholder:"Search...",value:t.data,options:s,onChange:function(t){return e.handleSelectChange(t,a)}})),u.a.createElement("td",{align:"center",style:{border:"1px solid grey",borderCollapse:"collapse"}},u.a.createElement("input",{type:"date",value:t.ffromdate,onChange:function(a){return e.changeFrmDate(a,t.fqpcode)},onBlur:function(r){return e.checkDate(t.ffromdate,r,a,"from")}})),u.a.createElement("td",{align:"center",style:{border:"1px solid grey",borderCollapse:"collapse"}},u.a.createElement("input",{type:"date",value:t.ftodate,onChange:function(a){return e.changeTodate(a,t.fqpcode)},onBlur:function(r){return e.checkDate(t.ftodate,r,a,"to")}})),u.a.createElement("td",{align:"center",style:{border:"1px solid grey",borderCollapse:"collapse"}},"T"===t.fstatus?u.a.createElement("input",{type:"checkbox",checked:!0,onChange:function(t){return e.handleCheckBox(t,a)}}):u.a.createElement("input",{type:"checkbox",checked:!1,onChange:function(t){return e.handleCheckBox(t,a)}})),u.a.createElement("td",{align:"center",style:{border:"1px solid grey",borderCollapse:"collapse"}},u.a.createElement("input",{type:"checkbox",checked:"T"==t.emailstatus,onChange:function(r){return e.handleCheckBoxEmailSent(r,a,t.fteachcode)}})),u.a.createElement("td",{align:"center",style:{border:"1px solid grey",borderCollapse:"collapse"}},"T"===t.fdeleted?u.a.createElement("input",{type:"checkbox",checked:!0,onChange:function(t){return e.handleCheckBoxDel(t,a)}}):u.a.createElement("input",{type:"checkbox",checked:!1,onChange:function(t){return e.handleCheckBoxDel(t,a)}})))}):u.a.createElement("tr",null,u.a.createElement("td",{colSpan:6,style:{textAlign:"center",height:"30px"}},"No Data Found"))))))))}}]),t}(d.Component);t.default=Object(p.b)(function(e){return{user:e.user.fmobileno,year:e.loadYearAndMode,loadBoard:e.boaddet,loadQp:e.boardsubj,modDet:e.assignModeratorDet.mod,teachDet:e.assignModeratorDet.teach}},{showError:v.A,loadYearAndMode:E.m,getBoardDet:x.k,getBoardSubj:x.l,assignModeratorDet:E.b,saveAssignModerator:E.o})(D)}}]);
//# sourceMappingURL=296.18ab5afe.chunk.js.map