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