![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/ts.corals.io/frontend/dist/_nuxt/ |
(window.webpackJsonp=window.webpackJsonp||[]).push([[31],{732:function(t,e,n){"use strict";var r={name:"LineChart",extends:n(734).a,props:["lineChartData","lineChartOptions"],mounted:function(){this.renderChart(this.lineChartData,this.lineChartOptions)}},o=n(88),component=Object(o.a)(r,undefined,undefined,!1,null,null,null);e.a=component.exports},741:function(t,e,n){"use strict";function r(t,e){if(e)for(var n=Object.keys(e),i=0,r=n.length;i<r;i++)t[n[i]]=e[n[i]];return t}function o(t){return r({},t)}var l=/^\d$/,h=/^[A-Za-z]$/,c=/^[\dA-Za-z]$/,d={"*":{validate:function(t){return c.test(t)}},1:{validate:function(t){return l.test(t)}},a:{validate:function(t){return h.test(t)}},A:{validate:function(t){return h.test(t)},transform:function(t){return t.toUpperCase()}},"#":{validate:function(t){return c.test(t)},transform:function(t){return t.toUpperCase()}}};function f(source,t,e,n){if(!(this instanceof f))return new f(source,t,e);this.placeholderChar=e||"_",this.formatCharacters=t||d,this.source=source,this.pattern=[],this.length=0,this.firstEditableIndex=null,this.lastEditableIndex=null,this._editableIndices={},this.isRevealingMask=n||!1,this._parse()}function v(t){if(!(this instanceof v))return new v(t);if(null==(t=r({formatCharacters:null,pattern:null,isRevealingMask:!1,placeholderChar:"_",selection:{start:0,end:0},value:""},t)).pattern)throw new Error("InputMask: you must provide a pattern.");if("string"!=typeof t.placeholderChar||t.placeholderChar.length>1)throw new Error("InputMask: placeholderChar should be a single character or an empty string.");this.placeholderChar=t.placeholderChar,this.formatCharacters=function(t){var e=o(d);if(t)for(var n=Object.keys(t),i=0,r=n.length;i<r;i++){var l=n[i];null==t[l]?delete e[l]:e[l]=t[l]}return e}(t.formatCharacters),this.setPattern(t.pattern,{value:t.value,selection:t.selection,isRevealingMask:t.isRevealingMask})}f.prototype._parse=function(){for(var t=this.source.split(""),e=0,pattern=[],i=0,n=t.length;i<n;i++){var r=t[i];if("\\"===r){if(i===n-1)throw new Error("InputMask: pattern ends with a raw \\");r=t[++i]}else r in this.formatCharacters&&(null===this.firstEditableIndex&&(this.firstEditableIndex=e),this.lastEditableIndex=e,this._editableIndices[e]=!0);pattern.push(r),e++}if(null===this.firstEditableIndex)throw new Error('InputMask: pattern "'+this.source+'" does not contain any editable characters.');this.pattern=pattern,this.length=pattern.length},f.prototype.formatValue=function(t){for(var e=new Array(this.length),n=0,i=0,r=this.length;i<r;i++)if(this.isEditableIndex(i)){if(this.isRevealingMask&&t.length<=n&&!this.isValidAtIndex(t[n],i))break;e[i]=t.length>n&&this.isValidAtIndex(t[n],i)?this.transform(t[n],i):this.placeholderChar,n++}else e[i]=this.pattern[i],t.length>n&&t[n]===this.pattern[i]&&n++;return e},f.prototype.isEditableIndex=function(t){return!!this._editableIndices[t]},f.prototype.isValidAtIndex=function(t,e){return this.formatCharacters[this.pattern[e]].validate(t)},f.prototype.transform=function(t,e){var n=this.formatCharacters[this.pattern[e]];return"function"==typeof n.transform?n.transform(t):t},v.prototype.input=function(t){if(this.selection.start===this.selection.end&&this.selection.start===this.pattern.length)return!1;var e=o(this.selection),n=this.getValue(),r=this.selection.start;if(r<this.pattern.firstEditableIndex&&(r=this.pattern.firstEditableIndex),this.pattern.isEditableIndex(r)){if(!this.pattern.isValidAtIndex(t,r))return!1;this.value[r]=this.pattern.transform(t,r)}for(var l=this.selection.end-1;l>r;)this.pattern.isEditableIndex(l)&&(this.value[l]=this.placeholderChar),l--;for(this.selection.start=this.selection.end=r+1;this.pattern.length>this.selection.start&&!this.pattern.isEditableIndex(this.selection.start);)this.selection.start++,this.selection.end++;return null!=this._historyIndex&&(this._history.splice(this._historyIndex,this._history.length-this._historyIndex),this._historyIndex=null),("input"!==this._lastOp||e.start!==e.end||null!==this._lastSelection&&e.start!==this._lastSelection.start)&&this._history.push({value:n,selection:e,lastOp:this._lastOp}),this._lastOp="input",this._lastSelection=o(this.selection),!0},v.prototype.backspace=function(){if(0===this.selection.start&&0===this.selection.end)return!1;var t=o(this.selection),e=this.getValue();if(this.selection.start===this.selection.end)this.pattern.isEditableIndex(this.selection.start-1)&&(this.value[this.selection.start-1]=this.placeholderChar),this.selection.start--,this.selection.end--;else{for(var n=this.selection.end-1;n>=this.selection.start;)this.pattern.isEditableIndex(n)&&(this.value[n]=this.placeholderChar),n--;this.selection.end=this.selection.start}return null!=this._historyIndex&&this._history.splice(this._historyIndex,this._history.length-this._historyIndex),("backspace"!==this._lastOp||t.start!==t.end||null!==this._lastSelection&&t.start!==this._lastSelection.start)&&this._history.push({value:e,selection:t,lastOp:this._lastOp}),this._lastOp="backspace",this._lastSelection=o(this.selection),!0},v.prototype.paste=function(input){var t={value:this.value.slice(),selection:o(this.selection),_lastOp:this._lastOp,_history:this._history.slice(),_historyIndex:this._historyIndex,_lastSelection:o(this._lastSelection)};if(this.selection.start<this.pattern.firstEditableIndex){for(var i=0,e=this.pattern.firstEditableIndex-this.selection.start;i<e;i++)if(input.charAt(i)!==this.pattern.pattern[i])return!1;input=input.substring(this.pattern.firstEditableIndex-this.selection.start),this.selection.start=this.pattern.firstEditableIndex}for(i=0,e=input.length;i<e&&this.selection.start<=this.pattern.lastEditableIndex;i++){if(!this.input(input.charAt(i))){if(this.selection.start>0){var n=this.selection.start-1;if(!this.pattern.isEditableIndex(n)&&input.charAt(i)===this.pattern.pattern[n])continue}return r(this,t),!1}}return!0},v.prototype.undo=function(){if(0===this._history.length||0===this._historyIndex)return!1;var t;if(null==this._historyIndex){this._historyIndex=this._history.length-1,t=this._history[this._historyIndex];var e=this.getValue();t.value===e&&t.selection.start===this.selection.start&&t.selection.end===this.selection.end||this._history.push({value:e,selection:o(this.selection),lastOp:this._lastOp,startUndo:!0})}else t=this._history[--this._historyIndex];return this.value=t.value.split(""),this.selection=t.selection,this._lastOp=t.lastOp,!0},v.prototype.redo=function(){if(0===this._history.length||null==this._historyIndex)return!1;var t=this._history[++this._historyIndex];return this._historyIndex===this._history.length-1&&(this._historyIndex=null,t.startUndo&&this._history.pop()),this.value=t.value.split(""),this.selection=t.selection,this._lastOp=t.lastOp,!0},v.prototype.setPattern=function(pattern,t){t=r({selection:{start:0,end:0},value:""},t),this.pattern=new f(pattern,this.formatCharacters,this.placeholderChar,t.isRevealingMask),this.setValue(t.value),this.emptyValue=this.pattern.formatValue([]).join(""),this.selection=t.selection,this._resetHistory()},v.prototype.setSelection=function(t){if(this.selection=o(t),this.selection.start===this.selection.end){if(this.selection.start<this.pattern.firstEditableIndex)return this.selection.start=this.selection.end=this.pattern.firstEditableIndex,!0;for(var e=this.selection.start;e>=this.pattern.firstEditableIndex;){if(this.pattern.isEditableIndex(e-1)&&this.value[e-1]!==this.placeholderChar||e===this.pattern.firstEditableIndex){this.selection.start=this.selection.end=e;break}e--}return!0}return!1},v.prototype.setValue=function(t){null==t&&(t=""),this.value=this.pattern.formatValue(t.split(""))},v.prototype.getValue=function(){return this.value.join("")},v.prototype.getRawValue=function(){for(var t=[],i=0;i<this.value.length;i++)!0===this.pattern._editableIndices[i]&&t.push(this.value[i]);return t.join("")},v.prototype._resetHistory=function(){this._history=[],this._historyIndex=null,this._lastOp=null,this._lastSelection=o(this.selection)},v.Pattern=f,t.exports=v},744:function(t,e,n){"use strict";var r=n(741),o=n.n(r);function l(t){if(Array.isArray(t)){for(var i=0,e=Array(t.length);i<t.length;i++)e[i]=t[i];return e}return Array.from(t)}!function(){var t=window,e=t.document;function n(t){var e="focus"===t.type?"focusin":"focusout",n=new CustomEvent(e,{bubbles:!0,cancelable:!1});n.c1Generated=!0,t.target.dispatchEvent(n)}function r(t){t.c1Generated||(e.removeEventListener("focus",n,!0),e.removeEventListener("blur",n,!0),e.removeEventListener("focusin",r,!0),e.removeEventListener("focusout",r,!0)),setTimeout((function(){e.removeEventListener("focusin",r,!0),e.removeEventListener("focusout",r,!0)}))}void 0===t.onfocusin&&(e.addEventListener("focus",n,!0),e.addEventListener("blur",n,!0),e.addEventListener("focusin",r,!0),e.addEventListener("focusout",r,!0))}();e.a={name:"MaskedInput",render:function(t){return t("input",{ref:"input",attrs:{disabled:null===this.maskCore||this.disabled},domProps:{value:this.value},on:{keydown:this.keyDown,keypress:this.keyPress,keyup:this.keyUp,textInput:this.textInput,mouseup:this.mouseUp,focusout:this.focusOut,cut:this.cut,copy:this.copy,paste:this.paste}})},data:function(){return{marginLeft:0,maskCore:null,updateAfterAll:!1}},props:{value:{type:String},mask:{required:!0,validator:function(t){return!!(t&&t.length>=1||t instanceof Object)}},placeholderChar:{type:String,default:"_",validator:function(t){return!(!t||1!==t.length)}},disabled:{type:Boolean,default:!1}},watch:{mask:function(t,e){JSON.stringify(t)!==JSON.stringify(e)&&this.initMask()},value:function(t){this.maskCore&&this.maskCore.setValue(t)}},mounted:function(){this.initMask()},methods:{initMask:function(){var t=this;try{this.mask instanceof Object?this.maskCore=new o.a(this.mask):this.maskCore=new o.a({pattern:this.mask,value:"",placeholderChar:this.placeholderChar,formatCharacters:{a:{validate:function(t){return/^[A-Za-zА-Яа-я]$/.test(t)}},A:{validate:function(t){return/^[A-Za-zА-Яа-я]$/.test(t)},transform:function(t){return t.toUpperCase()}},"*":{validate:function(t){return/^[\dA-Za-zА-Яа-я]$/.test(t)}},"#":{validate:function(t){return/^[\dA-Za-zА-Яа-я]$/.test(t)},transform:function(t){return t.toUpperCase()}},"+":{validate:function(){return!0}}}}),[].concat(l(this.$refs.input.value)).reduce((function(e,n){return t.maskCore.input(n)}),null),this.maskCore.setSelection({start:0,end:0}),""===this.$refs.input.value?this.$emit("input","",""):this.updateToCoreState()}catch(t){this.maskCore=null,this.$refs.input.value="Error",this.$emit("input",this.$refs.input.value,"")}},getValue:function(){return this.maskCore?this.maskCore.getValue():""},keyDown:function(t){if(null!==this.maskCore)switch(this.setNativeSelection(),t.keyCode){case 8:t.preventDefault(),(this.maskCore.selection.start>this.marginLeft||this.maskCore.selection.start!==this.maskCore.selection.end)&&(this.maskCore.backspace(),this.updateToCoreState());break;case 37:t.preventDefault(),this.$refs.input.selectionStart===this.$refs.input.selectionEnd&&(this.$refs.input.selectionStart-=1),this.maskCore.selection={start:this.$refs.input.selectionStart,end:this.$refs.input.selectionStart},this.updateToCoreState();break;case 39:t.preventDefault(),this.$refs.input.selectionStart===this.$refs.input.selectionEnd&&(this.$refs.input.selectionEnd+=1),this.maskCore.selection={start:this.$refs.input.selectionEnd,end:this.$refs.input.selectionEnd},this.updateToCoreState();break;case 35:t.preventDefault(),this.$refs.input.selectionStart=this.$refs.input.value.length,this.$refs.input.selectionEnd=this.$refs.input.value.length,this.maskCore.selection={start:this.$refs.input.selectionEnd,end:this.$refs.input.selectionEnd},this.updateToCoreState();break;case 36:t.preventDefault(),this.$refs.input.selectionStart=0,this.$refs.input.selectionEnd=0,this.maskCore.selection={start:this.$refs.input.selectionStart,end:this.$refs.input.selectionStart},this.updateToCoreState();break;case 46:t.preventDefault(),this.$refs.input.selectionStart===this.$refs.input.selectionEnd?(this.maskCore.setValue(""),this.maskCore.setSelection({start:0,end:0}),this.$refs.input.selectionStart=this.maskCore.selection.start,this.$refs.input.selectionEnd=this.maskCore.selection.start):this.maskCore.backspace(),this.updateToCoreState()}else t.preventDefault()},keyPress:function(t){if(!t.ctrlKey){var e=!!document.documentMode,n="undefined"!=typeof InstallTrigger;(e||n)&&(t.preventDefault(),t.data=t.key,this.textInput(t))}},textInput:function(t){t.preventDefault&&t.preventDefault(),this.maskCore.input(t.data)&&(this.updateAfterAll=!0),this.updateToCoreState()},keyUp:function(t){9!==t.keyCode&&(this.updateToCoreState(),this.updateAfterAll=!1)},cut:function(t){if(t.preventDefault(),this.$refs.input.selectionStart!==this.$refs.input.selectionEnd){try{document.execCommand("copy")}catch(t){}this.maskCore.backspace(),this.updateToCoreState()}},copy:function(){},paste:function(t){var e=this;t.preventDefault();var text=t.clipboardData.getData("text");[].concat(l(text)).reduce((function(t,n){return e.maskCore.input(n)}),null),this.updateToCoreState()},updateToCoreState:function(){null!==this.maskCore&&(this.$refs.input.value!==this.maskCore.getValue()&&(this.$refs.input.value=this.maskCore.getValue(),this.$emit("input",this.$refs.input.value,this.maskCore.getRawValue())),this.$refs.input.selectionStart=this.maskCore.selection.start,this.$refs.input.selectionEnd=this.maskCore.selection.end)},isEmpty:function(){return null===this.maskCore||this.maskCore.getValue()===this.maskCore.emptyValue},focusOut:function(){this.isEmpty()&&(this.$refs.input.value="",this.maskCore.setSelection({start:0,end:0}),this.$emit("input","",""))},setNativeSelection:function(){this.maskCore.selection={start:this.$refs.input.selectionStart,end:this.$refs.input.selectionEnd}},mouseUp:function(){this.isEmpty()&&this.$refs.input.selectionStart===this.$refs.input.selectionEnd?(this.maskCore.setSelection({start:0,end:0}),this.$refs.input.selectionStart=this.maskCore.selection.start,this.$refs.input.selectionEnd=this.maskCore.selection.start,this.marginLeft=this.maskCore.selection.start,this.updateToCoreState()):this.setNativeSelection()}}}},802:function(t,e,n){"use strict";n.r(e);n(12),n(97),n(96),n(101),n(419),n(19);var r={name:"ReportsLineChart",components:{LineChart:n(732).a},props:{lineChartData:{required:!0}},data:function(){return{lineChartOptions:{maintainAspectRatio:!1,responsive:!0}}},computed:{chartDataReady:function(){return this.lineChartData&&Object.keys(this.lineChartData).length}}},o=n(88),l={name:"ExpensesAndIncomesReport",middleware:"Authorization",components:{ReportsLineChart:Object(o.a)(r,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t.chartDataReady?n("div",[n("line-chart",{attrs:{lineChartData:t.lineChartData,lineChartOptions:t.lineChartOptions}})],1):n("div",[n("b-skeleton-img",{attrs:{height:"370px"}})],1)])}),[],!1,null,"917b99b0",null).exports,MaskedInput:n(744).a},data:function(){return{statusFilters:[{id:"all",label:"ALL"},{id:"paid",label:"Paid"},{id:"pending",label:"Pending"}],status:"all",showButtonSpinner:!1,tableData:[],chartData:[],selectedYear:"".concat((new Date).getFullYear())}},methods:{loadData:function(){var t=this;this.showButtonSpinner=!0,this.chartData=[];var e="timesheet/reports/".concat(this.$route.params.report,"/get-report-data");if(this.dataParameters){var n=new URLSearchParams(this.dataParameters).toString();e+="?".concat(n)}this.$axios.get(e).then((function(e){var n=e.data;t.tableData=n.data.table_data,t.chartData=n.data.chart_data,t.showButtonSpinner=!1}))},handleStatusFilter:function(t){this.status=t,this.loadData()}},computed:{dataParameters:function(){return{year:this.selectedYear,status:this.status}}},mounted:function(){this.loadData()},watch:{}},h=Object(o.a)(l,(function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("b-card",[n("b-card-body",[n("div",{staticClass:"row mb-4"},[n("div",{staticClass:"col-md-8"},[n("b-nav",{attrs:{pills:""}},t._l(t.statusFilters,(function(e){return n("b-nav-item",{key:"status_"+e.id,attrs:{active:e.id===t.status},on:{click:function(n){return n.preventDefault(),t.handleStatusFilter(e.id)}}},[t._v("\n "+t._s(e.label)+"\n ")])})),1)],1),t._v(" "),n("div",{staticClass:"col-md-4"},[n("div",{staticClass:"row"},[n("div",{staticClass:"col-md-8"},[n("masked-input",{staticClass:"form-control",attrs:{mask:"1111",placeholder:"yyyy"},model:{value:t.selectedYear,callback:function(e){t.selectedYear=e},expression:"selectedYear"}})],1),t._v(" "),n("div",{staticClass:"col-md-4"},[n("button",{staticClass:"btn btn-success",attrs:{disabled:t.showButtonSpinner},on:{click:function(e){return e.preventDefault(),t.loadData.apply(null,arguments)}}},[t.showButtonSpinner?n("b-spinner",{attrs:{small:""}}):t._e(),t._v("\n Generate\n ")],1)])])])]),t._v(" "),n("div",{staticClass:"row"},[n("div",{staticClass:"col-md-12"},[n("div",{staticStyle:{height:"370px"}},[n("ReportsLineChart",{attrs:{lineChartData:t.chartData}})],1),t._v(" "),n("div",{staticClass:"mt-5 py-3"},[t.tableData.length?n("b-table",{staticClass:"table-bordered",attrs:{striped:"",hover:"",items:t.tableData}}):n("b-skeleton-table",{attrs:{rows:6,columns:13,"table-props":{bordered:!0,striped:!0}}})],1)])])])],1)],1)}),[],!1,null,"1ac37435",null);e.default=h.exports}}]);