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.224.32.243
(window.webpackJsonp=window.webpackJsonp||[]).push([[62],{1050:function(e,t,n){"use strict";n.r(t);var o=n(3),a=n(99),r=n(100),s=n(102),l=n(101),i=n(103),u=n(1),c=n.n(u),f=n(858),p=n(1139),d=n(1106),h=n(272),m=n(1098),v=n(1100),g=n(104),k=n(271),w=n(266),C=(n(273),n(270)),S=n(284),O=n.n(S),b=n(485),E=function(e){function t(){var e,n;Object(a.a)(this,t);for(var r=arguments.length,i=new Array(r),u=0;u<r;u++)i[u]=arguments[u];return(n=Object(s.a)(this,(e=Object(l.a)(t)).call.apply(e,[this].concat(i)))).state={showtable:!1,frmDeggrp:"",reportType:"",frmSubmit:!1,rftype:"PDF",tcodefrom:"0000",tcodeto:"zzzz",fexamnorng:"",vdatefrom:O()().subtract(7,"days").format("DD/MM/YYYY"),vdateto:O()().format("DD/MM/YYYY"),fcolfrom:"0",fcolto:"ZZZZ",fdegfrom:"0",fdegto:"ZZZZ"},n.handleChange=function(e,t){switch(t.type){case"text":t.value=t.value.toUpperCase(),n.setState(Object(o.a)({},t.name,t.value));default:n.setState(Object(o.a)({},t.name,t.value))}n.setState({frmSubmit:!1})},n.handleReport=function(){var e=n.props.user,t=e.fdeggrp,o=e.fcuruniv,a=n.state,r=a.reportType,s=a.fcolfrom,l=a.fcolto,i=a.fdegto,u=a.fdegfrom,c=a.fexamnorng;if(""!==t)window.open(k.c+r+"&univcode="+o+"°grp="+t+"&fcollfrom="+s+"&fcollto="+l+"&fdegfrom="+u+"&fdegto="+i+"&fexamnorng="+c+"&fcollcode="+n.props.user.fcollcode,"_blank");else{n.props.showError({header:"Error",content:"Select Degree Group"})}},n.handleChangedate=function(e){n.setState(Object(o.a)({},e.target.name,e.target.value))},n.handleCancel=function(){n.setState({reportType:"",reportFormat:"",frmDeggrp:""})},n.handleFromChange=function(e,t){var o=e.target.name,a=e.target.value;"fdegfrom"!=o&&"fcolfrom"!=o||("fdegfrom"==o&&("0"==a?n.setState({fdegto:"ZZZZ"}):n.setState({fdegto:a})),"fcolfrom"==o&&("0"==a?n.setState({fcolto:"ZZZZ"}):n.setState({fcolto:a})))},n.renderHeader=function(){return c.a.createElement(p.a.Header,{style:{display:"flex"}},c.a.createElement("h3",null,"Result Statistics"),c.a.createElement("div",{className:"ml-auto"},c.a.createElement(d.a,{basic:!0,color:"blue",onClick:n.handleReport,content:"Report",icon:"file"}),c.a.createElement(d.a,{basic:!0,color:"black",icon:"ban",onClick:n.handleCancel,content:"Cancel"}),c.a.createElement(f.a,{to:"/dashboard"},c.a.createElement(d.a,{basic:!0,color:"red",content:"Exit",icon:"home"}))))},n}return Object(i.a)(t,e),Object(r.a)(t,[{key:"render",value:function(){var e=this.state,t=e.frmSubmit,n=e.reportType,o=(e.rftype,e.tcodefrom,e.tcodeto,e.vdatefrom,e.vdateto,e.fcolfrom,e.fcolto,e.fdegfrom,e.fdegto,e.fexamnorng,Object(C.i)());return console.log(n,t),c.a.createElement("div",{className:"animated fadeIn"},c.a.createElement(p.a,{fluid:!0},c.a.createElement(p.a.Content,null,this.renderHeader(),c.a.createElement(h.a,null),c.a.createElement(p.a.Description,{style:{overflowY:"auto",height:"".concat(o,"px")}},c.a.createElement("div",{className:"col-md-6"},c.a.createElement(m.a,null,c.a.createElement(m.a.Group,null,c.a.createElement(m.a.Input,{placeholder:"From",width:8,name:"fcollfrm",onChange:this.handleChange,label:"College Code Range"}),c.a.createElement(m.a.Input,{placeholder:"To",name:"fcollto",width:8,onChange:this.handleChange,style:{marginTop:"1.6em"}})),c.a.createElement(m.a.Field,{width:"8"},c.a.createElement("label",null,"Report Type "),c.a.createElement(v.a,{placeholder:"Select Report Type",name:"reportType",value:n,selection:!0,search:!0,options:[{value:"collwiseResultsCount",text:"Collegewise"},{value:"degwiseResultsCount",text:"Degreewise"}],onChange:this.handleChange}))))))))}}]),t}(u.Component);t.default=Object(g.b)(function(e){return{user:e.user,data2:e.allworkDOneReport}},{showError:w.w,getWorkDone:b.a})(E)},273:function(e,t,n){e.exports=n(274)},274:function(e,t,n){"use strict";var o,a=(o=n(1))&&"object"==typeof o&&"default"in o?o.default:o,r=n(105);function s(){return(s=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e}).apply(this,arguments)}function l(e,t){e.prototype=Object.create(t.prototype),function(e,t){for(var n=Object.getOwnPropertyNames(t),o=0;o<n.length;o++){var a=n[o],r=Object.getOwnPropertyDescriptor(t,a);r&&r.configurable&&void 0===e[a]&&Object.defineProperty(e,a,r)}}(e.prototype.constructor=e,t)}function i(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}var u=function(e,t,n,o,a,r,s,l){if(!e){var i;if(void 0===t)i=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var u=[n,o,a,r,s,l],c=0;(i=new Error(t.replace(/%s/g,function(){return u[c++]}))).name="Invariant Violation"}throw i.framesToPop=1,i}};function c(e,t,n){if("selectionStart"in e&&"selectionEnd"in e)e.selectionStart=t,e.selectionEnd=n;else{var o=e.createTextRange();o.collapse(!0),o.moveStart("character",t),o.moveEnd("character",n-t),o.select()}}var f={9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},p="_";function d(e,t,n){var o="",a="",r=null,s=[];if(void 0===t&&(t=p),null==n&&(n=f),!e||"string"!=typeof e)return{maskChar:t,formatChars:n,mask:null,prefix:null,lastEditablePosition:null,permanents:[]};var l=!1;return e.split("").forEach(function(e){l=!l&&"\\"===e||(l||!n[e]?(s.push(o.length),o.length===s.length-1&&(a+=e)):r=o.length+1,o+=e,!1)}),{maskChar:t,formatChars:n,prefix:a,mask:o,lastEditablePosition:r,permanents:s}}function h(e,t){return-1!==e.permanents.indexOf(t)}function m(e,t,n){var o=e.mask,a=e.formatChars;if(!n)return!1;if(h(e,t))return o[t]===n;var r=a[o[t]];return new RegExp(r).test(n)}function v(e,t){return t.split("").every(function(t,n){return h(e,n)||!m(e,n,t)})}function g(e,t){var n=e.maskChar,o=e.prefix;if(!n){for(;t.length>o.length&&h(e,t.length-1);)t=t.slice(0,t.length-1);return t.length}for(var a=o.length,r=t.length;r>=o.length;r--){var s=t[r];if(!h(e,r)&&m(e,r,s)){a=r+1;break}}return a}function k(e,t){return g(e,t)===e.mask.length}function w(e,t){var n=e.maskChar,o=e.mask,a=e.prefix;if(!n){for((t=C(e,"",t,0)).length<a.length&&(t=a);t.length<o.length&&h(e,t.length);)t+=o[t.length];return t}if(t)return C(e,w(e,""),t,0);for(var r=0;r<o.length;r++)h(e,r)?t+=o[r]:t+=n;return t}function C(e,t,n,o){var a=e.mask,r=e.maskChar,s=e.prefix,l=n.split(""),i=k(e,t);return!r&&o>t.length&&(t+=a.slice(t.length,o)),l.every(function(n){for(;c=n,h(e,u=o)&&c!==a[u];){if(o>=t.length&&(t+=a[o]),l=n,r&&h(e,o)&&l===r)return!0;if(++o>=a.length)return!1}var l,u,c;return!m(e,o,n)&&n!==r||(o<t.length?t=r||i||o<s.length?t.slice(0,o)+n+t.slice(o+1):(t=t.slice(0,o)+n+t.slice(o),w(e,t)):r||(t+=n),++o<a.length)}),t}function S(e,t){for(var n=e.mask,o=t;o<n.length;++o)if(!h(e,o))return o;return null}function O(e){return e||0===e?e+"":""}function b(e,t,n,o,a){var r=e.mask,s=e.prefix,l=e.lastEditablePosition,i=t,u="",c=0,f=0,p=Math.min(a.start,n.start);return n.end>a.start?f=(c=function(e,t,n,o){var a=e.mask,r=e.maskChar,s=n.split(""),l=o;return s.every(function(t){for(;s=t,h(e,n=o)&&s!==a[n];)if(++o>=a.length)return!1;var n,s;return(m(e,o,t)||t===r)&&o++,o<a.length}),o-l}(e,0,u=i.slice(a.start,n.end),p))?a.length:0:i.length<o.length&&(f=o.length-i.length),i=o,f&&(1!==f||a.length||(p=a.start===n.start?S(e,n.start):function(e,t){for(var n=t;0<=n;--n)if(!h(e,n))return n;return null}(e,n.start)),i=function(e,t,n,o){var a=n+o,r=e.maskChar,s=e.mask,l=e.prefix,i=t.split("");if(r)return i.map(function(t,o){return o<n||a<=o?t:h(e,o)?s[o]:r}).join("");for(var u=a;u<i.length;u++)h(e,u)&&(i[u]="");return n=Math.max(l.length,n),i.splice(n,a-n),t=i.join(""),w(e,t)}(e,i,p,f)),i=C(e,i,u,p),(p+=c)>=r.length?p=r.length:p<s.length&&!c?p=s.length:p>=s.length&&p<l&&c&&(p=S(e,p)),u||(u=null),{value:i=w(e,i),enteredString:u,selection:{start:p,end:p}}}function E(e){return"function"==typeof e}function D(){return window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame}function y(e){return(D()?window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame:function(){return setTimeout(e,1e3/60)})(e)}function M(e){(D()||clearTimeout)(e)}var I=function(e){function t(t){var n=e.call(this,t)||this;n.focused=!1,n.mounted=!1,n.previousSelection=null,n.selectionDeferId=null,n.saveSelectionLoopDeferId=null,n.saveSelectionLoop=function(){n.previousSelection=n.getSelection(),n.saveSelectionLoopDeferId=y(n.saveSelectionLoop)},n.runSaveSelectionLoop=function(){null===n.saveSelectionLoopDeferId&&n.saveSelectionLoop()},n.stopSaveSelectionLoop=function(){null!==n.saveSelectionLoopDeferId&&(M(n.saveSelectionLoopDeferId),n.saveSelectionLoopDeferId=null,n.previousSelection=null)},n.getInputDOMNode=function(){if(!n.mounted)return null;var e=r.findDOMNode(i(i(n))),t="undefined"!=typeof window&&e instanceof window.Element;if(e&&!t)return null;if("INPUT"!==e.nodeName&&(e=e.querySelector("input")),!e)throw new Error("react-input-mask: inputComponent doesn't contain input node");return e},n.getInputValue=function(){var e=n.getInputDOMNode();return e?e.value:null},n.setInputValue=function(e){var t=n.getInputDOMNode();t&&(n.value=e,t.value=e)},n.setCursorToEnd=function(){var e=g(n.maskOptions,n.value),t=S(n.maskOptions,e);null!==t&&n.setCursorPosition(t)},n.setSelection=function(e,t,o){void 0===o&&(o={});var a=n.getInputDOMNode(),r=n.isFocused();a&&r&&(o.deferred||c(a,e,t),null!==n.selectionDeferId&&M(n.selectionDeferId),n.selectionDeferId=y(function(){n.selectionDeferId=null,c(a,e,t)}),n.previousSelection={start:e,end:t,length:Math.abs(t-e)})},n.getSelection=function(){return function(e){var t=0,n=0;if("selectionStart"in e&&"selectionEnd"in e)t=e.selectionStart,n=e.selectionEnd;else{var o=document.selection.createRange();o.parentElement()===e&&(t=-o.moveStart("character",-e.value.length),n=-o.moveEnd("character",-e.value.length))}return{start:t,end:n,length:n-t}}(n.getInputDOMNode())},n.getCursorPosition=function(){return n.getSelection().start},n.setCursorPosition=function(e){n.setSelection(e,e)},n.isFocused=function(){return n.focused},n.getBeforeMaskedValueChangeConfig=function(){var e=n.maskOptions,t=e.mask,o=e.maskChar,a=e.permanents,r=e.formatChars;return{mask:t,maskChar:o,permanents:a,alwaysShowMask:!!n.props.alwaysShowMask,formatChars:r}},n.isInputAutofilled=function(e,t,o,a){var r=n.getInputDOMNode();try{if(r.matches(":-webkit-autofill"))return!0}catch(u){}return!n.focused||a.end<o.length&&t.end===e.length},n.onChange=function(e){var t=i(i(n)).beforePasteState,o=i(i(n)).previousSelection,a=n.props.beforeMaskedValueChange,r=n.getInputValue(),s=n.value,l=n.getSelection();n.isInputAutofilled(r,l,s,o)&&(s=w(n.maskOptions,""),o={start:0,end:0,length:0}),t&&(o=t.selection,s=t.value,l={start:o.start+r.length,end:o.start+r.length,length:0},r=s.slice(0,o.start)+r+s.slice(o.end),n.beforePasteState=null);var u=b(n.maskOptions,r,l,s,o),c=u.enteredString,f=u.selection,p=u.value;if(E(a)){var d=a({value:p,selection:f},{value:s,selection:o},c,n.getBeforeMaskedValueChangeConfig());p=d.value,f=d.selection}n.setInputValue(p),E(n.props.onChange)&&n.props.onChange(e),n.isWindowsPhoneBrowser?n.setSelection(f.start,f.end,{deferred:!0}):n.setSelection(f.start,f.end)},n.onFocus=function(e){var t=n.props.beforeMaskedValueChange,o=n.maskOptions,a=o.mask,r=o.prefix;if(n.focused=!0,n.mounted=!0,a){if(n.value)g(n.maskOptions,n.value)<n.maskOptions.mask.length&&n.setCursorToEnd();else{var s=w(n.maskOptions,r),l=w(n.maskOptions,s),i=g(n.maskOptions,l),u=S(n.maskOptions,i),c={start:u,end:u};if(E(t)){var f=t({value:l,selection:c},{value:n.value,selection:null},null,n.getBeforeMaskedValueChangeConfig());l=f.value,c=f.selection}var p=l!==n.getInputValue();p&&n.setInputValue(l),p&&E(n.props.onChange)&&n.props.onChange(e),n.setSelection(c.start,c.end)}n.runSaveSelectionLoop()}E(n.props.onFocus)&&n.props.onFocus(e)},n.onBlur=function(e){var t=n.props.beforeMaskedValueChange,o=n.maskOptions.mask;if(n.stopSaveSelectionLoop(),n.focused=!1,o&&!n.props.alwaysShowMask&&v(n.maskOptions,n.value)){var a="";E(t)&&(a=t({value:a,selection:null},{value:n.value,selection:n.previousSelection},null,n.getBeforeMaskedValueChangeConfig()).value);var r=a!==n.getInputValue();r&&n.setInputValue(a),r&&E(n.props.onChange)&&n.props.onChange(e)}E(n.props.onBlur)&&n.props.onBlur(e)},n.onMouseDown=function(e){if(!n.focused&&document.addEventListener){n.mouseDownX=e.clientX,n.mouseDownY=e.clientY,n.mouseDownTime=(new Date).getTime();document.addEventListener("mouseup",function e(t){if(document.removeEventListener("mouseup",e),n.focused){var o=Math.abs(t.clientX-n.mouseDownX),a=Math.abs(t.clientY-n.mouseDownY),r=Math.max(o,a),s=(new Date).getTime()-n.mouseDownTime;(r<=10&&s<=200||r<=5&&s<=300)&&n.setCursorToEnd()}})}E(n.props.onMouseDown)&&n.props.onMouseDown(e)},n.onPaste=function(e){E(n.props.onPaste)&&n.props.onPaste(e),e.defaultPrevented||(n.beforePasteState={value:n.getInputValue(),selection:n.getSelection()},n.setInputValue(""))},n.handleRef=function(e){null==n.props.children&&E(n.props.inputRef)&&n.props.inputRef(e)};var o=t.mask,a=t.maskChar,s=t.formatChars,l=t.alwaysShowMask,u=t.beforeMaskedValueChange,f=t.defaultValue,p=t.value;n.maskOptions=d(o,a,s),null==f&&(f=""),null==p&&(p=f);var h=O(p);if(n.maskOptions.mask&&(l||h)&&(h=w(n.maskOptions,h),E(u))){var m=t.value;null==t.value&&(m=f),h=u({value:h,selection:null},{value:m=O(m),selection:null},null,n.getBeforeMaskedValueChangeConfig()).value}return n.value=h,n}l(t,e);var n=t.prototype;return n.componentDidMount=function(){this.mounted=!0,this.getInputDOMNode()&&(this.isWindowsPhoneBrowser=function(){var e=new RegExp("windows","i"),t=new RegExp("phone","i"),n=navigator.userAgent;return e.test(n)&&t.test(n)}(),this.maskOptions.mask&&this.getInputValue()!==this.value&&this.setInputValue(this.value))},n.componentDidUpdate=function(){var e=this.previousSelection,t=this.props,n=t.beforeMaskedValueChange,o=t.alwaysShowMask,a=t.mask,r=t.maskChar,s=t.formatChars,l=this.maskOptions,i=o||this.isFocused(),u=null!=this.props.value,c=u?O(this.props.value):this.value,f=e?e.start:null;if(this.maskOptions=d(a,r,s),this.maskOptions.mask){!l.mask&&this.isFocused()&&this.runSaveSelectionLoop();var p=this.maskOptions.mask&&this.maskOptions.mask!==l.mask;if(l.mask||u||(c=this.getInputValue()),(p||this.maskOptions.mask&&(c||i))&&(c=w(this.maskOptions,c)),p){var h=g(this.maskOptions,c);(null===f||h<f)&&(f=k(this.maskOptions,c)?h:S(this.maskOptions,h))}!this.maskOptions.mask||!v(this.maskOptions,c)||i||u&&this.props.value||(c="");var m={start:f,end:f};if(E(n)){var C=n({value:c,selection:m},{value:this.value,selection:this.previousSelection},null,this.getBeforeMaskedValueChangeConfig());c=C.value,m=C.selection}this.value=c;var b=this.getInputValue()!==this.value;b?(this.setInputValue(this.value),this.forceUpdate()):p&&this.forceUpdate();var D=!1;null!=m.start&&null!=m.end&&(D=!e||e.start!==m.start||e.end!==m.end),(D||b)&&this.setSelection(m.start,m.end)}else l.mask&&(this.stopSaveSelectionLoop(),this.forceUpdate())},n.componentWillUnmount=function(){this.mounted=!1,null!==this.selectionDeferId&&M(this.selectionDeferId),this.stopSaveSelectionLoop()},n.render=function(){var e,t=this.props,n=(t.mask,t.alwaysShowMask,t.maskChar,t.formatChars,t.inputRef,t.beforeMaskedValueChange,t.children),o=function(e,t){if(null==e)return{};var n,o,a={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],0<=t.indexOf(n)||(a[n]=e[n]);return a}(t,["mask","alwaysShowMask","maskChar","formatChars","inputRef","beforeMaskedValueChange","children"]);if(n){E(n)||u(!1);var r=["onChange","onPaste","onMouseDown","onFocus","onBlur","value","disabled","readOnly"],l=s({},o);r.forEach(function(e){return delete l[e]}),e=n(l),r.filter(function(t){return null!=e.props[t]&&e.props[t]!==o[t]}).length&&u(!1)}else e=a.createElement("input",s({ref:this.handleRef},o));var i={onFocus:this.onFocus,onBlur:this.onBlur};return this.maskOptions.mask&&(o.disabled||o.readOnly||(i.onChange=this.onChange,i.onPaste=this.onPaste,i.onMouseDown=this.onMouseDown),null!=o.value&&(i.value=this.value)),e=a.cloneElement(e,i)},t}(a.Component);e.exports=I},485:function(e,t,n){"use strict";n.d(t,"a",function(){return i});var o=n(41),a=n.n(o),r=n(68),s=n(269),l=n(266),i=function(e,t,n){var o={};return function(){var i=Object(r.a)(a.a.mark(function r(i,u){var c,f;return a.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:if(c=u(),console.log("params",e,t),i({type:"SET_LOADER"}),"600"!=n){a.next=7;break}return a.next=6,s.a.get("/app.php?a=teachworkapi&univcode="+c.univ.funivcode+"°grp=UG&tcodefrom="+t+"&tcodeto="+t+"&vdatefrom="+e.vdatefrom+"&vdateto="+e.vdateto+"&format=PDF&fcollcode="+c.user.fcollcode);case 6:o=a.sent;case 7:if("500"!=n){a.next=13;break}return a.next=10,s.a.get("/app.php?a=teachworkapi&univcode="+c.univ.funivcode+"°grp=UG&tcodefrom=0000&tcodeto=zzzz&vdatefrom="+e.vdatefrom+"&vdateto="+e.vdateto+"&format=PDF&fcollcode="+c.user.fcollcode);case 10:o=a.sent,a.next=17;break;case 13:if("600"==n){a.next=17;break}return a.next=16,s.a.get("/app.php?a=teachworkapi&univcode="+c.univ.funivcode+"°grp=UG&tcodefrom="+e.tcodefrom+"&tcodeto="+e.tcodeto+"&vdatefrom="+e.vdatefrom+"&vdateto="+e.vdateto+"&format=PDF&user=");case 16:o=a.sent;case 17:i({type:"UNSET_LOADER"}),"object"!==typeof o.data?i({type:"SET_ERROR",payload:{error_code:-1,data:{msg:"Something went wrong"},status:"failure"}}):-1===o.data.error_code?(f={header:"Error",content:o.data.data.msg},i(Object(l.w)(f))):i({type:"WORK_DONE_REPORT",payload:o.data});case 19:case"end":return a.stop()}},r)}));return function(e,t){return i.apply(this,arguments)}}()}}}]);
//# sourceMappingURL=62.fb5e8023.chunk.js.map
|