manage depth

This commit is contained in:
Gwenhael Le Moine 2015-05-24 13:10:29 +02:00
parent ff892ddadb
commit 545bf06733
2 changed files with 5 additions and 2 deletions

View file

@ -135,6 +135,7 @@ app.controller( 'DashboardCtrl',
details: {} details: {}
}; };
$scope.depth = 99;
var retrieve_data = function () { var retrieve_data = function () {
var from, to, period; var from, to, period;
@ -170,7 +171,8 @@ app.controller( 'DashboardCtrl',
_($scope.balance.buckets).each( function( bucket ) { _($scope.balance.buckets).each( function( bucket ) {
API.balance( { period: period, API.balance( { period: period,
categories: bucket.categories } ) categories: bucket.categories,
depth: $scope.depth } )
.then( function ( response ) { .then( function ( response ) {
bucket.raw_data = _.chain( response.data ) bucket.raw_data = _.chain( response.data )
.map( function( account ) { .map( function( account ) {

View file

@ -5,7 +5,8 @@ app.service( 'API',
return $http.get( '/api/ledger/balance', { return $http.get( '/api/ledger/balance', {
params: { params: {
period: params.period, period: params.period,
categories: params.categories categories: params.categories,
depth: params.depth
} }
} ); } );
}; };