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 : 3.129.67.218


Current Path : /var/www/egov/build/static/js/
Upload File :
Current File : /var/www/egov/build/static/js/267.c9bc2758.chunk.js

(window.webpackJsonp=window.webpackJsonp||[]).push([[267,307],{1244:function(e,t,r){"use strict";r.r(t);var n=r(68),a=r(100),o=r(101),i=r(103),c=r(102),l=r(104),u=r(2),s=r.n(u),h=r(941),f=r(267),p=r(274),d=r(371),m=r.n(d),y=(r(372),r(1377)),v=r(1343),g=r(1335),w=r(272),E=r(105);function b(){b=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(e,t,r){e[t]=r.value},o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function u(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,r){return e[t]=r}}function s(e,t,r,n){var o=t&&t.prototype instanceof v?t:v,i=Object.create(o.prototype),c=new T(n||[]);return a(i,"_invoke",{value:N(e,r,c)}),i}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=s;var f="suspendedStart",p="suspendedYield",d="executing",m="completed",y={};function v(){}function g(){}function w(){}var E={};u(E,i,function(){return this});var x=Object.getPrototypeOf,O=x&&x(x(k([])));O&&O!==r&&n.call(O,i)&&(E=O);var L=w.prototype=v.prototype=Object.create(E);function j(e){["next","throw","return"].forEach(function(t){u(e,t,function(e){return this._invoke(t,e)})})}function _(e,t){function r(a,o,i,c){var l=h(e[a],e,o);if("throw"!==l.type){var u=l.arg,s=u.value;return s&&"object"==typeof s&&n.call(s,"__await")?t.resolve(s.__await).then(function(e){r("next",e,i,c)},function(e){r("throw",e,i,c)}):t.resolve(s).then(function(e){u.value=e,i(u)},function(e){return r("throw",e,i,c)})}c(l.arg)}var o;a(this,"_invoke",{value:function(e,n){function a(){return new t(function(t,a){r(e,n,t,a)})}return o=o?o.then(a,a):a()}})}function N(t,r,n){var a=f;return function(o,i){if(a===d)throw new Error("Generator is already running");if(a===m){if("throw"===o)throw i;return{value:e,done:!0}}for(n.method=o,n.arg=i;;){var c=n.delegate;if(c){var l=F(c,n);if(l){if(l===y)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(a===f)throw a=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a=d;var u=h(t,r,n);if("normal"===u.type){if(a=n.done?m:p,u.arg===y)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(a=m,n.method="throw",n.arg=u.arg)}}}function F(t,r){var n=r.method,a=t.iterator[n];if(a===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,F(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var o=h(a,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,y;var i=o.arg;return i?i.done?(r[t.resultName]=i.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,y):i:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function P(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 S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(P,this),this.reset(!0)}function k(t){if(t||""===t){var r=t[i];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var a=-1,o=function r(){for(;++a<t.length;)if(n.call(t,a))return r.value=t[a],r.done=!1,r;return r.value=e,r.done=!0,r};return o.next=o}}throw new TypeError(typeof t+" is not iterable")}return g.prototype=w,a(L,"constructor",{value:w,configurable:!0}),a(w,"constructor",{value:g,configurable:!0}),g.displayName=u(w,l,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,u(e,l,"GeneratorFunction")),e.prototype=Object.create(L),e},t.awrap=function(e){return{__await:e}},j(_.prototype),u(_.prototype,c,function(){return this}),t.AsyncIterator=_,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var i=new _(s(e,r,n,a),o);return t.isGeneratorFunction(r)?i:i.next().then(function(e){return e.done?e.value:i.next()})},j(L),u(L,l,"Generator"),u(L,i,function(){return this}),u(L,"toString",function(){return"[object Generator]"}),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=k,T.prototype={constructor:T,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(S),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=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 r=this;function a(n,a){return c.type="throw",c.arg=t,r.next=n,a&&(r.method="next",r.arg=e),!!a}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],c=i.completion;if("root"===i.tryLoc)return a("end");if(i.tryLoc<=this.prev){var l=n.call(i,"catchLoc"),u=n.call(i,"finallyLoc");if(l&&u){if(this.prev<i.catchLoc)return a(i.catchLoc,!0);if(this.prev<i.finallyLoc)return a(i.finallyLoc)}else if(l){if(this.prev<i.catchLoc)return a(i.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return a(i.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=e,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,y):this.complete(i)},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 r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),y}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var a=n.arg;S(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:k(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),y}},t}var x=function(e){function t(){var e,r;Object(a.a)(this,t);for(var o=arguments.length,l=new Array(o),u=0;u<o;u++)l[u]=arguments[u];return(r=Object(i.a)(this,(e=Object(c.a)(t)).call.apply(e,[this].concat(l)))).state={year:"",examtype:"",examdate:""},r.changeYear=function(e,t){r.setState({year:t.value})},r.changeExamType=function(e,t){r.setState({examtype:t.value})},r.changeDate=function(e,t){r.setState({examdate:t.value})},r.getUploadParams=function(e){var t=e.file,n=(e.meta,new FormData);n.append("filefield",t),n.append("body",JSON.stringify(r.props.user));var a=r.state,o=a.year,i=a.examtype,c=a.examdate;return{url:p.a+"/upload_qp.php?year="+o+"&examtype="+i+"&examdate="+c+"&univcode="+r.props.user.fcuruniv}},r.handleChangeStatus=function(e,t){e.meta,e.remove},r.handleSubmit=function(){var e=Object(n.a)(b().mark(function e(t,r){return b().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:r.forEach(function(e){return e.remove()});case 1:case"end":return e.stop()}},e)}));return function(t,r){return e.apply(this,arguments)}}(),r.validatefile=function(e){e.file;var t=e.meta.name.split("_");t[3].split(".");return(t[0]!==r.props.user.fcuruniv||4!==t[1].length||1!=t[2].length)&&"INVALID FILE NAMING FORMAT (eg:041_2022_2_10101.pdf)"},r.renderHeader=function(){return s.a.createElement(y.a.Header,{style:{display:"flex"}},s.a.createElement("h4",null,"Upload Question Paper"),s.a.createElement("div",{className:"ml-auto"},s.a.createElement(h.a,{to:"/dashboard"},s.a.createElement(v.a,{basic:!0,color:"red",content:"Exit",icon:"home"}))))},r}return Object(l.a)(t,e),Object(o.a)(t,[{key:"render",value:function(){var e=this.state,t=e.year,r=e.examtype,n=e.examdate,a=70*window.innerHeight/100;return s.a.createElement("div",null,s.a.createElement(y.a,{fluid:!0},s.a.createElement(y.a.Content,null,this.renderHeader(),s.a.createElement(y.a.Description,null,s.a.createElement("h4",null,s.a.createElement("b",null,"File Format: UNIVCODE_YEAR_EXAMTYPE_QPCODE.pdf")),s.a.createElement(g.a.Group,{style:{display:"flex"}},s.a.createElement(g.a.Field,{style:{margin:"15px"}},s.a.createElement("label",null,"Year"),s.a.createElement(g.a.Input,{placeholder:"Year",value:t,width:4,name:"year",onChange:this.changeYear})),s.a.createElement(g.a.Field,{style:{margin:"15px"}},s.a.createElement("label",null,"Exam Type"),s.a.createElement(g.a.Input,{placeholder:"Exam Type",value:r,width:4,name:"examtype",onChange:this.changeExamType})),s.a.createElement(g.a.Field,{style:{margin:"15px"}},s.a.createElement("label",null,"Exam Date"),s.a.createElement(g.a.Input,{placeholder:"Date",value:n,width:4,name:"examdate",onChange:this.changeDate}))),s.a.createElement(w.a,null),s.a.createElement(y.a.Description,{style:{height:"".concat(a,"px"),overflowY:"auto"}},s.a.createElement(m.a,{getUploadParams:this.getUploadParams,onChangeStatus:this.handleChangeStatus,validate:this.validatefile,accept:"application/pdf",maxFiles:50,styles:{dropzone:{minHeight:200,maxHeight:a-10}}}))))))}}]),t}(s.a.Component);t.default=Object(E.b)(function(e){return{user:e.user,QpUpload:e.getQpUpload}},{showError:f.A})(x)},272:function(e,t,r){"use strict";var n=r(270),a=r.n(n),o=r(268),i=r.n(o),c=r(2),l=r.n(c),u=r(349),s=r(613),h=r(611),f=r(269);function p(e){var t=e.children,r=e.className,n=e.clearing,o=e.content,c=e.fitted,d=e.hidden,m=e.horizontal,y=e.inverted,v=e.section,g=e.vertical,w=i()("ui",Object(u.a)(n,"clearing"),Object(u.a)(c,"fitted"),Object(u.a)(d,"hidden"),Object(u.a)(m,"horizontal"),Object(u.a)(y,"inverted"),Object(u.a)(v,"section"),Object(u.a)(g,"vertical"),"divider",r),E=Object(s.a)(p,e),b=Object(h.a)(p,e);return l.a.createElement(b,a()({},E,{className:w}),f.a.isNil(t)?o:t)}p.handledProps=["as","children","className","clearing","content","fitted","hidden","horizontal","inverted","section","vertical"],p.propTypes={},t.a=p}}]);
//# sourceMappingURL=267.c9bc2758.chunk.js.map