Categories can now be retired
This commit is contained in:
@@ -149,6 +149,14 @@ transactionControllers.controller('TransactionListCtrl', [ '$scope', '$routePara
|
||||
var categories = $resource('/api/categories/search/listForAccount', { accountId: $scope.account.id }).get();
|
||||
categories.$promise.then(function(data) {
|
||||
$scope.categories = categories._embedded.categories;
|
||||
|
||||
// remove retired categories
|
||||
for (i = 0; i < $scope.categories.length; i++) {
|
||||
if ($scope.categories[i].retired) {
|
||||
$scope.categories.splice(i, 1);
|
||||
}
|
||||
}
|
||||
|
||||
$scope.refreshList();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user