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


Current Path : /var/www/tdvsapp/static/js/
Upload File :
Current File : /var/www/tdvsapp/static/js/18.41dde321.chunk.js

(window.webpackJsonp=window.webpackJsonp||[]).push([[18],{1169:function(e,t,n){"use strict";var a=n(1147),r=n(1148),o=n.n(r),c=n(71);function l(){l=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",c=r.asyncIterator||"@@asyncIterator",i=r.toStringTag||"@@toStringTag";function s(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{s({},"")}catch(_){s=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var o=t&&t.prototype instanceof d?t:d,c=Object.create(o.prototype),l=new S(r||[]);return a(c,"_invoke",{value:k(e,n,l)}),c}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(_){return{type:"throw",arg:_}}}e.wrap=u;var m={};function d(){}function p(){}function h(){}var v={};s(v,o,function(){return this});var g=Object.getPrototypeOf,y=g&&g(g(C([])));y&&y!==t&&n.call(y,o)&&(v=y);var E=h.prototype=d.prototype=Object.create(v);function b(e){["next","throw","return"].forEach(function(t){s(e,t,function(e){return this._invoke(t,e)})})}function w(e,t){var r;a(this,"_invoke",{value:function(a,o){function c(){return new t(function(r,c){!function a(r,o,c,l){var i=f(e[r],e,o);if("throw"!==i.type){var s=i.arg,u=s.value;return u&&"object"==typeof u&&n.call(u,"__await")?t.resolve(u.__await).then(function(e){a("next",e,c,l)},function(e){a("throw",e,c,l)}):t.resolve(u).then(function(e){s.value=e,c(s)},function(e){return a("throw",e,c,l)})}l(i.arg)}(a,o,r,c)})}return r=r?r.then(c,c):c()}})}function k(e,t,n){var a="suspendedStart";return function(r,o){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===r)throw o;return N()}for(n.method=r,n.arg=o;;){var c=n.delegate;if(c){var l=x(c,n);if(l){if(l===m)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===a)throw a="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a="executing";var i=f(e,t,n);if("normal"===i.type){if(a=n.done?"completed":"suspendedYield",i.arg===m)continue;return{value:i.arg,done:n.done}}"throw"===i.type&&(a="completed",n.method="throw",n.arg=i.arg)}}}function x(e,t){var n=t.method,a=e.iterator[n];if(void 0===a)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var r=f(a,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,m;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,m):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,m)}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 j(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(O,this),this.reset(!0)}function C(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,r=function t(){for(;++a<e.length;)if(n.call(e,a))return t.value=e[a],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:N}}function N(){return{value:void 0,done:!0}}return p.prototype=h,a(E,"constructor",{value:h,configurable:!0}),a(h,"constructor",{value:p,configurable:!0}),p.displayName=s(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,s(e,i,"GeneratorFunction")),e.prototype=Object.create(E),e},e.awrap=function(e){return{__await:e}},b(w.prototype),s(w.prototype,c,function(){return this}),e.AsyncIterator=w,e.async=function(t,n,a,r,o){void 0===o&&(o=Promise);var c=new w(u(t,n,a,r),o);return e.isGeneratorFunction(n)?c:c.next().then(function(e){return e.done?e.value:c.next()})},b(E),s(E,i,"Generator"),s(E,o,function(){return this}),s(E,"toString",function(){return"[object Generator]"}),e.keys=function(e){var t=Object(e),n=[];for(var a in t)n.push(a);return n.reverse(),function e(){for(;n.length;){var a=n.pop();if(a in t)return e.value=a,e.done=!1,e}return e.done=!0,e}},e.values=C,S.prototype={constructor:S,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(j),!e)for(var t in this)"t"===t.charAt(0)&&n.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 a(n,a){return c.type="throw",c.arg=e,t.next=n,a&&(t.method="next",t.arg=void 0),!!a}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],c=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var l=n.call(o,"catchLoc"),i=n.call(o,"finallyLoc");if(l&&i){if(this.prev<o.catchLoc)return a(o.catchLoc,!0);if(this.prev<o.finallyLoc)return a(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return a(o.catchLoc,!0)}else{if(!i)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return a(o.finallyLoc)}}}},abrupt:function(e,t){for(var a=this.tryEntries.length-1;a>=0;--a){var r=this.tryEntries[a];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var c=o?o.completion:{};return c.type=e,c.arg=t,o?(this.method="next",this.next=o.finallyLoc,m):this.complete(c)},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),m},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),j(n),m}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var a=n.completion;if("throw"===a.type){var r=a.arg;j(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:C(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),m}},e}var i=n(1204).a.load();Object(a.a)(l().mark(function e(){var t,n;return l().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,i;case 2:return t=e.sent,e.next=5,t.get();case 5:n=e.sent,n.visitorId;case 7:case"end":return e.stop()}},e)}))();var s=o.a.create({baseURL:c.a,headers:{"X-Auth-Origin":"TDVS"}});s.defaults.params={},s.interceptors.request.use(function(e){var t=sessionStorage.getItem("token"),n=sessionStorage.getItem("univcode");return n&&(e.params.univcode=n),t&&(e.headers.Authorization=t),e},function(e){return Promise.reject(e)}),t.a=s},1515:function(e,t,n){},1550:function(e,t,n){"use strict";n.r(t),n.d(t,"default",function(){return S});var a=n(1152),r=n(1147),o=n(59),c=n(1),l=n.n(c),i=n(71),s=n(1148),u=n.n(s),f=n(72),m=n(159),d=(n(1169),n(1515),n(1552)),p=n(1559),h=n(520),v=n(1553),g=n(1522),y=n(1538),E=n(529),b=n(1180),w=n(1524),k=n(1285),x=n(1539),O=n(1540);function j(){j=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},r="function"==typeof Symbol?Symbol:{},o=r.iterator||"@@iterator",c=r.asyncIterator||"@@asyncIterator",l=r.toStringTag||"@@toStringTag";function i(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{i({},"")}catch(_){i=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof m?t:m,c=Object.create(o.prototype),l=new S(r||[]);return a(c,"_invoke",{value:w(e,n,l)}),c}function u(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(_){return{type:"throw",arg:_}}}e.wrap=s;var f={};function m(){}function d(){}function p(){}var h={};i(h,o,function(){return this});var v=Object.getPrototypeOf,g=v&&v(v(C([])));g&&g!==t&&n.call(g,o)&&(h=g);var y=p.prototype=m.prototype=Object.create(h);function E(e){["next","throw","return"].forEach(function(t){i(e,t,function(e){return this._invoke(t,e)})})}function b(e,t){var r;a(this,"_invoke",{value:function(a,o){function c(){return new t(function(r,c){!function a(r,o,c,l){var i=u(e[r],e,o);if("throw"!==i.type){var s=i.arg,f=s.value;return f&&"object"==typeof f&&n.call(f,"__await")?t.resolve(f.__await).then(function(e){a("next",e,c,l)},function(e){a("throw",e,c,l)}):t.resolve(f).then(function(e){s.value=e,c(s)},function(e){return a("throw",e,c,l)})}l(i.arg)}(a,o,r,c)})}return r=r?r.then(c,c):c()}})}function w(e,t,n){var a="suspendedStart";return function(r,o){if("executing"===a)throw new Error("Generator is already running");if("completed"===a){if("throw"===r)throw o;return N()}for(n.method=r,n.arg=o;;){var c=n.delegate;if(c){var l=k(c,n);if(l){if(l===f)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===a)throw a="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);a="executing";var i=u(e,t,n);if("normal"===i.type){if(a=n.done?"completed":"suspendedYield",i.arg===f)continue;return{value:i.arg,done:n.done}}"throw"===i.type&&(a="completed",n.method="throw",n.arg=i.arg)}}}function k(e,t){var n=t.method,a=e.iterator[n];if(void 0===a)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),f;var r=u(a,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,f;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,f):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,f)}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 S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(x,this),this.reset(!0)}function C(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var a=-1,r=function t(){for(;++a<e.length;)if(n.call(e,a))return t.value=e[a],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:N}}function N(){return{value:void 0,done:!0}}return d.prototype=p,a(y,"constructor",{value:p,configurable:!0}),a(p,"constructor",{value:d,configurable:!0}),d.displayName=i(p,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,p):(e.__proto__=p,i(e,l,"GeneratorFunction")),e.prototype=Object.create(y),e},e.awrap=function(e){return{__await:e}},E(b.prototype),i(b.prototype,c,function(){return this}),e.AsyncIterator=b,e.async=function(t,n,a,r,o){void 0===o&&(o=Promise);var c=new b(s(t,n,a,r),o);return e.isGeneratorFunction(n)?c:c.next().then(function(e){return e.done?e.value:c.next()})},E(y),i(y,l,"Generator"),i(y,o,function(){return this}),i(y,"toString",function(){return"[object Generator]"}),e.keys=function(e){var t=Object(e),n=[];for(var a in t)n.push(a);return n.reverse(),function e(){for(;n.length;){var a=n.pop();if(a in t)return e.value=a,e.done=!1,e}return e.done=!0,e}},e.values=C,S.prototype={constructor:S,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)&&n.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 a(n,a){return c.type="throw",c.arg=e,t.next=n,a&&(t.method="next",t.arg=void 0),!!a}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],c=o.completion;if("root"===o.tryLoc)return a("end");if(o.tryLoc<=this.prev){var l=n.call(o,"catchLoc"),i=n.call(o,"finallyLoc");if(l&&i){if(this.prev<o.catchLoc)return a(o.catchLoc,!0);if(this.prev<o.finallyLoc)return a(o.finallyLoc)}else if(l){if(this.prev<o.catchLoc)return a(o.catchLoc,!0)}else{if(!i)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return a(o.finallyLoc)}}}},abrupt:function(e,t){for(var a=this.tryEntries.length-1;a>=0;--a){var r=this.tryEntries[a];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var c=o?o.completion:{};return c.type=e,c.arg=t,o?(this.method="next",this.next=o.finallyLoc,f):this.complete(c)},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),f},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),O(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var a=n.completion;if("throw"===a.type){var r=a.arg;O(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:C(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}function S(e){var t=e.match.params,n=t.qpcode,s=t.regcode,S=t.valno,C=sessionStorage.getItem("fteachcode"),N=Object(c.useContext)(m.a).univcode,_=Object(c.useContext)(m.a),L=(_.teachcode,_.err_msg),A=_.load,q=Object(o.a)(A,2),P=(q[0],q[1]),M=Object(o.a)(L,2),I=(M[0],M[1]),F=Object(f.useHistory)(),G=Object(c.useRef)([]),R=Object(c.useState)([]),T=Object(o.a)(R,2),B=T[0],H=T[1],z=Object(c.useState)(""),Q=Object(o.a)(z,2),X=Q[0],V=Q[1],D=Object(c.useState)(""),Y=Object(o.a)(D,2),W=Y[0],J=Y[1],U=Object(c.useState)([]),$=Object(o.a)(U,2),K=$[0],Z=$[1],ee=Object(c.useState)([]),te=Object(o.a)(ee,2),ne=(te[0],te[1]),ae=Object(c.useState)([]),re=Object(o.a)(ae,2),oe=re[0],ce=re[1],le=Object(c.useState)(0),ie=Object(o.a)(le,2),se=ie[0],ue=ie[1],fe=Object(c.useState)(!1),me=Object(o.a)(fe,2),de=me[0],pe=me[1],he=Object(c.useState)(!1),ve=Object(o.a)(he,2),ge=ve[0],ye=ve[1],Ee=Object(c.useState)(!1),be=Object(o.a)(Ee,2),we=be[0],ke=be[1],xe=Object(c.useState)("Script Re-scan request"),Oe=Object(o.a)(xe,2),je=Oe[0],Se=Oe[1],Ce=Object(c.useState)(""),Ne=Object(o.a)(Ce,2),_e=Ne[0],Le=Ne[1],Ae=Object(c.useState)(""),qe=Object(o.a)(Ae,2),Pe=qe[0],Me=qe[1],Ie=Object(c.useState)([]),Fe=Object(o.a)(Ie,2),Ge=Fe[0],Re=Fe[1],Te=Object(c.useState)([]),Be=Object(o.a)(Te,2),He=Be[0],ze=Be[1],Qe=Object(c.useState)([]),Xe=Object(o.a)(Qe,2),Ve=Xe[0],De=Xe[1],Ye=Object(c.useState)(!1),We=Object(o.a)(Ye,2),Je=We[0],Ue=We[1],$e=Object(c.useState)(!1),Ke=Object(o.a)($e,2),Ze=Ke[0],et=Ke[1],tt=Object(c.useState)(""),nt=Object(o.a)(tt,2),at=nt[0],rt=nt[1],ot=Object(c.useState)({}),ct=Object(o.a)(ot,2),lt=ct[0],it=ct[1],st=Object(c.useState)(!1),ut=Object(o.a)(st,2),ft=ut[0],mt=ut[1],dt=Object(c.useState)(!1),pt=Object(o.a)(dt,2),ht=pt[0],vt=pt[1],gt=Object(c.useState)(null),yt=Object(o.a)(gt,2),Et=yt[0],bt=yt[1],wt=Object(c.useState)(null),kt=Object(o.a)(wt,2),xt=kt[0],Ot=kt[1];Object(c.useEffect)(function(){console.log(sessionStorage.getItem("isViewQn")),null==sessionStorage.getItem("isViewQn")?vt(!0):"true"==sessionStorage.getItem("isViewQn")?vt(!0):"false"==sessionStorage.getItem("isViewQn")&&vt(!1),jt(),St()},[]);var jt=function(){var e=Object(r.a)(j().mark(function e(){var t;return j().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return P(!0),e.next=3,u.a.get(i.d+"getevalimage&univcode="+N+"&fteachcode=".concat(C,"&qpcode=").concat(n,"&regcode=").concat(s,"&valno=").concat(S));case 3:if(t=e.sent,P(!1),0!==t.data.error_code){e.next=11;break}H(t.data.data.filenames),V(t.data.data.ffilepath),J(t.data.data.qpschmepath),e.next=14;break;case 11:return I({type:"OPEN_MSG_BOX",payload:{header:"Message",message:t.data.data.msg}}),F.push("/dashboard"),e.abrupt("return");case 14:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),St=function(){var e=Object(r.a)(j().mark(function e(){var t,a;return j().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return P(!0),e.next=3,u.a.get(i.d+"getevalpartsstate&univcode="+N+"&fteachcode=".concat(C,"&qpcode=").concat(n,"&regcode=").concat(s,"&valno=").concat(S));case 3:t=e.sent,P(!1),console.log(t),0===t.data.error_code?(Z(t.data.data.parts),ne(t.data.data.path),t.data.data.path.length>0&&rt(t.data.data.path[0].fomrmarks),ce(t.data.data.question),K.map(function(e,n){t.data.data.question.map(function(t,n){t.fpartcode===e.fpartcode&&"T"!=t.fsubqn&&G.current[n].focus()})}),a=0,t.data.data.question.map(function(e,t){var n="-1"==e.fmarks||""==e.fmarks||"T"==e.fsubqn||"NA"==e.fmarks||"N"==e.fmarks||"A"==e.fmarks||"-2"==e.fmarks?0:e.fmarks;a+=parseFloat(n)}),ue(a)):(I({type:"OPEN_MSG_BOX",payload:{header:"Message",message:t.data.data.msg}}),P(!1));case 7:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),Ct=function(){var e=Object(r.a)(j().mark(function e(t,n){var r,o,c;return j().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:(r=/^[0-9Nn.]*$/).test(t.target.value),r.test(t.target.value)&&(o=Object(a.a)(oe),""==t.target.value?o[n].fmarks=-1:o[n].fmarks=t.target.value.toUpperCase(),ce(Object(a.a)(o))),console.log(oe),c=0,oe.map(function(e,t){var n="-1"==e.fmarks||""==e.fmarks||"T"==e.fsubqn||"NA"==e.fmarks||"N"==e.fmarks||"A"==e.fmarks||"-2"==e.fmarks?0:e.fmarks;c+=parseFloat(n)}),ue(c);case 7:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),Nt=function(){var e=Object(r.a)(j().mark(function e(t,n,r){var o,c;return j().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(o=Object(a.a)(oe),!(t.fmarks>t.fmaxmarks)){e.next=6;break}return I({type:"OPEN_MSG_BOX",payload:{header:"Message",message:"Entered marks is greater than max marks"}}),o[n].fmarks=-1,ce(Object(a.a)(o)),e.abrupt("return");case 6:c=0,oe.map(function(e,t){var n="-1"==e.fmarks||""==e.fmarks||"T"==e.fsubqn||"N"==e.fmarks||"-2"==e.fmarks?0:e.fmarks;c+=parseFloat(n)}),ue(c);case 9:case"end":return e.stop()}},e)}));return function(t,n,a){return e.apply(this,arguments)}}(),_t=function(){var e=Object(r.a)(j().mark(function e(t){var a;return j().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(console.log(oe,t),a=[],"save"!=t){e.next=9;break}return e.next=5,oe.map(function(e){"-1"==e.fmarks&&"T"!==e.fsubqn&&a.push(e)});case 5:if(console.log(a),!(a.length>0)){e.next=9;break}return I({type:"OPEN_MSG_BOX",payload:{header:"Message",message:"Please enter marks for all the questions"}}),e.abrupt("return");case 9:return P(!0),e.next=12,u.a.post(i.b+"a=saveEvaluationMarks&univcode=".concat(sessionStorage.getItem("univcode"),"&fteachcode=").concat(C,"&qpcode=").concat(n,"&dummyno=").concat(s,"&valno=").concat(S),oe).then(function(e){return console.log(e),0!==e.data.error_code?(I({type:"OPEN_MSG_BOX",payload:{header:"Message",message:e.data.data.msg}}),void P(!1)):"save"!=t?(I({type:"OPEN_MSG_BOX",payload:{header:"Success",message:e.data.data.msg}}),void P(!1)):(P(!1),void Lt())}).catch(function(e){I({type:"OPEN_MSG_BOX",payload:{header:"Error",message:"Error while saving marks "}}),P(!1)});case 12:case"end":return e.stop()}},e)}));return function(t){return e.apply(this,arguments)}}(),Lt=function(){var e=Object(r.a)(j().mark(function e(){return j().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u.a.get(i.b+"a=getEvalMarksStatus&univcode="+sessionStorage.getItem("univcode")+"&qpcode="+n+"&dummyno="+s+"&valno="+S).then(function(e){if(console.log(e),0!==e.data.error_code)return I({type:"OPEN_MSG_BOX",payload:{header:"Message",message:e.data.data.msg}}),void P(!1);Re(e.data.data.sdata),ze(e.data.data.pdata),De(e.data.data.sum),et(!0)}).catch(function(e){I({type:"OPEN_MSG_BOX",payload:{header:"Error",message:"Error while getting marks data "}}),P(!1)});case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),At=function(){var e=Object(r.a)(j().mark(function e(){return j().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,u.a.post(i.b+"a=finalEvalMarks&univcode="+sessionStorage.getItem("univcode")+"&qpcode="+n+"&dummyno="+s+"&valno="+S+"&fteachcode="+C+"&remarks="+Pe).then(function(e){if(console.log(e),0!==e.data.error_code)return I({type:"OPEN_MSG_BOX",payload:{header:"Error",message:e.data.data.msg}}),void P(!1);F.push("/dashboard")}).catch(function(e){I({type:"OPEN_MSG_BOX",payload:{header:"Error",message:"Error while saving marks data "}}),P(!1)});case 2:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}(),qt=Ge[0],Pt=Ve,Mt=function(){var e=Object(r.a)(j().mark(function e(){return j().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return P(!0),e.next=3,u.a.post(i.b+"a=saveEvalReject&univcode="+sessionStorage.getItem("univcode")+"&rejReason="+je+"&rejComment="+_e+"&qpcode="+n+"&dummyno="+s+"&valno="+S).then(function(e){if(console.log(e),0!==e.data.error_code)return I({type:"OPEN_MSG_BOX",payload:{header:"Message",message:e.data.data.msg}}),void P(!1);P(!1),F.push("/dashboard")}).catch(function(e){I({type:"OPEN_MSG_BOX",payload:{header:"Error",message:"Error while rejecting scripts"}}),P(!1)});case 3:case"end":return e.stop()}},e)}));return function(){return e.apply(this,arguments)}}();Object(c.useEffect)(function(){null!==Et&&G.current[Et]&&G.current[Et].focus()},[Et]);var It=function(e,t){G.current[t]=e};function Ft(e){var t=e.open,n=e.msg,a=e.header,r=e.onCancel,o=e.confirmButton,c=e.onConfirm;return l.a.createElement(d.a,{size:"mini",open:t},l.a.createElement(d.a.Header,null,a),l.a.createElement(d.a.Content,null,l.a.createElement("p",null,n)),l.a.createElement(d.a.Actions,null,l.a.createElement(p.a,{positive:!0,size:"tiny",style:{background:"red"},onClick:r},"Cancel"),l.a.createElement(p.a,{positive:!0,size:"tiny",onClick:c},o)))}return l.a.createElement("div",null,l.a.createElement("div",{className:"grid-container",id:"condiv"},l.a.createElement("div",{className:"item1"},l.a.createElement(Ft,{open:de,msg:"Are you sure you want save as draft ?",header:"Confirm",onCancel:function(){return pe(!1)},confirmButton:"OK",onConfirm:function(){_t(),pe(!1)}}),l.a.createElement(d.a,{open:ge,size:"small"},l.a.createElement(d.a.Header,null,"Answer Script Rejection",l.a.createElement(p.a,{onClick:function(){return ye(!1)},secondary:!0,floated:"right"},l.a.createElement(h.a,{name:"close"}),"Close")),l.a.createElement(d.a.Content,{scrolling:!0},l.a.createElement(d.a.Description,null,l.a.createElement(v.a,null,l.a.createElement(g.a,{negative:!0},l.a.createElement(g.a.Header,null,l.a.createElement(y.a,{fitted:!0,name:"rejectAb",value:"Script Re-scan request",checked:"Script Re-scan request"==je,label:"Script Re-scan request",onChange:function(e,t){return Se(t.value)}})),l.a.createElement("p",{style:{textIndent:"3ch"}},"I am unable to mark candidate's answer scripts because of poor scannig quality")),l.a.createElement(g.a,{negative:!0},l.a.createElement(g.a.Header,null,l.a.createElement(y.a,{fitted:!0,name:"rejectAb",value:"Malpractice Concern",checked:"Malpractice Concern"==je,label:"Malpractice Concern",onChange:function(e,t){return Se(t.value)}})),l.a.createElement("p",{style:{textIndent:"3ch"}},"I suspected malpractice in connection to this answer script. I want this to be reviewed")),l.a.createElement(g.a,{negative:!0},l.a.createElement(g.a.Header,null,l.a.createElement(y.a,{fitted:!0,name:"rejectAb",value:"Wrong QP Pattern",label:"Wrong QP Pattern",checked:"Wrong QP Pattern"==je,onChange:function(e,t){return Se(t.value)}})),l.a.createElement("p",{style:{textIndent:"3ch"}},"Displayed marks pattern does not match with the question paper.")),l.a.createElement(g.a,{negative:!0},l.a.createElement(g.a.Header,null,l.a.createElement(y.a,{fitted:!0,name:"rejectAb",value:"Answer Script Mismatch with QP",label:"Answer Script Mismatch with QP",checked:"Answer Script Mismatch with QP"==je,onChange:function(e,t){return Se(t.value)}})),l.a.createElement("p",{style:{textIndent:"3ch"}},"Displayed answer script does not match the subject.")),l.a.createElement(g.a,{negative:!0},l.a.createElement(g.a.Header,null,l.a.createElement(y.a,{fitted:!0,name:"rejectAb",value:"Student Identity revealed",label:"Student Identity revealed",checked:"Student Identity revealed"==je,onChange:function(e,t){return Se(t.value)}})),l.a.createElement("p",{style:{textIndent:"3ch"}},"Student Identity is revealed.")),l.a.createElement(v.a.TextArea,{label:"Comment",placeholder:"Comment...",value:_e,onChange:function(e,t){return Le(t.value)}})))),l.a.createElement(d.a.Actions,{style:{textAlign:"center"}},l.a.createElement(p.a,{onClick:function(){return Mt()},primary:!0},"Submit"))),l.a.createElement(d.a,{open:we,size:"mini"},l.a.createElement(d.a.Header,null,"Confirm"),l.a.createElement(d.a.Content,null,l.a.createElement(d.a.Description,null,l.a.createElement("p",null,"Are you sure you want to exit evalution ?"))),l.a.createElement(d.a.Actions,null,l.a.createElement(p.a,{size:"tiny",onClick:function(){return ke(!1)},negative:!0},"NO"),l.a.createElement(p.a,{content:"Yes",icon:"checkmark",size:"tiny",onClick:function(){return F.push("/dashboard")},positive:!0}))),l.a.createElement(d.a,{open:ft,size:"small"},l.a.createElement(d.a.Header,null,lt.fqnno,l.a.createElement(p.a,{onClick:function(){mt(!1),bt(xt),console.log(G)},secondary:!0,floated:"right"},l.a.createElement(h.a,{name:"close"}),"Close")),l.a.createElement(d.a.Content,null,l.a.createElement("h4",null,lt.fquestion))),l.a.createElement("div",null,"T"==W.fonlineqp&&void 0!=lt.fqnno&&ht&&l.a.createElement("div",{style:{height:"80px",position:"sticky",top:0,overflowY:"auto",background:"#fff",borderBottom:"3px solid #008dda"}},l.a.createElement("p",{style:{textAlign:"initial",marginLeft:"20px",color:"#000",fontSize:"16px",justifyContent:"justify",cursor:"pointer"},onClick:function(){return mt(!0)}},lt.fqnno," ",l.a.createElement("span",null," ",lt.fquestion))),B.length>0?B.map(function(e,t){return l.a.createElement("div",{style:{marginTop:"T"==W.fonlineqp&&ft?"30px":0},id:t},l.a.createElement("img",{onClick:function(){return console.log(t)},key:t,src:"https://universitysolutions.in/tdvs-php/public/eval-img/"+X+"/"+e,className:"ansbook",alt:"image not found"}))}):l.a.createElement("p",null,"Answer Booklet Not Found"))),l.a.createElement("div",{className:"item3"},B.length>0?B.map(function(e,t){return l.a.createElement("div",null,l.a.createElement("img",{onClick:function(){return e=t,console.log("A"),void document.getElementById(e).scrollIntoView();var e},key:t,style:{width:"95%",padding:"2px",border:"1px solid"},src:"https://universitysolutions.in/tdvs-php/public//eval-img/"+X+"/"+e,className:"ansbook",alt:"image not found"}))}):l.a.createElement("p",null,"Answer Booklet Not Found")),l.a.createElement("div",{className:"item2"},l.a.createElement("div",{className:"navbar"},l.a.createElement("div",{className:"menu-items"},l.a.createElement("a",{onClick:function(){"T"==W.fonlineqp?window.open("https://universitysolutions.in/univadmin/app.php?a=getOmrQpReport&univcode="+sessionStorage.getItem("univcode")+"&qpcode="+n+"&year="+W.fyear+"&mode="+W.fexamtype+"&teachcode="+C+"&noqp="+W.fset+"&type="+W.ftype):window.open("https://answer-booklets.s3.ap-south-1.amazonaws.com/".concat(W.fqppath))}},"QP"),l.a.createElement("a",{href:"https://answer-booklets.s3.ap-south-1.amazonaws.com/".concat(W.fschempath),target:"_blank"},"Scheme"),l.a.createElement("a",{onClick:function(){return _t("save")}},"Save"),l.a.createElement("a",{onClick:function(){return pe(!0)}},"Draft"),l.a.createElement("a",{onClick:function(){return ye(!0)}},"Reject"),l.a.createElement("a",{onClick:function(){return ke(!0)}},"Exit"))),l.a.createElement("div",{className:"align-val"},l.a.createElement("div",{className:"val-det"},l.a.createElement("div",null,"T"==W.fonlineqp&&l.a.createElement(E.a,null,ht?l.a.createElement(h.a,{name:"eye",style:{cursor:"pointer"},color:"green",onClick:function(){sessionStorage.setItem("isViewQn",!1),vt(!1)}}):l.a.createElement(h.a,{name:"eye slash out",style:{cursor:"pointer"},color:"red",onClick:function(){sessionStorage.setItem("isViewQn",!0),vt(!0)}})),l.a.createElement("label",null,l.a.createElement("b",null,"Reg. Code.: ")),l.a.createElement("span",null,l.a.createElement("b",null,s))),l.a.createElement("div",null,l.a.createElement("label",null,l.a.createElement("b",null,"Val. No.: ")),l.a.createElement("span",null,l.a.createElement("b",null,S))))),l.a.createElement("div",{className:"marks-table"},l.a.createElement("table",null,l.a.createElement("thead",{className:"thead"},l.a.createElement("tr",null,l.a.createElement("td",{colSpan:4,style:{background:"#fff",color:"#000",textAlign:"initial"}},l.a.createElement("p",null," ",l.a.createElement("b",{style:{color:"#f00",textDecoration:"underline"}},"Note:"," "),l.a.createElement("span",{style:{fontSize:"12px"}},"If the student has not answered any question, kindly put 'N' in the appropriate box")))),l.a.createElement("tr",null,l.a.createElement("th",{colSpan:""!=at?3:4},"Secured Marks: ",se),""!==at&&l.a.createElement("th",null,"OMR Marks: ",at))),K.map(function(e,t){return l.a.createElement("tbody",{key:e.fpartcode},l.a.createElement("tr",null,l.a.createElement("th",{colSpan:4},e.fpartdesc)),l.a.createElement("tr",{style:{background:"#008dda",color:"#fff"}},l.a.createElement("th",{width:"15%"},"Qn."),l.a.createElement("th",{width:"20%"},"Max."),l.a.createElement("th",{width:"20%"},"Sec."),l.a.createElement("th",{width:"45%"},"Remarks")),oe.map(function(t,n){if(t.fpartcode===e.fpartcode&&"T"!=t.fsubqn){var r="-2"==t.fmarks||"N"==t.fmarks?"#f00":"#000";return l.a.createElement("tr",{key:t.fqnno},l.a.createElement("td",{style:{color:r}},l.a.createElement("p",{className:"input",style:{cursor:"pointer"}},t.fqnno)),l.a.createElement("td",null,l.a.createElement("input",{type:"text",className:"input",style:{color:r},value:t.fmaxmarks,disabled:!0})),l.a.createElement("td",null,l.a.createElement("input",{ref:function(e){return It(e,n)},type:"text",className:"input",onFocus:function(){it(t),Ot(n)},maxLength:1==t.fmaxmarks.toString().length?3:4,style:{color:r},value:"-1"==t.fmarks?"":"-2"==t.fmarks?"N":t.fmarks,onChange:function(e){return Ct(e,n)},onBlur:function(e){Nt(t,n,e)}})),l.a.createElement("td",null,l.a.createElement("input",{type:"text",className:"input",style:{color:r},value:t.fremarks,onChange:function(e){return function(e,t){if(/^[a-zA-Z0-9., ]*$/.test(e.target.value)){var n=Object(a.a)(oe);n[t].fremarks=e.target.value,ce(Object(a.a)(n))}}(e,n)}})))}}))}))))),l.a.createElement(d.a,{open:Ze,size:"small"},l.a.createElement(b.a,{style:{padding:"1em"}},l.a.createElement(w.a,{fluid:!0,style:{padding:"1em"}},l.a.createElement(w.a.Content,{textAlign:"center"},l.a.createElement(w.a.Header,null,"Final Submission")),Ge.length>0?l.a.createElement(k.a,{basic:!0,style:{width:"40vw",margin:"10px auto"}},l.a.createElement(k.a.Body,null,Pt.length>0?l.a.createElement(k.a.Row,null,l.a.createElement(k.a.Cell,null,"Evaluator Code"),l.a.createElement(k.a.Cell,null,Pt[0].fteachcode),l.a.createElement(k.a.Cell,null,"Evaluator Name"),l.a.createElement(k.a.Cell,null,Pt[0].fteachname)):null,l.a.createElement(k.a.Row,null,l.a.createElement(k.a.Cell,null,"QP Code"),l.a.createElement(k.a.Cell,null,qt.fqpcode),l.a.createElement(k.a.Cell,null,"Subject Name"),l.a.createElement(k.a.Cell,null,qt.fsubname)),l.a.createElement(k.a.Row,null,l.a.createElement(k.a.Cell,null,"Reg. Code"),l.a.createElement(k.a.Cell,null,qt.fregcode),l.a.createElement(k.a.Cell,null,"Max. Marks"),l.a.createElement(k.a.Cell,null,qt.ftempmax)))):null,Ge.length>0?l.a.createElement("div",null,l.a.createElement(k.a,{compact:!0,celled:!0,structured:!0,style:{width:"40vw",margin:"10px auto"}},l.a.createElement(k.a.Header,null,l.a.createElement(k.a.Row,null,l.a.createElement(k.a.HeaderCell,{textAlign:"center",rowSpan:"2"},"Qn. No."),l.a.createElement(k.a.HeaderCell,{textAlign:"center",colSpan:"3"},"Marks")),l.a.createElement(k.a.Row,null,l.a.createElement(k.a.HeaderCell,{textAlign:"center"},"Awarded by Evaluator"),l.a.createElement(k.a.HeaderCell,{textAlign:"center"},"Allocated by System"),l.a.createElement(k.a.HeaderCell,{textAlign:"center"},"Max. Marks"))),He.map(function(e){return l.a.createElement(k.a.Body,{key:e.fpartcode},l.a.createElement(k.a.Row,{positive:!0,key:e.fpartcode},l.a.createElement(k.a.Cell,{colSpan:"4",textAlign:"center"},e.fpartdesc," (Answer ",e.fmandqn," / ",e.fmaxqn," ","questions)")),Ge.map(function(t){if(e.fpartcode==t.fpartcode&&"T"!=t.fsubqn)return l.a.createElement(k.a.Row,{key:t.fqncode},l.a.createElement(k.a.Cell,{textAlign:"center"},t.fqnno),l.a.createElement(k.a.Cell,{textAlign:"center"},-2==parseFloat(t.fmarks11)?"NA":parseFloat(t.fmarks11)),l.a.createElement(k.a.Cell,{textAlign:"center"},-2==parseFloat(t.fmarks12)?"NA":""==t.fmarks12?"":parseFloat(t.fmarks12)),l.a.createElement(k.a.Cell,{textAlign:"center"},parseFloat(t.fmaxmarks)))}),l.a.createElement(k.a.Row,{warning:!0,key:e.fpartcode+1},l.a.createElement(k.a.Cell,{textAlign:"center"},"Part Total"),l.a.createElement(k.a.Cell,{textAlign:"center"},parseFloat(e.fmarks11)),l.a.createElement(k.a.Cell,{textAlign:"center"},parseFloat(e.fmarks12)),l.a.createElement(k.a.Cell,{textAlign:"center"},parseFloat(e.fmaxmarks))))}),Ve.length>0?l.a.createElement(k.a.Footer,null,l.a.createElement(k.a.Row,null,l.a.createElement(k.a.HeaderCell,{textAlign:"center"},"Final Marks"),l.a.createElement(k.a.HeaderCell,{textAlign:"center"},parseFloat(Pt[0].ftotmarks)),l.a.createElement(k.a.HeaderCell,{textAlign:"center"},parseFloat(Pt[0].fsysmarks)),l.a.createElement(k.a.HeaderCell,{textAlign:"center"},parseFloat(qt.ftempmax)))):null)):null,l.a.createElement("center",null,Ve.length?l.a.createElement("div",null,l.a.createElement(x.a,{label:"I acknowledge that above Allocted marks are found correct and any further modification is not allowed.",onChange:function(e,t){Ue(t.checked)}}),l.a.createElement("br",null),l.a.createElement("br",null),l.a.createElement(O.a,{placeholder:"Remarks (optional)",style:{width:"95%",border:"1px solid #999",borderRadius:"4px"},rows:4,value:Pe,onChange:function(e,t){return Me(t.value)}}),l.a.createElement("br",null),l.a.createElement("br",null),l.a.createElement(p.a,{size:"tiny",icon:"arrow alternate circle left outline",color:"red",onClick:function(){return et(!1)},style:{marginRight:"1em"},content:"Cancel"}),l.a.createElement(p.a,{primary:!0,size:"tiny",icon:"save outline",onClick:At,disabled:!Je,content:"Final Submit"}),l.a.createElement("br",null)):null)))))}},71:function(e,t,n){"use strict";n.d(t,"c",function(){return a}),n.d(t,"a",function(){return r}),n.d(t,"b",function(){return o}),n.d(t,"d",function(){return c});var a=window.location.protocol+"//universitysolutions.in/univadmin/app.php?a=",r="http://localhost:8080",o="https://universitysolutions.in/univadmin/app.php?",c="https://universitysolutions.in/tdvs-php/app.php?a="}}]);
//# sourceMappingURL=18.41dde321.chunk.js.map