Files
firefly-iii/public/v2/js/dashboard.js

2 lines
28 KiB
JavaScript
Vendored

(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{157:function(t,a,s){s(209),t.exports=s(212)},159:function(t,a,s){var e={"./af":10,"./af.js":10,"./ar":11,"./ar-dz":12,"./ar-dz.js":12,"./ar-kw":13,"./ar-kw.js":13,"./ar-ly":14,"./ar-ly.js":14,"./ar-ma":15,"./ar-ma.js":15,"./ar-sa":16,"./ar-sa.js":16,"./ar-tn":17,"./ar-tn.js":17,"./ar.js":11,"./az":18,"./az.js":18,"./be":19,"./be.js":19,"./bg":20,"./bg.js":20,"./bm":21,"./bm.js":21,"./bn":22,"./bn.js":22,"./bo":23,"./bo.js":23,"./br":24,"./br.js":24,"./bs":25,"./bs.js":25,"./ca":26,"./ca.js":26,"./cs":27,"./cs.js":27,"./cv":28,"./cv.js":28,"./cy":29,"./cy.js":29,"./da":30,"./da.js":30,"./de":31,"./de-at":32,"./de-at.js":32,"./de-ch":33,"./de-ch.js":33,"./de.js":31,"./dv":34,"./dv.js":34,"./el":35,"./el.js":35,"./en-au":36,"./en-au.js":36,"./en-ca":37,"./en-ca.js":37,"./en-gb":38,"./en-gb.js":38,"./en-ie":39,"./en-ie.js":39,"./en-il":40,"./en-il.js":40,"./en-in":41,"./en-in.js":41,"./en-nz":42,"./en-nz.js":42,"./en-sg":43,"./en-sg.js":43,"./eo":44,"./eo.js":44,"./es":45,"./es-do":46,"./es-do.js":46,"./es-us":47,"./es-us.js":47,"./es.js":45,"./et":48,"./et.js":48,"./eu":49,"./eu.js":49,"./fa":50,"./fa.js":50,"./fi":51,"./fi.js":51,"./fil":52,"./fil.js":52,"./fo":53,"./fo.js":53,"./fr":54,"./fr-ca":55,"./fr-ca.js":55,"./fr-ch":56,"./fr-ch.js":56,"./fr.js":54,"./fy":57,"./fy.js":57,"./ga":58,"./ga.js":58,"./gd":59,"./gd.js":59,"./gl":60,"./gl.js":60,"./gom-deva":61,"./gom-deva.js":61,"./gom-latn":62,"./gom-latn.js":62,"./gu":63,"./gu.js":63,"./he":64,"./he.js":64,"./hi":65,"./hi.js":65,"./hr":66,"./hr.js":66,"./hu":67,"./hu.js":67,"./hy-am":68,"./hy-am.js":68,"./id":69,"./id.js":69,"./is":70,"./is.js":70,"./it":71,"./it-ch":72,"./it-ch.js":72,"./it.js":71,"./ja":73,"./ja.js":73,"./jv":74,"./jv.js":74,"./ka":75,"./ka.js":75,"./kk":76,"./kk.js":76,"./km":77,"./km.js":77,"./kn":78,"./kn.js":78,"./ko":79,"./ko.js":79,"./ku":80,"./ku.js":80,"./ky":81,"./ky.js":81,"./lb":82,"./lb.js":82,"./lo":83,"./lo.js":83,"./lt":84,"./lt.js":84,"./lv":85,"./lv.js":85,"./me":86,"./me.js":86,"./mi":87,"./mi.js":87,"./mk":88,"./mk.js":88,"./ml":89,"./ml.js":89,"./mn":90,"./mn.js":90,"./mr":91,"./mr.js":91,"./ms":92,"./ms-my":93,"./ms-my.js":93,"./ms.js":92,"./mt":94,"./mt.js":94,"./my":95,"./my.js":95,"./nb":96,"./nb.js":96,"./ne":97,"./ne.js":97,"./nl":98,"./nl-be":99,"./nl-be.js":99,"./nl.js":98,"./nn":100,"./nn.js":100,"./oc-lnc":101,"./oc-lnc.js":101,"./pa-in":102,"./pa-in.js":102,"./pl":103,"./pl.js":103,"./pt":104,"./pt-br":105,"./pt-br.js":105,"./pt.js":104,"./ro":106,"./ro.js":106,"./ru":107,"./ru.js":107,"./sd":108,"./sd.js":108,"./se":109,"./se.js":109,"./si":110,"./si.js":110,"./sk":111,"./sk.js":111,"./sl":112,"./sl.js":112,"./sq":113,"./sq.js":113,"./sr":114,"./sr-cyrl":115,"./sr-cyrl.js":115,"./sr.js":114,"./ss":116,"./ss.js":116,"./sv":117,"./sv.js":117,"./sw":118,"./sw.js":118,"./ta":119,"./ta.js":119,"./te":120,"./te.js":120,"./tet":121,"./tet.js":121,"./tg":122,"./tg.js":122,"./th":123,"./th.js":123,"./tk":124,"./tk.js":124,"./tl-ph":125,"./tl-ph.js":125,"./tlh":126,"./tlh.js":126,"./tr":127,"./tr.js":127,"./tzl":128,"./tzl.js":128,"./tzm":129,"./tzm-latn":130,"./tzm-latn.js":130,"./tzm.js":129,"./ug-cn":131,"./ug-cn.js":131,"./uk":132,"./uk.js":132,"./ur":133,"./ur.js":133,"./uz":134,"./uz-latn":135,"./uz-latn.js":135,"./uz.js":134,"./vi":136,"./vi.js":136,"./x-pseudo":137,"./x-pseudo.js":137,"./yo":138,"./yo.js":138,"./zh-cn":139,"./zh-cn.js":139,"./zh-hk":140,"./zh-hk.js":140,"./zh-mo":141,"./zh-mo.js":141,"./zh-tw":142,"./zh-tw.js":142};function n(t){var a=r(t);return s(a)}function r(t){if(!s.o(e,t)){var a=new Error("Cannot find module '"+t+"'");throw a.code="MODULE_NOT_FOUND",a}return e[t]}n.keys=function(){return Object.keys(e)},n.resolve=r,t.exports=n,n.id=159},209:function(t,a,s){"use strict";s.r(a);var e=s(6),n=s(8),r={name:"DataConverter",data:function(){return{dataSet:null,newDataSet:null}},methods:{convertChart:function(t){return this.dataSet=t,this.newDataSet={count:0,labels:[],datasets:[]},this.getLabels(),this.getDataSets(),this.newDataSet.count=this.newDataSet.datasets.length,this.newDataSet},colorizeBarData:function(t){this.dataSet=t,this.newDataSet={count:0,labels:[],datasets:[]};for(var a=[[53,124,165],[0,141,76],[219,139,11],[202,25,90],[85,82,153],[66,133,244],[219,68,55],[244,180,0],[15,157,88],[171,71,188],[0,172,193],[255,112,67],[158,157,36],[92,107,192],[240,98,146],[0,121,107],[194,24,91]],s=[],e=0;e<a.length;e++)s.push("rgba("+a[e][0]+", "+a[e][1]+", "+a[e][2]+", 0.5)");for(var n in this.newDataSet.labels=this.dataSet.labels,this.newDataSet.count=this.dataSet.count,this.dataSet.datasets)if(this.dataSet.datasets.hasOwnProperty(n)){var r=this.dataSet.datasets[n];r.fill=!1,r.backgroundColor=r.borderColor=s[n],this.newDataSet.datasets.push(r)}return this.newDataSet},colorizeLineData:function(t){this.dataSet=t,this.newDataSet={count:0,labels:[],datasets:[]};for(var a=[[53,124,165],[0,141,76],[219,139,11],[202,25,90],[85,82,153],[66,133,244],[219,68,55],[244,180,0],[15,157,88],[171,71,188],[0,172,193],[255,112,67],[158,157,36],[92,107,192],[240,98,146],[0,121,107],[194,24,91]],s=[],e=0;e<a.length;e++)s.push("rgba("+a[e][0]+", "+a[e][1]+", "+a[e][2]+", 0.5)");for(var n in this.newDataSet.labels=this.dataSet.labels,this.newDataSet.count=this.dataSet.count,this.dataSet.datasets)if(this.dataSet.datasets.hasOwnProperty(n)){var r=this.dataSet.datasets[n];r.fill=!1,r.backgroundColor=r.borderColor=s[n],this.newDataSet.datasets.push(r)}return this.newDataSet},convertLabelsToDate:function(t){for(var a in t.labels)if(t.labels.hasOwnProperty(a)){var s=Date.parse(t.labels[a]);t.labels[a]=new Intl.DateTimeFormat(window.localeValue).format(s)}return t},getLabels:function(){var t=this.dataSet[0];if(void 0!==t)for(var a in t.entries)t.entries.hasOwnProperty(a)&&this.newDataSet.labels.push(a)},getDataSets:function(){for(var t in this.dataSet)if(this.dataSet.hasOwnProperty(t)){var a={},s=this.dataSet[t];if(void 0!==s){for(var e in a.label=s.label,a.type=s.type,a.currency_symbol=s.currency_symbol,a.currency_code=s.currency_code,a.yAxisID=s.yAxisID,a.data=[],s.entries)s.entries.hasOwnProperty(e)&&a.data.push(s.entries[e]);this.newDataSet.datasets.push(a)}}}}},i=s(1),c=Object(i.a)(r,void 0,void 0,!1,null,null,null).exports,o={name:"DefaultLineOptions",data:function(){return{}},methods:{formatLabel:function(t,a){var s=[],e=(t=String(t)).split(" "),n="";return e.forEach((function(t,r){if(n.length>0){var i=n+" "+t;if(!(i.length>a))return r===e.length-1?void s.push(i):void(n=i);s.push(n),n=""}r!==e.length-1&&t.length<a?n=t:s.push(t)})),s},getDefaultOptions:function(){return{legend:{display:!1},animation:{duration:0},responsive:!0,maintainAspectRatio:!1,elements:{line:{cubicInterpolationMode:"monotone"}},scales:{xAxes:[{gridLines:{display:!1},ticks:{callback:function(t,a,s){return t}}}],yAxes:[{display:!0,ticks:{callback:function(t){var a=this.chart.data.datasets[0].currency_code?this.chart.data.datasets[0].currency_code:"EUR";return new Intl.NumberFormat(window.localeValue,{style:"currency",currency:a}).format(t)},beginAtZero:!0}}]},tooltips:{mode:"label",callbacks:{label:function(t,a){var s=a.datasets[t.datasetIndex].currency_code?a.datasets[t.datasetIndex].currency_code:"EUR",e=new Intl.NumberFormat(window.localeValue,{style:"currency",currency:s}).format(t.yLabel);return a.datasets[t.datasetIndex].label+": "+e}}}}}}},l=Object(i.a)(o,(function(){var t=this.$createElement;return(this._self._c||t)("div")}),[],!1,null,"11bcfc89",null).exports,u={name:"MainAccount",mounted:function(){axios.get("./api/v1/chart/account/overview?start="+window.sessionStart+"&end="+window.sessionEnd).then((function(t){var a=c.methods.convertChart(t.data);a=c.methods.colorizeLineData(a);var s=$("#mainAccountsChart").get(0).getContext("2d");new Chart(s,{type:"line",data:a,options:l.methods.getDefaultOptions()})}))}},d=Object(i.a)(u,(function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("div",{staticClass:"card"},[s("div",{staticClass:"card-header"},[s("h3",{staticClass:"card-title"},[t._v(t._s(t.$t("firefly.yourAccounts")))])]),t._v(" "),t._m(0),t._v(" "),s("div",{staticClass:"card-footer"},[s("a",{staticClass:"btn btn-default button-sm",attrs:{href:"./accounts/asset"}},[s("i",{staticClass:"far fa-money-bill-alt"}),t._v(" "+t._s(t.$t("firefly.go_to_asset_accounts")))])])])}),[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:"mainAccountsChart"}})])])}],!1,null,null,null).exports,_={name:"MainAccountList",data:function(){return{accounts:[]}},mounted:function(){var t=this;axios.get("./api/v1/preferences/frontpageAccounts").then((function(a){t.loadAccounts(a)}))},methods:{loadAccounts:function(t){var a=t.data.data.attributes.data;for(var s in a)a.hasOwnProperty(s)&&/^0$|^[1-9]\d*$/.test(s)&&s<=4294967294&&(this.accounts.push({id:a[s],title:"",uri:"",transactions:[]}),this.loadSingleAccount(s,a[s]))},loadSingleAccount:function(t,a){var s=this;axios.get("./api/v1/accounts/"+a).then((function(e){s.accounts[t].title=e.data.data.attributes.name,s.accounts[t].uri="./accounts/show/"+e.data.data.id,s.loadTransactions(t,a)}))},loadTransactions:function(t,a){var s=this;axios.get("./api/v1/accounts/"+a+"/transactions?page=1&limit=10").then((function(a){s.accounts[t].transactions=a.data.data}))}}},h=Object(i.a)(_,(function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("div",{staticClass:"row"},t._l(t.accounts,(function(a){return s("div",{class:{"col-lg-12":1===t.accounts.length,"col-lg-6":2===t.accounts.length,"col-lg-4":t.accounts.length>2}},[s("div",{staticClass:"card"},[s("div",{staticClass:"card-header"},[s("h3",{staticClass:"card-title"},[s("a",{attrs:{href:a.uri}},[t._v(t._s(a.title))])])]),t._v(" "),s("div",{staticClass:"card-body table-responsive p-0"},[1===t.accounts.length?s("transaction-list-large",{attrs:{transactions:a.transactions,account_id:a.id}}):t._e(),t._v(" "),2===t.accounts.length?s("transaction-list-medium",{attrs:{transactions:a.transactions,account_id:a.id}}):t._e(),t._v(" "),t.accounts.length>2?s("transaction-list-small",{attrs:{transactions:a.transactions,account_id:a.id}}):t._e()],1)])])})),0)}),[],!1,null,"40cb1578",null).exports,f={name:"MainBillsList",mounted:function(){var t=this;axios.get("./api/v1/bills?start="+window.sessionStart+"&end="+window.sessionEnd).then((function(a){t.loadBills(a.data.data)}))},components:{},methods:{loadBills:function(t){for(var a in t)if(t.hasOwnProperty(a)&&/^0$|^[1-9]\d*$/.test(a)&&a<=4294967294){var s=t[a],e=s.attributes.active;s.attributes.pay_dates.length>0&&e&&this.bills.push(s)}}},data:function(){return{bills:[]}},computed:{}},v=Object(i.a)(f,(function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("div",{staticClass:"card"},[s("div",{staticClass:"card-header"},[s("h3",{staticClass:"card-title"},[t._v(t._s(t.$t("firefly.bills")))])]),t._v(" "),s("div",{staticClass:"card-body table-responsive p-0"},[s("table",{staticClass:"table table-striped"},[s("thead",[s("tr",[s("th",{staticStyle:{width:"35%"}},[t._v(t._s(t.$t("list.name")))]),t._v(" "),s("th",{staticStyle:{width:"40%"}},[t._v(t._s(t.$t("list.amount")))]),t._v(" "),s("th",{staticStyle:{width:"25%"}},[t._v(t._s(t.$t("list.next_expected_match")))])])]),t._v(" "),s("tbody",t._l(this.bills,(function(a){return s("tr",[s("td",[s("a",{attrs:{href:"./bills/show"+a.id,title:a.attributes.name}},[t._v(t._s(a.attributes.name))])]),t._v(" "),s("td",[t._v("~"+t._s(Intl.NumberFormat("en-US",{style:"currency",currency:a.attributes.currency_code}).format((a.attributes.amount_min+a.attributes.amount_max)/2))+"\n ")]),t._v(" "),s("td",t._l(a.attributes.pay_dates,(function(a){return s("span",[t._v("\n "+t._s(a)),s("br")])})),0)])})),0)])]),t._v(" "),s("div",{staticClass:"card-footer"},[s("a",{staticClass:"btn btn-default button-sm",attrs:{href:"./bills"}},[s("i",{staticClass:"far fa-money-bill-alt"}),t._v(" "+t._s(t.$t("firefly.go_to_bills")))])])])}),[],!1,null,null,null).exports,m={name:"FormatLabel",methods:{formatLabel:function(t,a){var s=[],e=(t=String(t)).split(" "),n="";return e.forEach((function(t,r){if(n.length>0){var i=n+" "+t;if(!(i.length>a))return r===e.length-1?void s.push(i):void(n=i);s.push(n),n=""}r!==e.length-1&&t.length<a?n=t:s.push(t)})),s}}},b=Object(i.a)(m,void 0,void 0,!1,null,null,null).exports,p={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,s){return b.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].currency_code?this.chart.data.datasets[0].currency_code:"EUR";return new Intl.NumberFormat(window.localeValue,{style:"currency",currency:a}).format(t)}}}]},tooltips:{mode:"label",callbacks:{label:function(t,a){var s=a.datasets[t.datasetIndex].currency_code?a.datasets[t.datasetIndex].currency_code:"EUR",e=new Intl.NumberFormat(window.localeValue,{style:"currency",currency:s}).format(t.yLabel);return a.datasets[t.datasetIndex].label+": "+e}}}}}}},y=Object(i.a)(p,(function(){var t=this.$createElement;return(this._self._c||t)("div")}),[],!1,null,"2363603b",null).exports,g={name:"MainBudget",mounted:function(){axios.get("./api/v1/chart/budget/overview?start="+window.sessionStart+"&end="+window.sessionEnd).then((function(t){var a=c.methods.convertChart(t.data),s=$("#mainBudgetChart").get(0).getContext("2d");new Chart(s,{type:"bar",data:a,options:y.methods.getDefaultOptions()})}))}},j=Object(i.a)(g,(function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("div",{staticClass:"card"},[s("div",{staticClass:"card-header"},[s("h3",{staticClass:"card-title"},[t._v(t._s(t.$t("firefly.budgets")))])]),t._v(" "),t._m(0),t._v(" "),s("div",{staticClass:"card-footer"},[s("a",{staticClass:"btn btn-default button-sm",attrs:{href:"./budgets"}},[s("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,"1092ec16",null).exports,w={name:"MainCategory",mounted:function(){axios.get("./api/v1/chart/category/overview?start="+window.sessionStart+"&end="+window.sessionEnd).then((function(t){var a=c.methods.convertChart(t.data);a=c.methods.colorizeLineData(a);var s=$("#mainCategoryChart").get(0).getContext("2d");new Chart(s,{type:"bar",data:a,options:y.methods.getDefaultOptions()})}))}},C=Object(i.a)(w,(function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("div",{staticClass:"card"},[s("div",{staticClass:"card-header"},[s("h3",{staticClass:"card-title"},[t._v(t._s(t.$t("firefly.categories")))])]),t._v(" "),t._m(0),t._v(" "),s("div",{staticClass:"card-footer"},[s("a",{staticClass:"btn btn-default button-sm",attrs:{href:"./categories"}},[s("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,"0f053244",null).exports,x={name:"MainCredit",components:{},data:function(){return{transactions:[]}},mounted: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:{}},S=Object(i.a)(x,(function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("div",{staticClass:"card"},[s("div",{staticClass:"card-header"},[s("h3",{staticClass:"card-title"},[t._v(t._s(t.$t("firefly.income")))])]),t._v(" "),s("div",{staticClass:"card-body table-responsive p-0"},[s("transaction-list-small",{attrs:{transactions:this.transactions}})],1),t._v(" "),s("div",{staticClass:"card-footer"},[s("a",{staticClass:"btn btn-default button-sm",attrs:{href:"./accounts/revenue"}},[s("i",{staticClass:"far fa-money-bill-alt"}),t._v(" "+t._s(t.$t("firefly.go_to_deposits")))])])])}),[],!1,null,null,null).exports,k={name:"MainDebit",mounted:function(){axios.get("./api/v1/chart/account/expense?start="+window.sessionStart+"&end="+window.sessionEnd).then((function(t){var a=c.methods.convertChart(t.data);a=c.methods.colorizeLineData(a);var s=$("#mainDebitChart").get(0).getContext("2d");new Chart(s,{type:"bar",data:a,options:y.methods.getDefaultOptions()})}))}},D=Object(i.a)(k,(function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("div",{staticClass:"card"},[s("div",{staticClass:"card-header"},[s("h3",{staticClass:"card-title"},[t._v(t._s(t.$t("firefly.expense_accounts")))])]),t._v(" "),t._m(0),t._v(" "),s("div",{staticClass:"card-footer"},[s("a",{staticClass:"btn btn-default button-sm",attrs:{href:"./transactions/withdrawals"}},[s("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,"19053b36",null).exports,O={name:"MainPiggyList",mounted:function(){var t=this;axios.get("./api/v1/piggy_banks").then((function(a){t.loadPiggyBanks(a.data.data)}))},methods:{loadPiggyBanks:function(t){for(var a in t)if(t.hasOwnProperty(a)&&/^0$|^[1-9]\d*$/.test(a)&&a<=4294967294){var s=t[a];0!==parseFloat(s.attributes.left_to_save)&&(s.attributes.pct=parseFloat(s.attributes.current_amount)/parseFloat(s.attributes.target_amount)*100,this.piggy_banks.push(s))}this.piggy_banks.sort((function(t,a){return a.attributes.pct-t.attributes.pct}))}},data:function(){return{piggy_banks:[]}}},E=Object(i.a)(O,(function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("div",{staticClass:"card"},[s("div",{staticClass:"card-header"},[s("h3",{staticClass:"card-title"},[t._v(t._s(t.$t("firefly.piggy_banks")))])]),t._v(" "),s("div",{staticClass:"card-body table-responsive p-0"},[s("table",{staticClass:"table table-striped"},[s("thead",[s("tr",[s("th",{staticStyle:{width:"35%"}},[t._v(t._s(t.$t("list.piggy_bank")))]),t._v(" "),s("th",{staticStyle:{width:"40%"}},[t._v(t._s(t.$t("list.percentage")))]),t._v(" "),s("th",{staticStyle:{width:"25%","text-align":"right"}},[t._v(t._s(t.$t("list.amount")))])])]),t._v(" "),s("tbody",t._l(this.piggy_banks,(function(a){return s("tr",[s("td",[t._v(t._s(a.attributes.name)+"\n "),s("br"),s("small",{staticClass:"text-muted"},[t._v(t._s(a.attributes.object_group_title))])]),t._v(" "),s("td",[s("div",{staticClass:"progress-group"},[s("div",{staticClass:"progress progress-sm"},[a.attributes.pct<100?s("div",{staticClass:"progress-bar primary",style:{width:a.attributes.pct+"%"}}):t._e(),t._v(" "),100===a.attributes.pct?s("div",{staticClass:"progress-bar bg-success",style:{width:a.attributes.pct+"%"}}):t._e()])])]),t._v(" "),s("td",{staticStyle:{"text-align":"right"}},[s("span",{staticClass:"text-success"},[t._v("\n "+t._s(Intl.NumberFormat("en-US",{style:"currency",currency:a.attributes.currency_code}).format(a.attributes.current_amount))+"\n ")]),t._v("\n of\n "),s("span",{staticClass:"text-success"},[t._v(t._s(Intl.NumberFormat("en-US",{style:"currency",currency:a.attributes.currency_code}).format(a.attributes.target_amount)))])])])})),0)])]),t._v(" "),s("div",{staticClass:"card-footer"},[s("a",{staticClass:"btn btn-default button-sm",attrs:{href:"./piggy-banks"}},[s("i",{staticClass:"far fa-money-bill-alt"}),t._v(" "+t._s(t.$t("firefly.go_to_piggies")))])])])}),[],!1,null,"6e5bffbd",null).exports,I={name:"TransactionListLarge",props:{transactions:{type:Array,default:function(){return[]}},account_id:{type:Number,default:function(){return 0}}}},z=Object(i.a)(I,(function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("table",{staticClass:"table table-striped table-sm"},[s("caption",{staticStyle:{display:"none"}},[t._v(t._s(t.$t("firefly.transaction_table_description")))]),t._v(" "),s("thead",[s("tr",[s("th",{staticClass:"text-left"},[t._v(t._s(t.$t("firefly.description")))]),t._v(" "),s("th",[t._v(t._s(t.$t("firefly.opposing_account")))]),t._v(" "),s("th",{staticClass:"text-right"},[t._v(t._s(t.$t("firefly.amount")))]),t._v(" "),s("th",[t._v(t._s(t.$t("firefly.category")))]),t._v(" "),s("th",[t._v(t._s(t.$t("firefly.budget")))])])]),t._v(" "),s("tbody",t._l(this.transactions,(function(a){return s("tr",[s("td",[s("a",{attrs:{href:"transactions/show/"+a.id,title:a.date}},[a.attributes.transactions.length>1?s("span",[t._v(t._s(a.attributes.group_title))]):t._e(),t._v(" "),1===a.attributes.transactions.length?s("span",[t._v(t._s(a.attributes.transactions[0].description))]):t._e()])]),t._v(" "),s("td",t._l(a.attributes.transactions,(function(e){return s("span",["withdrawal"===e.type?s("a",{attrs:{href:"accounts/show/"+a.destination_id}},[t._v(t._s(e.destination_name))]):t._e(),t._v(" "),"deposit"===e.type?s("a",{attrs:{href:"accounts/show/"+a.source_id}},[t._v(t._s(e.source_name))]):t._e(),t._v(" "),"transfer"===e.type&&e.source_id===t.account_id?s("a",{attrs:{href:"accounts/show/"+a.destination_id}},[t._v(t._s(e.destination_name))]):t._e(),t._v(" "),"transfer"===e.type&&e.destination_id===t.account_id?s("a",{attrs:{href:"accounts/show/"+a.source_id}},[t._v(t._s(e.source_name))]):t._e(),t._v(" "),s("br")])})),0),t._v(" "),s("td",{staticStyle:{"text-align":"right"}},t._l(a.attributes.transactions,(function(a){return s("span",["withdrawal"===a.type?s("span",{staticClass:"text-danger"},[t._v("\n "+t._s(Intl.NumberFormat("en-US",{style:"currency",currency:a.currency_code}).format(-1*a.amount))),s("br")]):t._e(),t._v(" "),"deposit"===a.type?s("span",{staticClass:"text-success"},[t._v("\n "+t._s(Intl.NumberFormat("en-US",{style:"currency",currency:a.currency_code}).format(a.amount))),s("br")]):t._e(),t._v(" "),"transfer"===a.type&&a.source_id===t.account_id?s("span",{staticClass:"text-info"},[t._v("\n "+t._s(Intl.NumberFormat("en-US",{style:"currency",currency:a.currency_code}).format(-1*a.amount))),s("br")]):t._e(),t._v(" "),"transfer"===a.type&&a.destination_id===t.account_id?s("span",{staticClass:"text-info"},[t._v("\n "+t._s(Intl.NumberFormat("en-US",{style:"currency",currency:a.currency_code}).format(a.amount))),s("br")]):t._e()])})),0),t._v(" "),s("td",t._l(a.attributes.transactions,(function(e){return s("span",[0!==e.category_id?s("a",{attrs:{href:"categories/show/"+a.category_id}},[t._v(t._s(e.category_name))]):t._e(),s("br")])})),0),t._v(" "),s("td",t._l(a.attributes.transactions,(function(e){return s("span",[0!==e.budget_id?s("a",{attrs:{href:"budgets/show/"+a.budget_id}},[t._v(t._s(e.budget_name))]):t._e(),s("br")])})),0)])})),0)])}),[],!1,null,"20d3370e",null).exports,F={name:"TransactionListMedium",props:{transactions:{type:Array,default:function(){return[]}},account_id:{type:Number,default:function(){return 0}}}},A=Object(i.a)(F,(function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("table",{staticClass:"table table-striped table-sm"},[s("caption",{staticStyle:{display:"none"}},[t._v(t._s(t.$t("firefly.transaction_table_description")))]),t._v(" "),s("thead",[s("tr",[s("th",{staticClass:"text-left"},[t._v(t._s(t.$t("firefly.description")))]),t._v(" "),s("th",[t._v(t._s(t.$t("firefly.opposing_account")))]),t._v(" "),s("th",{staticClass:"text-right"},[t._v(t._s(t.$t("firefly.amount")))])])]),t._v(" "),s("tbody",t._l(this.transactions,(function(a){return s("tr",[s("td",[s("a",{attrs:{href:"transactions/show/"+a.id,title:a.date}},[a.attributes.transactions.length>1?s("span",[t._v(t._s(a.attributes.group_title))]):t._e(),t._v(" "),1===a.attributes.transactions.length?s("span",[t._v(t._s(a.attributes.transactions[0].description))]):t._e()])]),t._v(" "),s("td",t._l(a.attributes.transactions,(function(e){return s("span",["withdrawal"===e.type?s("a",{attrs:{href:"accounts/show/"+a.destination_id}},[t._v(t._s(e.destination_name))]):t._e(),t._v(" "),"deposit"===e.type?s("a",{attrs:{href:"accounts/show/"+a.source_id}},[t._v(t._s(e.source_name))]):t._e(),t._v(" "),"transfer"===e.type&&e.source_id===t.account_id?s("a",{attrs:{href:"accounts/show/"+a.destination_id}},[t._v(t._s(e.destination_name))]):t._e(),t._v(" "),"transfer"===e.type&&e.destination_id===t.account_id?s("a",{attrs:{href:"accounts/show/"+a.source_id}},[t._v(t._s(e.source_name))]):t._e(),t._v(" "),s("br")])})),0),t._v(" "),s("td",{staticStyle:{"text-align":"right"}},t._l(a.attributes.transactions,(function(a){return s("span",["withdrawal"===a.type?s("span",{staticClass:"text-danger"},[t._v("\n "+t._s(Intl.NumberFormat("en-US",{style:"currency",currency:a.currency_code}).format(-1*a.amount))),s("br")]):t._e(),t._v(" "),"deposit"===a.type?s("span",{staticClass:"text-success"},[t._v("\n "+t._s(Intl.NumberFormat("en-US",{style:"currency",currency:a.currency_code}).format(a.amount))),s("br")]):t._e(),t._v(" "),"transfer"===a.type&&a.source_id===t.account_id?s("span",{staticClass:"text-info"},[t._v("\n "+t._s(Intl.NumberFormat("en-US",{style:"currency",currency:a.currency_code}).format(-1*a.amount))),s("br")]):t._e(),t._v(" "),"transfer"===a.type&&a.destination_id===t.account_id?s("span",{staticClass:"text-info"},[t._v("\n "+t._s(Intl.NumberFormat("en-US",{style:"currency",currency:a.currency_code}).format(a.amount))),s("br")]):t._e()])})),0)])})),0)])}),[],!1,null,"1b024698",null).exports,L={name:"TransactionListSmall",props:{transactions:{type:Array,default:function(){return[]}},account_id:{type:Number,default:function(){return 0}}}},N=Object(i.a)(L,(function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("table",{staticClass:"table table-striped table-sm"},[s("caption",{staticStyle:{display:"none"}},[t._v(t._s(t.$t("firefly.transaction_table_description")))]),t._v(" "),s("thead",[s("tr",[s("th",{staticClass:"text-left"},[t._v(t._s(t.$t("firefly.description")))]),t._v(" "),s("th",{staticClass:"text-right"},[t._v(t._s(t.$t("firefly.amount")))])])]),t._v(" "),s("tbody",t._l(this.transactions,(function(a){return s("tr",[s("td",[s("a",{attrs:{href:"transactions/show/"+a.id,title:a.date}},[a.attributes.transactions.length>1?s("span",[t._v(t._s(a.attributes.group_title))]):t._e(),t._v(" "),1===a.attributes.transactions.length?s("span",[t._v(t._s(a.attributes.transactions[0].description))]):t._e()])]),t._v(" "),s("td",{staticStyle:{"text-align":"right"}},t._l(a.attributes.transactions,(function(a){return s("span",["withdrawal"===a.type?s("span",{staticClass:"text-danger"},[t._v("\n "+t._s(Intl.NumberFormat("en-US",{style:"currency",currency:a.currency_code}).format(-1*a.amount))),s("br")]):t._e(),t._v(" "),"deposit"===a.type?s("span",{staticClass:"text-success"},[t._v("\n "+t._s(Intl.NumberFormat("en-US",{style:"currency",currency:a.currency_code}).format(a.amount))),s("br")]):t._e(),t._v(" "),"transfer"===a.type&&a.source_id===t.account_id?s("span",{staticClass:"text-info"},[t._v("\n "+t._s(Intl.NumberFormat("en-US",{style:"currency",currency:a.currency_code}).format(-1*a.amount))),s("br")]):t._e(),t._v(" "),"transfer"===a.type&&a.destination_id===t.account_id?s("span",{staticClass:"text-info"},[t._v("\n "+t._s(Intl.NumberFormat("en-US",{style:"currency",currency:a.currency_code}).format(a.amount))),s("br")]):t._e()])})),0)])})),0)])}),[],!1,null,"174dd2f6",null).exports;s(211);s(155),Vue.component("transaction-list-large",z),Vue.component("transaction-list-medium",A),Vue.component("transaction-list-small",N),Vue.component("dashboard",e.a),Vue.component("top-boxes",n.a),Vue.component("main-account",d),Vue.component("main-account-list",h),Vue.component("main-bills-list",v),Vue.component("main-budget",j),Vue.component("main-category",C),Vue.component("main-credit",S),Vue.component("main-debit",D),Vue.component("main-piggy-list",E);var U=s(154),V={};new Vue({i18n:U,el:"#dashboard",render:function(t){return t(e.a,{props:V})}})},212:function(t,a){}},[[157,0,1]]]);
//# sourceMappingURL=dashboard.js.map