firefly-iii/public/v2/js/empty.js
2020-12-04 20:27:40 +01:00

2 lines
5.8 KiB
JavaScript

(window.webpackJsonp=window.webpackJsonp||[]).push([[5],{223:function(t,a,e){t.exports=e(232)},232:function(t,a,e){"use strict";e.r(a);e(10),e(12),e(11),e(13),e(14);var s={name:"FormatLabel",methods:{formatLabel:function(t,a){var e=[],s=(t=String(t)).split(" "),n="";return s.forEach((function(t,i){if(n.length>0){var r=n+" "+t;if(!(r.length>a))return i===s.length-1?void e.push(r):void(n=r);e.push(n),n=""}i!==s.length-1&&t.length<a?n=t:e.push(t)})),e}}},n=e(1),i=Object(n.a)(s,void 0,void 0,!1,null,null,null).exports,r={name:"DefaultBarOptions",data:function(){return{}},methods:{getDefaultOptions:function(){return{type:"bar",layout:{padding:{left:50,right:50,top:0,bottom:0}},stacked:!0,elements:{line:{cubicInterpolationMode:"monotone"}},legend:{display:!1},animation:{duration:0},responsive:!0,maintainAspectRatio:!1,scales:{xAxes:[{stacked:!0,gridLines:{display:!1},ticks:{callback:function(t,a,e){return i.methods.formatLabel(t,20)}}}],yAxes:[{stacked:!1,display:!0,drawOnChartArea:!1,offset:!0,beginAtZero:!0,ticks:{callback:function(t){var a=this.chart.data.datasets[0]?this.chart.data.datasets[0].currency_code:"EUR";return new Intl.NumberFormat(localStorage.locale,{style:"currency",currency:a}).format(t)}}}]},tooltips:{mode:"label",callbacks:{label:function(t,a){var e=a.datasets[t.datasetIndex]?a.datasets[t.datasetIndex].currency_code:"EUR",s=new Intl.NumberFormat(localStorage.locale,{style:"currency",currency:e}).format(t.yLabel);return a.datasets[t.datasetIndex].label+": "+s}}}}}}},o=Object(n.a)(r,(function(){var t=this.$createElement;return(this._self._c||t)("div")}),[],!1,null,"ea55dbb6",null).exports,c=e(3),l={name:"MainBudget",created:function(){axios.get("./api/v1/chart/budget/overview?start="+window.sessionStart+"&end="+window.sessionEnd).then((function(t){var a=c.a.methods.convertChart(t.data),e=$("#mainBudgetChart").get(0).getContext("2d");new Chart(e,{type:"bar",data:a,options:o.methods.getDefaultOptions()})}))}},d=(Object(n.a)(l,(function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"card"},[e("div",{staticClass:"card-header"},[e("h3",{staticClass:"card-title"},[t._v(t._s(t.$t("firefly.budgets")))])]),t._v(" "),t._m(0),t._v(" "),e("div",{staticClass:"card-footer"},[e("a",{staticClass:"btn btn-default button-sm",attrs:{href:"./budgets"}},[e("i",{staticClass:"far fa-money-bill-alt"}),t._v(" "+t._s(t.$t("firefly.go_to_budgets")))])])])}),[function(){var t=this.$createElement,a=this._self._c||t;return a("div",{staticClass:"card-body"},[a("div",{staticStyle:{position:"relative"}},[a("canvas",{staticStyle:{"min-height":"400px",height:"400px","max-height":"400px","max-width":"100%"},attrs:{id:"mainBudgetChart"}})])])}],!1,null,"0cdbd746",null).exports,{name:"MainCategory",created:function(){axios.get("./api/v1/chart/category/overview?start="+window.sessionStart+"&end="+window.sessionEnd).then((function(t){var a=c.a.methods.convertChart(t.data);a=c.a.methods.colorizeLineData(a);var e=$("#mainCategoryChart").get(0).getContext("2d");new Chart(e,{type:"bar",data:a,options:o.methods.getDefaultOptions()})}))}}),u=(Object(n.a)(d,(function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"card"},[e("div",{staticClass:"card-header"},[e("h3",{staticClass:"card-title"},[t._v(t._s(t.$t("firefly.categories")))])]),t._v(" "),t._m(0),t._v(" "),e("div",{staticClass:"card-footer"},[e("a",{staticClass:"btn btn-default button-sm",attrs:{href:"./categories"}},[e("i",{staticClass:"far fa-money-bill-alt"}),t._v(" "+t._s(t.$t("firefly.go_to_categories")))])])])}),[function(){var t=this.$createElement,a=this._self._c||t;return a("div",{staticClass:"card-body"},[a("div",[a("canvas",{staticStyle:{"min-height":"400px",height:"400px","max-height":"400px","max-width":"100%"},attrs:{id:"mainCategoryChart"}})])])}],!1,null,"723499a4",null).exports,{name:"MainCredit",components:{},data:function(){return{transactions:[]}},created:function(){var t=this;axios.get("./api/v1/transactions?type=deposit&limit=10&start="+window.sessionStart+"&end="+window.sessionEnd).then((function(a){t.transactions=a.data.data}))},methods:{},computed:{}}),h=(Object(n.a)(u,(function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"card"},[e("div",{staticClass:"card-header"},[e("h3",{staticClass:"card-title"},[t._v(t._s(t.$t("firefly.income")))])]),t._v(" "),e("div",{staticClass:"card-body table-responsive p-0"},[e("transaction-list-small",{attrs:{transactions:this.transactions}})],1),t._v(" "),e("div",{staticClass:"card-footer"},[e("a",{staticClass:"btn btn-default button-sm",attrs:{href:"./accounts/revenue"}},[e("i",{staticClass:"far fa-money-bill-alt"}),t._v(" "+t._s(t.$t("firefly.go_to_deposits")))])])])}),[],!1,null,null,null).exports,{name:"MainDebit",created:function(){axios.get("./api/v1/chart/account/expense?start="+window.sessionStart+"&end="+window.sessionEnd).then((function(t){var a=c.a.methods.convertChart(t.data);a=c.a.methods.colorizeLineData(a);var e=$("#mainDebitChart").get(0).getContext("2d");new Chart(e,{type:"bar",data:a,options:o.methods.getDefaultOptions()})}))}});Object(n.a)(h,(function(){var t=this,a=t.$createElement,e=t._self._c||a;return e("div",{staticClass:"card"},[e("div",{staticClass:"card-header"},[e("h3",{staticClass:"card-title"},[t._v(t._s(t.$t("firefly.expense_accounts")))])]),t._v(" "),t._m(0),t._v(" "),e("div",{staticClass:"card-footer"},[e("a",{staticClass:"btn btn-default button-sm",attrs:{href:"./transactions/withdrawals"}},[e("i",{staticClass:"far fa-money-bill-alt"}),t._v(" "+t._s(t.$t("firefly.go_to_expenses")))])])])}),[function(){var t=this.$createElement,a=this._self._c||t;return a("div",{staticClass:"card-body"},[a("div",[a("canvas",{staticStyle:{"min-height":"400px",height:"400px","max-height":"400px","max-width":"100%"},attrs:{id:"mainDebitChart"}})])])}],!1,null,"8eadd534",null).exports,e(15),e(16),e(17),e(18);e(5)}},[[223,0,1]]]);
//# sourceMappingURL=empty.js.map