From 545bf06733800f144974723d8cfc509988de178f Mon Sep 17 00:00:00 2001 From: Gwenhael Le Moine Date: Sun, 24 May 2015 13:10:29 +0200 Subject: [PATCH] manage depth --- public/app/js/controllers/DashboardCtrl.js | 4 +++- public/app/js/services/API.js | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/public/app/js/controllers/DashboardCtrl.js b/public/app/js/controllers/DashboardCtrl.js index b57aa716..588a5bfa 100644 --- a/public/app/js/controllers/DashboardCtrl.js +++ b/public/app/js/controllers/DashboardCtrl.js @@ -135,6 +135,7 @@ app.controller( 'DashboardCtrl', details: {} }; + $scope.depth = 99; var retrieve_data = function () { var from, to, period; @@ -170,7 +171,8 @@ app.controller( 'DashboardCtrl', _($scope.balance.buckets).each( function( bucket ) { API.balance( { period: period, - categories: bucket.categories } ) + categories: bucket.categories, + depth: $scope.depth } ) .then( function ( response ) { bucket.raw_data = _.chain( response.data ) .map( function( account ) { diff --git a/public/app/js/services/API.js b/public/app/js/services/API.js index 0174b032..18452ba4 100644 --- a/public/app/js/services/API.js +++ b/public/app/js/services/API.js @@ -5,7 +5,8 @@ app.service( 'API', return $http.get( '/api/ledger/balance', { params: { period: params.period, - categories: params.categories + categories: params.categories, + depth: params.depth } } ); };