diff --git a/pom.xml b/pom.xml index d1f63e5..1572987 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 de.tilman next-transactions - 1.2.0 + 1.2.1 org.springframework.boot diff --git a/src/main/java/de/tilman/transactions/domain/Account.java b/src/main/java/de/tilman/transactions/domain/Account.java index 91922b9..4e5b02e 100644 --- a/src/main/java/de/tilman/transactions/domain/Account.java +++ b/src/main/java/de/tilman/transactions/domain/Account.java @@ -10,7 +10,6 @@ import javax.persistence.JoinTable; import javax.persistence.ManyToMany; import javax.persistence.ManyToOne; import javax.persistence.OneToMany; -import javax.persistence.OneToOne; @Entity public class Account { @@ -31,9 +30,6 @@ public class Account { @JoinTable(name = "account_user", joinColumns = @JoinColumn(name = "account_id", referencedColumnName = "id"), inverseJoinColumns = @JoinColumn(name = "user_id", referencedColumnName = "id")) private List users; - @OneToOne - private Category preselectedCategory; - public Long getId() { diff --git a/src/main/resources/static/js/controllers.js b/src/main/resources/static/js/controllers.js index ab19dc2..6a8a33c 100644 --- a/src/main/resources/static/js/controllers.js +++ b/src/main/resources/static/js/controllers.js @@ -77,6 +77,11 @@ transactionControllers.controller('TransactionListCtrl', [ '$scope', '$routePara if (typeof $scope.categories !== 'undefined') { $scope.transaction.category = $scope.categories[0]; + + // XXX dirty hack - one day we will have to move that into the database... + if ($scope.account.name == 'Gemeinschaftskonto') { + $scope.transaction.category = $scope.categories[3]; + } } // get recent transactions