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 : 13.59.5.179
(window.webpackJsonp=window.webpackJsonp||[]).push([[59],{1055:function(e,t,n){"use strict";n.r(t);var a=n(69),o=n(41),r=n.n(o),s=n(68),l=n(1),i=n.n(l),u=n(1139),c=n(1106),p=n(272),f=n(1096),h=n(1098),m=n(1100),d=n(271),v=n(273),g=n.n(v),k=n(284),w=n.n(k),C=n(104),O=n(266),S=n(486),E=n(379),b=n.n(E),y=(n(380),n(858));t.default=Object(C.b)(function(e){return{user:e.user}},{showError:O.w,saveUploadedPhotocopy:S.a})(function(e){var t=function(){var e=Object(s.a)(r.a.mark(function e(t,n){return r.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:console.log(t.map(function(e){return e.meta})),n.forEach(function(e){return e.remove()});case 2:case"end":return e.stop()}},e)}));return function(t,n){return e.apply(this,arguments)}}(),n=Object(l.useState)(!1),o=Object(a.a)(n,2),v=o[0],k=o[1],C=Object(l.useState)(w()().format("DD/MM/YYYY")),O=Object(a.a)(C,2),S=O[0],E=O[1],D=Object(l.useState)(w()().format("DD/MM/YYYY")),I=Object(a.a)(D,2),M=I[0],P=I[1],x=Object(l.useState)("0"),L=Object(a.a)(x,2),j=L[0],F=L[1],V=Object(l.useState)("ZZZZZ"),N=Object(a.a)(V,2),R=N[0],T=N[1],A=Object(l.useState)([]),B=Object(a.a)(A,2),U=B[0],Y=B[1],q=Object(l.useState)("PENDING"),z=Object(a.a)(q,2),Z=z[0],G=z[1];Object(l.useEffect)(function(){Y([{key:"PENDING",text:"PENDING",value:"PENDING"},{key:"UPLOADED",text:"UPLOADED",value:"UPLOADED"},{key:"ALL",text:"ALL",value:"ALL"}])},[]);var H=70*window.innerHeight/100,_={n:"[0-1]",m:"[0-9]",e:"[0-3]",d:"[0-9]",z:"[1-2]",y:"[0-9]"};return i.a.createElement(i.a.Fragment,null,i.a.createElement(u.a,{fluid:!0},i.a.createElement(u.a.Content,null,i.a.createElement(u.a.Header,{style:{display:"flex"}},i.a.createElement("h4",null,"Upload Photo Copy Scripts"),i.a.createElement("div",{className:"ml-auto"},i.a.createElement(c.a,{basic:!0,color:"blue",content:"Pending Report",icon:"file pdf outline",onClick:function(){return k(!0)}}),i.a.createElement(y.a,{to:"/dashboard"},i.a.createElement(c.a,{basic:!0,color:"red",content:"Exit",icon:"home"})))),i.a.createElement(p.a,null),i.a.createElement(u.a.Description,{style:{height:"".concat(H,"px"),overflowY:"auto"}},i.a.createElement(f.a,{style:{maxHeight:"50%",width:"40%"},size:"small",open:v,onClose:function(){return k(!1)},closeOnDimmerClick:!1},i.a.createElement(f.a.Header,{style:{display:"flex"}},"Photo copy pending upload report"),i.a.createElement(f.a.Content,null,i.a.createElement(h.a,null,i.a.createElement(h.a.Group,null,i.a.createElement(h.a.Field,{width:8},i.a.createElement("label",null," Date Range "),i.a.createElement(g.a,{formatChars:_,type:"text",value:S,mask:"ed/nm/zyyy",placeholder:"Date From",name:"vdatefrom",onChange:function(e){return E(e.target.value)}})),i.a.createElement(h.a.Field,{width:8},i.a.createElement(g.a,{formatChars:_,type:"text",value:M,mask:"ed/nm/zyyy",placeholder:"To",name:"vdateto",onChange:function(e){return P(e.target.value)},style:{marginTop:"1.6em"}}))),i.a.createElement(h.a.Group,null,i.a.createElement(h.a.Field,{width:8},i.a.createElement("label",null," QP Code Range "),i.a.createElement(h.a.Input,{type:"text",value:j,maxLength:5,placeholder:"QP Code From",name:"qpcodeFrom",onChange:function(e,t){return F(t.value)}})),i.a.createElement(h.a.Field,{width:8},i.a.createElement(h.a.Input,{type:"text",value:R,maxLength:5,placeholder:"QP Code To",name:"qpcodeTo",onChange:function(e,t){return T(t.value)},style:{marginTop:"1.6em"}}))),i.a.createElement(h.a.Field,null,i.a.createElement("label",null,"Status"),i.a.createElement(m.a,{placeholder:"Select Status",fluid:!0,selection:!0,value:Z,onChange:function(e,t){G(t.value)},options:U})),i.a.createElement(h.a.Field,null,i.a.createElement(c.a,{style:{float:"right"},color:"blue",onClick:function(){window.open(d.c+"viewPhotoCopyPendingList&univcode="+e.user.fcuruniv+"&fdeggrp="+e.user.fdeggrp+"&dateFrom="+S+"&dateTo="+M+"&qpcodeFrom="+j+"&qpcodeTo="+R+"&status="+Z,"_blank")},content:"View Report"}))))),i.a.createElement(b.a,{getUploadParams:function(t){var n=t.file,a=(t.meta,new FormData);return a.append("fileField",n),a.append("univcode",JSON.stringify(e.user)),{url:d.a+"/upload_pc.php",body:a}},onChangeStatus:function(e,t){var n=e.meta;e.remove,console.log(t,n)},onSubmit:t,validate:function(e){e.file;var t=e.meta.name.split("-");return console.log(t[0].length,t[1].length,t[2].length),(5!==t[0].length||4!==t[1].length||6!==t[2].length)&&"Invalid file name"},accept:"application/pdf",maxFiles:50,styles:{dropzone:{minHeight:200,maxHeight:H-10}}})))))})},273:function(e,t,n){e.exports=n(274)},274:function(e,t,n){"use strict";var a,o=(a=n(1))&&"object"==typeof a&&"default"in a?a.default:a,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 a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}function l(e,t){e.prototype=Object.create(t.prototype),function(e,t){for(var n=Object.getOwnPropertyNames(t),a=0;a<n.length;a++){var o=n[a],r=Object.getOwnPropertyDescriptor(t,o);r&&r.configurable&&void 0===e[o]&&Object.defineProperty(e,o,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,a,o,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,a,o,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 a=e.createTextRange();a.collapse(!0),a.moveStart("character",t),a.moveEnd("character",n-t),a.select()}}var p={9:"[0-9]",a:"[A-Za-z]","*":"[A-Za-z0-9]"},f="_";function h(e,t,n){var a="",o="",r=null,s=[];if(void 0===t&&(t=f),null==n&&(n=p),!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(a.length),a.length===s.length-1&&(o+=e)):r=a.length+1,a+=e,!1)}),{maskChar:t,formatChars:n,prefix:o,mask:a,lastEditablePosition:r,permanents:s}}function m(e,t){return-1!==e.permanents.indexOf(t)}function d(e,t,n){var a=e.mask,o=e.formatChars;if(!n)return!1;if(m(e,t))return a[t]===n;var r=o[a[t]];return new RegExp(r).test(n)}function v(e,t){return t.split("").every(function(t,n){return m(e,n)||!d(e,n,t)})}function g(e,t){var n=e.maskChar,a=e.prefix;if(!n){for(;t.length>a.length&&m(e,t.length-1);)t=t.slice(0,t.length-1);return t.length}for(var o=a.length,r=t.length;r>=a.length;r--){var s=t[r];if(!m(e,r)&&d(e,r,s)){o=r+1;break}}return o}function k(e,t){return g(e,t)===e.mask.length}function w(e,t){var n=e.maskChar,a=e.mask,o=e.prefix;if(!n){for((t=C(e,"",t,0)).length<o.length&&(t=o);t.length<a.length&&m(e,t.length);)t+=a[t.length];return t}if(t)return C(e,w(e,""),t,0);for(var r=0;r<a.length;r++)m(e,r)?t+=a[r]:t+=n;return t}function C(e,t,n,a){var o=e.mask,r=e.maskChar,s=e.prefix,l=n.split(""),i=k(e,t);return!r&&a>t.length&&(t+=o.slice(t.length,a)),l.every(function(n){for(;c=n,m(e,u=a)&&c!==o[u];){if(a>=t.length&&(t+=o[a]),l=n,r&&m(e,a)&&l===r)return!0;if(++a>=o.length)return!1}var l,u,c;return!d(e,a,n)&&n!==r||(a<t.length?t=r||i||a<s.length?t.slice(0,a)+n+t.slice(a+1):(t=t.slice(0,a)+n+t.slice(a),w(e,t)):r||(t+=n),++a<o.length)}),t}function O(e,t){for(var n=e.mask,a=t;a<n.length;++a)if(!m(e,a))return a;return null}function S(e){return e||0===e?e+"":""}function E(e,t,n,a,o){var r=e.mask,s=e.prefix,l=e.lastEditablePosition,i=t,u="",c=0,p=0,f=Math.min(o.start,n.start);return n.end>o.start?p=(c=function(e,t,n,a){var o=e.mask,r=e.maskChar,s=n.split(""),l=a;return s.every(function(t){for(;s=t,m(e,n=a)&&s!==o[n];)if(++a>=o.length)return!1;var n,s;return(d(e,a,t)||t===r)&&a++,a<o.length}),a-l}(e,0,u=i.slice(o.start,n.end),f))?o.length:0:i.length<a.length&&(p=a.length-i.length),i=a,p&&(1!==p||o.length||(f=o.start===n.start?O(e,n.start):function(e,t){for(var n=t;0<=n;--n)if(!m(e,n))return n;return null}(e,n.start)),i=function(e,t,n,a){var o=n+a,r=e.maskChar,s=e.mask,l=e.prefix,i=t.split("");if(r)return i.map(function(t,a){return a<n||o<=a?t:m(e,a)?s[a]:r}).join("");for(var u=o;u<i.length;u++)m(e,u)&&(i[u]="");return n=Math.max(l.length,n),i.splice(n,o-n),t=i.join(""),w(e,t)}(e,i,f,p)),i=C(e,i,u,f),(f+=c)>=r.length?f=r.length:f<s.length&&!c?f=s.length:f>=s.length&&f<l&&c&&(f=O(e,f)),u||(u=null),{value:i=w(e,i),enteredString:u,selection:{start:f,end:f}}}function b(e){return"function"==typeof e}function y(){return window.cancelAnimationFrame||window.webkitCancelRequestAnimationFrame||window.webkitCancelAnimationFrame||window.mozCancelAnimationFrame}function D(e){return(y()?window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame:function(){return setTimeout(e,1e3/60)})(e)}function I(e){(y()||clearTimeout)(e)}var M=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=D(n.saveSelectionLoop)},n.runSaveSelectionLoop=function(){null===n.saveSelectionLoopDeferId&&n.saveSelectionLoop()},n.stopSaveSelectionLoop=function(){null!==n.saveSelectionLoopDeferId&&(I(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=O(n.maskOptions,e);null!==t&&n.setCursorPosition(t)},n.setSelection=function(e,t,a){void 0===a&&(a={});var o=n.getInputDOMNode(),r=n.isFocused();o&&r&&(a.deferred||c(o,e,t),null!==n.selectionDeferId&&I(n.selectionDeferId),n.selectionDeferId=D(function(){n.selectionDeferId=null,c(o,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 a=document.selection.createRange();a.parentElement()===e&&(t=-a.moveStart("character",-e.value.length),n=-a.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,a=e.maskChar,o=e.permanents,r=e.formatChars;return{mask:t,maskChar:a,permanents:o,alwaysShowMask:!!n.props.alwaysShowMask,formatChars:r}},n.isInputAutofilled=function(e,t,a,o){var r=n.getInputDOMNode();try{if(r.matches(":-webkit-autofill"))return!0}catch(u){}return!n.focused||o.end<a.length&&t.end===e.length},n.onChange=function(e){var t=i(i(n)).beforePasteState,a=i(i(n)).previousSelection,o=n.props.beforeMaskedValueChange,r=n.getInputValue(),s=n.value,l=n.getSelection();n.isInputAutofilled(r,l,s,a)&&(s=w(n.maskOptions,""),a={start:0,end:0,length:0}),t&&(a=t.selection,s=t.value,l={start:a.start+r.length,end:a.start+r.length,length:0},r=s.slice(0,a.start)+r+s.slice(a.end),n.beforePasteState=null);var u=E(n.maskOptions,r,l,s,a),c=u.enteredString,p=u.selection,f=u.value;if(b(o)){var h=o({value:f,selection:p},{value:s,selection:a},c,n.getBeforeMaskedValueChangeConfig());f=h.value,p=h.selection}n.setInputValue(f),b(n.props.onChange)&&n.props.onChange(e),n.isWindowsPhoneBrowser?n.setSelection(p.start,p.end,{deferred:!0}):n.setSelection(p.start,p.end)},n.onFocus=function(e){var t=n.props.beforeMaskedValueChange,a=n.maskOptions,o=a.mask,r=a.prefix;if(n.focused=!0,n.mounted=!0,o){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=O(n.maskOptions,i),c={start:u,end:u};if(b(t)){var p=t({value:l,selection:c},{value:n.value,selection:null},null,n.getBeforeMaskedValueChangeConfig());l=p.value,c=p.selection}var f=l!==n.getInputValue();f&&n.setInputValue(l),f&&b(n.props.onChange)&&n.props.onChange(e),n.setSelection(c.start,c.end)}n.runSaveSelectionLoop()}b(n.props.onFocus)&&n.props.onFocus(e)},n.onBlur=function(e){var t=n.props.beforeMaskedValueChange,a=n.maskOptions.mask;if(n.stopSaveSelectionLoop(),n.focused=!1,a&&!n.props.alwaysShowMask&&v(n.maskOptions,n.value)){var o="";b(t)&&(o=t({value:o,selection:null},{value:n.value,selection:n.previousSelection},null,n.getBeforeMaskedValueChangeConfig()).value);var r=o!==n.getInputValue();r&&n.setInputValue(o),r&&b(n.props.onChange)&&n.props.onChange(e)}b(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 a=Math.abs(t.clientX-n.mouseDownX),o=Math.abs(t.clientY-n.mouseDownY),r=Math.max(a,o),s=(new Date).getTime()-n.mouseDownTime;(r<=10&&s<=200||r<=5&&s<=300)&&n.setCursorToEnd()}})}b(n.props.onMouseDown)&&n.props.onMouseDown(e)},n.onPaste=function(e){b(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&&b(n.props.inputRef)&&n.props.inputRef(e)};var a=t.mask,o=t.maskChar,s=t.formatChars,l=t.alwaysShowMask,u=t.beforeMaskedValueChange,p=t.defaultValue,f=t.value;n.maskOptions=h(a,o,s),null==p&&(p=""),null==f&&(f=p);var m=S(f);if(n.maskOptions.mask&&(l||m)&&(m=w(n.maskOptions,m),b(u))){var d=t.value;null==t.value&&(d=p),m=u({value:m,selection:null},{value:d=S(d),selection:null},null,n.getBeforeMaskedValueChangeConfig()).value}return n.value=m,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,a=t.alwaysShowMask,o=t.mask,r=t.maskChar,s=t.formatChars,l=this.maskOptions,i=a||this.isFocused(),u=null!=this.props.value,c=u?S(this.props.value):this.value,p=e?e.start:null;if(this.maskOptions=h(o,r,s),this.maskOptions.mask){!l.mask&&this.isFocused()&&this.runSaveSelectionLoop();var f=this.maskOptions.mask&&this.maskOptions.mask!==l.mask;if(l.mask||u||(c=this.getInputValue()),(f||this.maskOptions.mask&&(c||i))&&(c=w(this.maskOptions,c)),f){var m=g(this.maskOptions,c);(null===p||m<p)&&(p=k(this.maskOptions,c)?m:O(this.maskOptions,m))}!this.maskOptions.mask||!v(this.maskOptions,c)||i||u&&this.props.value||(c="");var d={start:p,end:p};if(b(n)){var C=n({value:c,selection:d},{value:this.value,selection:this.previousSelection},null,this.getBeforeMaskedValueChangeConfig());c=C.value,d=C.selection}this.value=c;var E=this.getInputValue()!==this.value;E?(this.setInputValue(this.value),this.forceUpdate()):f&&this.forceUpdate();var y=!1;null!=d.start&&null!=d.end&&(y=!e||e.start!==d.start||e.end!==d.end),(y||E)&&this.setSelection(d.start,d.end)}else l.mask&&(this.stopSaveSelectionLoop(),this.forceUpdate())},n.componentWillUnmount=function(){this.mounted=!1,null!==this.selectionDeferId&&I(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),a=function(e,t){if(null==e)return{};var n,a,o={},r=Object.keys(e);for(a=0;a<r.length;a++)n=r[a],0<=t.indexOf(n)||(o[n]=e[n]);return o}(t,["mask","alwaysShowMask","maskChar","formatChars","inputRef","beforeMaskedValueChange","children"]);if(n){b(n)||u(!1);var r=["onChange","onPaste","onMouseDown","onFocus","onBlur","value","disabled","readOnly"],l=s({},a);r.forEach(function(e){return delete l[e]}),e=n(l),r.filter(function(t){return null!=e.props[t]&&e.props[t]!==a[t]}).length&&u(!1)}else e=o.createElement("input",s({ref:this.handleRef},a));var i={onFocus:this.onFocus,onBlur:this.onBlur};return this.maskOptions.mask&&(a.disabled||a.readOnly||(i.onChange=this.onChange,i.onPaste=this.onPaste,i.onMouseDown=this.onMouseDown),null!=a.value&&(i.value=this.value)),e=o.cloneElement(e,i)},t}(o.Component);e.exports=M},486:function(e,t,n){"use strict";n.d(t,"a",function(){return i});var a=n(41),o=n.n(a),r=n(68),s=n(269),l=n(266),i=function(e){return function(){var t=Object(r.a)(o.a.mark(function t(n,a){var r,i,u,c,p;return o.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=a(),n({type:"SET_LOADER"}),t.next=4,s.a.post("app.php?a=submitUploadedPhotocopy&univcode="+r.univ.funivcode,{data:e});case 4:i=t.sent,n({type:"UNSET_LOADER"}),"object"!==typeof i.data?(u={header:"Error",content:"Something went wrong"},n(Object(l.w)(u))):-1===i.data.error_code?(c={header:"Error",content:i.data.msg},n(Object(l.w)(c))):(p={header:"Success",content:i.data.msg},n(Object(l.w)(p)));case 7:case"end":return t.stop()}},t)}));return function(e,n){return t.apply(this,arguments)}}()}}}]);
//# sourceMappingURL=59.ea1ff142.chunk.js.map
|