mc
This commit is contained in:
@@ -14,10 +14,14 @@ transactionControllers.controller('TransactionListCtrl', [ '$scope', '$location'
|
||||
|
||||
$scope.transaction = {
|
||||
amount: 1,
|
||||
date: new Date(),
|
||||
// category: categories._embedded.categories[0]
|
||||
date: new Date()
|
||||
};
|
||||
|
||||
if (typeof $scope.categories !== 'undefined') {
|
||||
// TODO default-Kategorie sollte per Account einstellbar sein
|
||||
$scope.transaction.category = $scope.categories[0];
|
||||
}
|
||||
|
||||
// get recent transactions
|
||||
var transactions = $resource('/transactions/search/last10', { accountId: $scope.accountId }).get();
|
||||
|
||||
@@ -65,7 +69,7 @@ transactionControllers.controller('TransactionListCtrl', [ '$scope', '$location'
|
||||
"amount" : $scope.transaction.amount,
|
||||
"date" : $scope.transaction.date,
|
||||
"description" : $scope.transaction.description,
|
||||
"category" : $scope.category._links.self.href,
|
||||
"category" : $scope.transaction.category._links.self.href,
|
||||
"creditor" : $scope.creditor
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user