account selection via GET parameter
This commit is contained in:
@@ -3,7 +3,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>de.tilman</groupId>
|
<groupId>de.tilman</groupId>
|
||||||
<artifactId>next-transactions</artifactId>
|
<artifactId>next-transactions</artifactId>
|
||||||
<version>1.1.4</version>
|
<version>1.1.6</version>
|
||||||
|
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
|
|||||||
@@ -33,8 +33,9 @@
|
|||||||
|
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
<meta name="apple-mobile-web-app-capable" content="yes">
|
<!-- meta name="apple-mobile-web-app-capable" content="yes" -->
|
||||||
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
<link rel="apple-touch-icon" href="/apple-touch-icon.png">
|
||||||
|
<link rel="icon" href="/apple-touch-icon.png">
|
||||||
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ function numberToAmount(number) {
|
|||||||
return amount;
|
return amount;
|
||||||
}
|
}
|
||||||
|
|
||||||
transactionControllers.controller('TransactionListCtrl', [ '$scope', '$location', '$resource', '$q', '$uibModal', '$log', 'Transaction', function($scope, $location, $resource, $q, $uibModal, $log, Transaction) {
|
transactionControllers.controller('TransactionListCtrl', [ '$scope', '$routeParams', '$resource', '$q', '$uibModal', '$log', 'Transaction', function($scope, $routeParams, $resource, $q, $uibModal, $log, Transaction) {
|
||||||
|
|
||||||
function refreshExpenses() {
|
function refreshExpenses() {
|
||||||
var accountUsers = $resource($scope.account._links.users.href).get();
|
var accountUsers = $resource($scope.account._links.users.href).get();
|
||||||
@@ -134,8 +134,15 @@ transactionControllers.controller('TransactionListCtrl', [ '$scope', '$location'
|
|||||||
var accountInfo = $resource('/accounts/search/findByUserName', { username: $scope.userid }).get();
|
var accountInfo = $resource('/accounts/search/findByUserName', { username: $scope.userid }).get();
|
||||||
accountInfo.$promise.then(function(data) {
|
accountInfo.$promise.then(function(data) {
|
||||||
$scope.accounts = accountInfo._embedded.accounts;
|
$scope.accounts = accountInfo._embedded.accounts;
|
||||||
if ($scope.account == undefined)
|
if ($scope.account == undefined) {
|
||||||
$scope.account = $scope.accounts[0];
|
$scope.account = $scope.accounts[0];
|
||||||
|
if ($routeParams.account != undefined) {
|
||||||
|
for (i = 0; i < $scope.accounts.length; i++) {
|
||||||
|
if ($scope.accounts[i].name == $routeParams.account)
|
||||||
|
$scope.account = $scope.accounts[i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var categories = $resource('/categories/search/listForAccount', { accountId: $scope.account.id }).get();
|
var categories = $resource('/categories/search/listForAccount', { accountId: $scope.account.id }).get();
|
||||||
categories.$promise.then(function(data) {
|
categories.$promise.then(function(data) {
|
||||||
|
|||||||
Reference in New Issue
Block a user