Use Daily Balance service in Balance Chart component.
This commit is contained in:
parent
d8adfd91c5
commit
64c53441cb
@ -38,13 +38,13 @@ module.exports = angular.module('balanceChartModule', [
|
|||||||
account: '<',
|
account: '<',
|
||||||
onUpdate: '&'
|
onUpdate: '&'
|
||||||
},
|
},
|
||||||
controller: function(accountIdService, Balances, $element) {
|
controller: function(accountIdService, DailyBalanceService, $element) {
|
||||||
var vm = this;
|
var vm = this;
|
||||||
|
|
||||||
vm.loadData = function() {
|
vm.loadData = function() {
|
||||||
Balances.query({
|
DailyBalanceService.query(
|
||||||
id: accountIdService.get()
|
accountIdService.get()
|
||||||
}, function(results) {
|
).subscribe(function(results) {
|
||||||
var headers = [['date', 'balances', 'expenses', 'revenues']];
|
var headers = [['date', 'balances', 'expenses', 'revenues']];
|
||||||
|
|
||||||
var rows = results.map(function(result) {
|
var rows = results.map(function(result) {
|
||||||
|
Loading…
Reference in New Issue
Block a user