2020-10-24 08:07:30 +02:00
|
|
|
(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{21:function(t,a,s){s(72),t.exports=s(74)},72:function(t,a,s){"use strict";s.r(a);var e={name:"Dashboard"},n=s(0),i=Object(n.a)(e,(function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("div",[s("top-boxes"),t._v(" "),s("div",{staticClass:"row"},[s("div",{staticClass:"col-lg-12 col-md-12 col-sm-12 col-xs-12"},[s("main-account")],1)]),t._v(" "),s("main-account-list"),t._v(" "),s("div",{staticClass:"row"},[s("div",{staticClass:"col-lg-6 col-md-6 col-sm-12 col-xs-12"},[s("main-budget")],1),t._v(" "),s("div",{staticClass:"col-lg-6 col-md-6 col-sm-12 col-xs-12"},[s("main-category")],1)]),t._v(" "),s("div",{staticClass:"row"},[s("div",{staticClass:"col-lg-8 col-md-8 col-sm-12 col-xs-12"},[s("main-debit")],1),t._v(" "),s("div",{staticClass:"col-lg-4 col-md-4 col-sm-12 col-xs-12"},[s("main-credit")],1)]),t._v(" "),s("div",{staticClass:"row"},[s("div",{staticClass:"col-lg-6 col-md-6 col-sm-12 col-xs-12"},[s("main-piggy-list")],1),t._v(" "),s("div",{staticClass:"col-lg-6 col-md-6 col-sm-12 col-xs-12"},[s("main-bills-list")],1)])],1)}),[],!1,null,null,null).exports,r={name:"TopBoxes",data:function(){return{summary:[],balances:[],billsPaid:[],billsUnpaid:[],leftToSpend:[],netWorth:[]}},mounted:function(){this.prepareComponent()},methods:{prepareComponent:function(){var t=this;axios.get("./api/v1/summary/basic?start="+window.sessionStart+"&end="+window.sessionEnd).then((function(a){t.summary=a.data,t.buildComponent()}))},buildComponent:function(){this.getBalanceEntries(),this.getBillsEntries(),this.getLeftToSpend(),this.getNetWorth()},getBalanceEntries:function(){this.balances=this.getKeyedEntries("balance-in-")},getNetWorth:function(){this.netWorth=this.getKeyedEntries("net-worth-in-")},getLeftToSpend:function(){this.leftToSpend=this.getKeyedEntries("left-to-spend-in-")},getBillsEntries:function(){this.billsPaid=this.getKeyedEntries("bills-paid-in-"),this.billsUnpaid=this.getKeyedEntries("bills-unpaid-in-")},getKeyedEntries:function(t){var a=[];for(var s in this.summary)this.summary.hasOwnProperty(s)&&t===s.substr(0,t.length)&&a.push(this.summary[s]);return a}}},c=Object(n.a)(r,(function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("div",{staticClass:"row"},[s("div",{staticClass:"col-md-3 col-sm-6 col-12"},[s("div",{staticClass:"info-box"},[t._m(0),t._v(" "),s("div",{staticClass:"info-box-content"},[s("span",{staticClass:"info-box-text"},[t._v(t._s(t.$t("firefly.balance")))]),t._v(" "),t.balances.length>0?s("span",{staticClass:"info-box-number"},[t._v(t._s(t.balances[0].value_parsed))]):t._e(),t._v(" "),t._m(1),t._v(" "),s("span",{staticClass:"progress-description"},t._l(t.balances,(function(a){return s("span",[t._v(t._s(a.sub_title)),s("br")])})),0)])])]),t._v(" "),s("div",{staticClass:"col-12 col-sm-6 col-md-3"},[s("div",{staticClass:"info-box"},[t._m(2),t._v(" "),s("div",{staticClass:"info-box-content"},[s("span",{staticClass:"info-box-text"},[s("span",[t._v(t._s(t.$t("firefly.bills_to_pay")))])]),t._v(" "),1===t.billsUnpaid.length&&t.billsPaid.length>0?s("span",{staticClass:"info-box-number"},[t._v(t._s(t.billsUnpaid[0].value_parsed))]):t._e(),t._v(" "),t._m(3),t._v(" "),s("span",{staticClass:"progress-description"},[1===t.billsUnpaid.length&&1===t.billsPaid.length?s("span",[t._v(t._s(t.$t("firefly.paid"))+": "+t._s(t.billsPaid[0].value_parsed))]):t._e(),t._v(" "),t.billsUnpaid.length>1?s("span",t._l(t.billsUnpaid,(function(a,e){return s("span",{key:a.key},[t._v("\n "+t._s(a.value_parsed)),e+1!==t.billsUnpaid.length?s("span",[t._v(", ")]):t._e()])})),0):t._e()])])])]),t._v(" "),s("div",{staticClass:"clearfix hidden-md-up"}),t._v(" "),s("div",{staticClass:"col-12 col-sm-6 col-md-3"},[s("div",{staticClass:"info-box"},[t._m(4),t._v(" "),s("div",{staticClass:"info-box-content"},[s("span",{staticClass:"info-box-text"},[s("span",[t._v(t._s(t.$t("firefly.left_to_spend")))])]),t._v(" "),t.leftToSpend.length>0?s("span",{staticClass:"info-box-number"},[t._v(t._s(t.leftToSpend[0].value_parsed))]):t._e(),t._v(" "),t._m(5),t._v(" "),s("
|