manage depth
This commit is contained in:
parent
ff892ddadb
commit
545bf06733
2 changed files with 5 additions and 2 deletions
|
@ -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 ) {
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue