diff --git a/src/main/resources/static/js/controllers.js b/src/main/resources/static/js/controllers.js index c2001f4..70b8d10 100644 --- a/src/main/resources/static/js/controllers.js +++ b/src/main/resources/static/js/controllers.js @@ -103,7 +103,6 @@ transactionControllers.controller('TransactionListCtrl', [ '$scope', '$location' // if this is selected to be a withdrawal, preselect the current user and lock the radio buttons if ($scope.transaction.category.name === 'Private Entnahme') { for (i = 0; i < userLabels.length; i++) { - console.log(userLabels[i].innerHTML.substr(-$scope.userinfo.name.length-6)); if (userLabels[i].innerHTML.indexOf($scope.userinfo.name) >= 0) { userLabels[i].getElementsByTagName('INPUT')[0].checked = true; } @@ -135,9 +134,10 @@ transactionControllers.controller('TransactionListCtrl', [ '$scope', '$location' var accountInfo = $resource('/accounts/search/findByUserName', { username: $scope.userid }).get(); accountInfo.$promise.then(function(data) { $scope.accounts = accountInfo._embedded.accounts; - $scope.account = $scope.accounts[0]; + if ($scope.account == undefined) + $scope.account = $scope.accounts[0]; - var categories = $resource('/categories/search/listForAccount', { accountId: $scope.accounts[0].id }).get(); + var categories = $resource('/categories/search/listForAccount', { accountId: $scope.account.id }).get(); categories.$promise.then(function(data) { $scope.categories = categories._embedded.categories; $scope.refreshList(); diff --git a/src/main/resources/static/partials/transaction-list.html b/src/main/resources/static/partials/transaction-list.html index 44451ad..65397a7 100644 --- a/src/main/resources/static/partials/transaction-list.html +++ b/src/main/resources/static/partials/transaction-list.html @@ -4,7 +4,7 @@
@@ -99,7 +99,7 @@ more -
+
{{user.name}} {{user.outstandingAmount}} €