make H2 database console available
This commit is contained in:
@@ -80,7 +80,7 @@ transactionControllers.controller('TransactionListCtrl', [ '$scope', '$location'
|
||||
}
|
||||
|
||||
// get recent transactions
|
||||
var transactions = $resource('http://localhost:8080/transactions/search/forAccount', { accountId: $scope.account.id, size: $scope.pageSize, sort: 'date,desc' }).get();
|
||||
var transactions = $resource('/transactions/search/forAccount', { accountId: $scope.account.id, size: $scope.pageSize, sort: 'date,desc' }).get();
|
||||
transactions.$promise.then(function(data) {
|
||||
$scope.transactions = transactions._embedded.transactions;
|
||||
$scope.nextPageAvailable = (transactions.page.totalPages !== transactions.page.number + 1);
|
||||
@@ -172,7 +172,7 @@ transactionControllers.controller('TransactionListCtrl', [ '$scope', '$location'
|
||||
$scope.moreTransactions = function() {
|
||||
if ($scope.nextPageAvailable) {
|
||||
$scope.pageNumber++;
|
||||
var transactions = $resource('http://localhost:8080/transactions/search/forAccount', { accountId: $scope.account.id, size: $scope.pageSize, sort: 'date,desc', page: $scope.pageNumber }).get();
|
||||
var transactions = $resource('/transactions/search/forAccount', { accountId: $scope.account.id, size: $scope.pageSize, sort: 'date,desc', page: $scope.pageNumber }).get();
|
||||
transactions.$promise.then(function(data) {
|
||||
for (i = 0; i < transactions._embedded.transactions.length; i++) {
|
||||
transactions._embedded.transactions[i].amount = numberToAmount(transactions._embedded.transactions[i].amount);
|
||||
@@ -187,7 +187,7 @@ transactionControllers.controller('TransactionListCtrl', [ '$scope', '$location'
|
||||
};
|
||||
|
||||
$scope.updateSuggestions = function(val) {
|
||||
var suggestions = $resource('http://localhost:8080/transactions/search/descriptions', { accountId: $scope.account.id, prefix: val.toLowerCase() }).get();
|
||||
var suggestions = $resource('/transactions/search/descriptions', { accountId: $scope.account.id, prefix: val.toLowerCase() }).get();
|
||||
return suggestions.$promise.then(function(data) {
|
||||
var newSuggestions = new Array(suggestions._embedded.transactions.length);
|
||||
for (i = 0; i < suggestions._embedded.transactions.length; i++) {
|
||||
|
||||
Reference in New Issue
Block a user