Use accountIdService to retrieve current Account Id.
This commit is contained in:
parent
eb0d898c19
commit
7281d1f11d
@ -35,12 +35,12 @@ module.exports = angular.module('categoryChartModule', [
|
|||||||
minDate: '<',
|
minDate: '<',
|
||||||
maxDate: '<'
|
maxDate: '<'
|
||||||
},
|
},
|
||||||
controller: function($stateParams, $element, Categories, Incomes) {
|
controller: function(accountIdService, $element, Categories, Incomes) {
|
||||||
var vm = this;
|
var vm = this;
|
||||||
|
|
||||||
vm.loadData = function() {
|
vm.loadData = function() {
|
||||||
Categories.query({
|
Categories.query({
|
||||||
id: $stateParams.accountId,
|
id: accountIdService.get(),
|
||||||
begin: vm.minDate ? moment(vm.minDate).format('YYYY-MM-DD') : null,
|
begin: vm.minDate ? moment(vm.minDate).format('YYYY-MM-DD') : null,
|
||||||
end: vm.maxDate ? moment(vm.maxDate).format('YYYY-MM-DD') : null
|
end: vm.maxDate ? moment(vm.maxDate).format('YYYY-MM-DD') : null
|
||||||
}, function(results) {
|
}, function(results) {
|
||||||
|
Loading…
Reference in New Issue
Block a user