Introduce new feature 'Account groups'
Account groups are a simple way to group accounts. Currently the design of the group is very sparse and supports only a name. However, as this feature is a stepping stone for the much bigger 'Reports' feature this will most likely be subject to change. With this change new accounts are also required to get assigned to a group. Also fix some translations.
This commit is contained in:
@@ -7,7 +7,6 @@ public enum ResponseReason {
|
|||||||
OK(HttpStatus.OK),
|
OK(HttpStatus.OK),
|
||||||
UNKNOWN_ERROR(HttpStatus.INTERNAL_SERVER_ERROR),
|
UNKNOWN_ERROR(HttpStatus.INTERNAL_SERVER_ERROR),
|
||||||
INVALID_ACCOUNT_TYPE(HttpStatus.INTERNAL_SERVER_ERROR),
|
INVALID_ACCOUNT_TYPE(HttpStatus.INTERNAL_SERVER_ERROR),
|
||||||
INVALID_ACCOUNT_KEY(HttpStatus.INTERNAL_SERVER_ERROR),
|
|
||||||
FROM_ACCOUNT_NOT_FOUND(HttpStatus.INTERNAL_SERVER_ERROR),
|
FROM_ACCOUNT_NOT_FOUND(HttpStatus.INTERNAL_SERVER_ERROR),
|
||||||
TO_ACCOUNT_NOT_FOUND(HttpStatus.INTERNAL_SERVER_ERROR),
|
TO_ACCOUNT_NOT_FOUND(HttpStatus.INTERNAL_SERVER_ERROR),
|
||||||
FROM_AND_TO_ACCOUNT_NOT_FOUND(HttpStatus.INTERNAL_SERVER_ERROR),
|
FROM_AND_TO_ACCOUNT_NOT_FOUND(HttpStatus.INTERNAL_SERVER_ERROR),
|
||||||
@@ -30,7 +29,9 @@ public enum ResponseReason {
|
|||||||
INVALID_TRANSACTION_ID(HttpStatus.INTERNAL_SERVER_ERROR),
|
INVALID_TRANSACTION_ID(HttpStatus.INTERNAL_SERVER_ERROR),
|
||||||
TRANSACTION_NOT_FOUND(HttpStatus.INTERNAL_SERVER_ERROR),
|
TRANSACTION_NOT_FOUND(HttpStatus.INTERNAL_SERVER_ERROR),
|
||||||
ACCOUNT_NOT_FOUND(HttpStatus.INTERNAL_SERVER_ERROR),
|
ACCOUNT_NOT_FOUND(HttpStatus.INTERNAL_SERVER_ERROR),
|
||||||
DUPLICATE_ACCOUNT_KEY(HttpStatus.INTERNAL_SERVER_ERROR);
|
DUPLICATE_ACCOUNT_KEY(HttpStatus.INTERNAL_SERVER_ERROR),
|
||||||
|
DUPLICATE_ACCOUNT_GROUP_NAME(HttpStatus.INTERNAL_SERVER_ERROR),
|
||||||
|
ACCOUNT_GROUP_NOT_FOUND(HttpStatus.INTERNAL_SERVER_ERROR);
|
||||||
|
|
||||||
private HttpStatus httpStatus;
|
private HttpStatus httpStatus;
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,11 @@ public class AccountController {
|
|||||||
|
|
||||||
@GetMapping("/newAccount")
|
@GetMapping("/newAccount")
|
||||||
public String newAccount(Model model) {
|
public String newAccount(Model model) {
|
||||||
model.addAttribute("accounttypes", AccountType.valueList());
|
final ResponseEntity<Iterable<AccountGroup>> accountGroupResponse = new GetAllAccountGroupsTemplate()
|
||||||
|
.exchange(this.financerConfig);
|
||||||
|
|
||||||
|
model.addAttribute("accountGroups", ControllerUtils.sortAccountGroups(accountGroupResponse.getBody()));
|
||||||
|
model.addAttribute("accountTypes", AccountType.valueList());
|
||||||
model.addAttribute("form", new NewAccountForm());
|
model.addAttribute("form", new NewAccountForm());
|
||||||
ControllerUtils.addVersionAttribute(model, this.financerConfig);
|
ControllerUtils.addVersionAttribute(model, this.financerConfig);
|
||||||
|
|
||||||
@@ -57,14 +61,19 @@ public class AccountController {
|
|||||||
final UriComponentsBuilder builder = UriComponentsBuilder
|
final UriComponentsBuilder builder = UriComponentsBuilder
|
||||||
.fromHttpUrl(ControllerUtils.buildUrl(this.financerConfig, Function.ACC_CREATE_ACCOUNT))
|
.fromHttpUrl(ControllerUtils.buildUrl(this.financerConfig, Function.ACC_CREATE_ACCOUNT))
|
||||||
.queryParam("key", form.getKey())
|
.queryParam("key", form.getKey())
|
||||||
|
.queryParam("accountGroupName", form.getGroup())
|
||||||
.queryParam("type", form.getType());
|
.queryParam("type", form.getType());
|
||||||
|
|
||||||
final ResponseEntity<String> response = new StringTemplate().exchange(builder);
|
final ResponseEntity<String> response = new StringTemplate().exchange(builder);
|
||||||
final ResponseReason responseReason = ResponseReason.fromResponseEntity(response);
|
final ResponseReason responseReason = ResponseReason.fromResponseEntity(response);
|
||||||
|
|
||||||
if (!ResponseReason.OK.equals(responseReason)) {
|
if (!ResponseReason.OK.equals(responseReason)) {
|
||||||
|
final ResponseEntity<Iterable<AccountGroup>> accountGroupResponse = new GetAllAccountGroupsTemplate()
|
||||||
|
.exchange(this.financerConfig);
|
||||||
|
|
||||||
model.addAttribute("form", form);
|
model.addAttribute("form", form);
|
||||||
model.addAttribute("accounttypes", AccountType.valueList());
|
model.addAttribute("accountGroups", ControllerUtils.sortAccountGroups(accountGroupResponse.getBody()));
|
||||||
|
model.addAttribute("accountTypes", AccountType.valueList());
|
||||||
model.addAttribute("errorMessage", responseReason.name());
|
model.addAttribute("errorMessage", responseReason.name());
|
||||||
ControllerUtils.addVersionAttribute(model, this.financerConfig);
|
ControllerUtils.addVersionAttribute(model, this.financerConfig);
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
package de.financer.controller;
|
||||||
|
|
||||||
|
import de.financer.ResponseReason;
|
||||||
|
import de.financer.config.FinancerConfig;
|
||||||
|
import de.financer.controller.template.StringTemplate;
|
||||||
|
import de.financer.form.NewAccountGroupForm;
|
||||||
|
import de.financer.util.ControllerUtils;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
import org.springframework.stereotype.Controller;
|
||||||
|
import org.springframework.ui.Model;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
|
import org.springframework.web.util.UriComponentsBuilder;
|
||||||
|
|
||||||
|
@Controller
|
||||||
|
public class AccountGroupController {
|
||||||
|
@Autowired
|
||||||
|
private FinancerConfig financerConfig;
|
||||||
|
|
||||||
|
@GetMapping("/newAccountGroup")
|
||||||
|
public String newAccountGroup(Model model) {
|
||||||
|
model.addAttribute("form", new NewAccountGroupForm());
|
||||||
|
ControllerUtils.addVersionAttribute(model, this.financerConfig);
|
||||||
|
|
||||||
|
return "accountGroup/newAccountGroup";
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostMapping("/saveAccountGroup")
|
||||||
|
public String saveAccontGroup(NewAccountGroupForm form, Model model) {
|
||||||
|
final UriComponentsBuilder builder = UriComponentsBuilder
|
||||||
|
.fromHttpUrl(ControllerUtils.buildUrl(this.financerConfig, Function.ACC_GP_CREATE_ACCOUNT_GROUP))
|
||||||
|
.queryParam("name", form.getName());
|
||||||
|
|
||||||
|
final ResponseEntity<String> response = new StringTemplate().exchange(builder);
|
||||||
|
final ResponseReason responseReason = ResponseReason.fromResponseEntity(response);
|
||||||
|
|
||||||
|
if (!ResponseReason.OK.equals(responseReason)) {
|
||||||
|
model.addAttribute("form", form);
|
||||||
|
model.addAttribute("errorMessage", responseReason.name());
|
||||||
|
ControllerUtils.addVersionAttribute(model, this.financerConfig);
|
||||||
|
|
||||||
|
return "accountGroup/newAccountGroup";
|
||||||
|
}
|
||||||
|
|
||||||
|
return "redirect:/accountOverview";
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,6 +7,9 @@ public enum Function {
|
|||||||
ACC_CLOSE_ACCOUNT("accounts/closeAccount"),
|
ACC_CLOSE_ACCOUNT("accounts/closeAccount"),
|
||||||
ACC_OPEN_ACCOUNT("accounts/openAccount"),
|
ACC_OPEN_ACCOUNT("accounts/openAccount"),
|
||||||
|
|
||||||
|
ACC_GP_CREATE_ACCOUNT_GROUP("accountGroups/createAccountGroup"),
|
||||||
|
ACC_GP_GET_ALL("accountGroups/getAll"),
|
||||||
|
|
||||||
TR_GET_ALL("transactions/getAll"),
|
TR_GET_ALL("transactions/getAll"),
|
||||||
TR_GET_ALL_FOR_ACCOUNT("transactions/getAllForAccount"),
|
TR_GET_ALL_FOR_ACCOUNT("transactions/getAllForAccount"),
|
||||||
TR_CREATE_TRANSACTION("transactions/createTransaction"),
|
TR_CREATE_TRANSACTION("transactions/createTransaction"),
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package de.financer.controller.template;
|
||||||
|
|
||||||
|
import de.financer.config.FinancerConfig;
|
||||||
|
import de.financer.controller.Function;
|
||||||
|
import de.financer.model.AccountGroup;
|
||||||
|
import de.financer.util.ControllerUtils;
|
||||||
|
import org.springframework.core.ParameterizedTypeReference;
|
||||||
|
import org.springframework.http.ResponseEntity;
|
||||||
|
|
||||||
|
public class GetAllAccountGroupsTemplate {
|
||||||
|
public ResponseEntity<Iterable<AccountGroup>> exchange(FinancerConfig financerConfig) {
|
||||||
|
return new FinancerRestTemplate<Iterable<AccountGroup>>().exchange(ControllerUtils
|
||||||
|
.buildUrl(financerConfig, Function.ACC_GP_GET_ALL), new ParameterizedTypeReference<Iterable<AccountGroup>>() {
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,6 +3,7 @@ package de.financer.form;
|
|||||||
public class NewAccountForm {
|
public class NewAccountForm {
|
||||||
private String key;
|
private String key;
|
||||||
private String type;
|
private String type;
|
||||||
|
private String group;
|
||||||
|
|
||||||
public String getKey() {
|
public String getKey() {
|
||||||
return key;
|
return key;
|
||||||
@@ -19,4 +20,12 @@ public class NewAccountForm {
|
|||||||
public void setType(String type) {
|
public void setType(String type) {
|
||||||
this.type = type;
|
this.type = type;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getGroup() {
|
||||||
|
return group;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setGroup(String group) {
|
||||||
|
this.group = group;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
13
src/main/java/de/financer/form/NewAccountGroupForm.java
Normal file
13
src/main/java/de/financer/form/NewAccountGroupForm.java
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
package de.financer.form;
|
||||||
|
|
||||||
|
public class NewAccountGroupForm {
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,6 +6,7 @@ public class Account {
|
|||||||
private AccountType type;
|
private AccountType type;
|
||||||
private AccountStatus status;
|
private AccountStatus status;
|
||||||
private Long currentBalance;
|
private Long currentBalance;
|
||||||
|
private AccountGroup accountGroup;
|
||||||
|
|
||||||
public Long getId() {
|
public Long getId() {
|
||||||
return id;
|
return id;
|
||||||
@@ -42,4 +43,12 @@ public class Account {
|
|||||||
public void setCurrentBalance(Long currentBalance) {
|
public void setCurrentBalance(Long currentBalance) {
|
||||||
this.currentBalance = currentBalance;
|
this.currentBalance = currentBalance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public AccountGroup getAccountGroup() {
|
||||||
|
return accountGroup;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setAccountGroup(AccountGroup accountGroup) {
|
||||||
|
this.accountGroup = accountGroup;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
18
src/main/java/de/financer/model/AccountGroup.java
Normal file
18
src/main/java/de/financer/model/AccountGroup.java
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
package de.financer.model;
|
||||||
|
|
||||||
|
public class AccountGroup {
|
||||||
|
private Long id;
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
public Long getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,6 +3,7 @@ package de.financer.util;
|
|||||||
import de.financer.config.FinancerConfig;
|
import de.financer.config.FinancerConfig;
|
||||||
import de.financer.controller.Function;
|
import de.financer.controller.Function;
|
||||||
import de.financer.model.Account;
|
import de.financer.model.Account;
|
||||||
|
import de.financer.model.AccountGroup;
|
||||||
import de.financer.model.AccountStatus;
|
import de.financer.model.AccountStatus;
|
||||||
import de.financer.model.RecurringTransaction;
|
import de.financer.model.RecurringTransaction;
|
||||||
import de.financer.util.comparator.AccountByTypeByIdComparator;
|
import de.financer.util.comparator.AccountByTypeByIdComparator;
|
||||||
@@ -12,6 +13,7 @@ import org.springframework.ui.Model;
|
|||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@@ -32,6 +34,12 @@ public class ControllerUtils {
|
|||||||
.collect(Collectors.toList());
|
.collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static List<AccountGroup> sortAccountGroups(Iterable<AccountGroup> accountGroups) {
|
||||||
|
return IterableUtils.toList(accountGroups).stream()
|
||||||
|
.sorted(Comparator.comparing(AccountGroup::getName))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
|
||||||
public static String formatDate(FinancerConfig financerConfig, String dateFromForm) {
|
public static String formatDate(FinancerConfig financerConfig, String dateFromForm) {
|
||||||
if (StringUtils.isEmpty(dateFromForm)) {
|
if (StringUtils.isEmpty(dateFromForm)) {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
@@ -6,11 +6,13 @@ financer.account-overview.available-actions.create-account=Create new account
|
|||||||
financer.account-overview.available-actions.create-transaction=Create new transaction
|
financer.account-overview.available-actions.create-transaction=Create new transaction
|
||||||
financer.account-overview.available-actions.create-recurring-transaction=Create new recurring transaction
|
financer.account-overview.available-actions.create-recurring-transaction=Create new recurring transaction
|
||||||
financer.account-overview.available-actions.recurring-transaction-all=Show all recurring transactions
|
financer.account-overview.available-actions.recurring-transaction-all=Show all recurring transactions
|
||||||
|
financer.account-overview.available-actions.create-account-group=Create new account group
|
||||||
financer.account-overview.status=Status\:
|
financer.account-overview.status=Status\:
|
||||||
financer.account-overview.status.recurring-transaction-due-today=Recurring transactions due today\:
|
financer.account-overview.status.recurring-transaction-due-today=Recurring transactions due today\:
|
||||||
financer.account-overview.status.recurring-transaction-active=Active recurring transactions\:
|
financer.account-overview.status.recurring-transaction-active=Active recurring transactions\:
|
||||||
financer.account-overview.table-header.id=ID
|
financer.account-overview.table-header.id=ID
|
||||||
financer.account-overview.table-header.key=Key
|
financer.account-overview.table-header.key=Account
|
||||||
|
financer.account-overview.table-header.group=Group
|
||||||
financer.account-overview.table-header.balance=Current Balance
|
financer.account-overview.table-header.balance=Current Balance
|
||||||
financer.account-overview.table-header.type=Type
|
financer.account-overview.table-header.type=Type
|
||||||
financer.account-overview.table-header.status=Status
|
financer.account-overview.table-header.status=Status
|
||||||
@@ -18,8 +20,13 @@ financer.account-overview.table-header.status=Status
|
|||||||
financer.account-new.title=financer\: create new account
|
financer.account-new.title=financer\: create new account
|
||||||
financer.account-new.label.key=Key\:
|
financer.account-new.label.key=Key\:
|
||||||
financer.account-new.label.type=Type\:
|
financer.account-new.label.type=Type\:
|
||||||
|
financer.account-new.label.group=Group\:
|
||||||
financer.account-new.submit=Create account
|
financer.account-new.submit=Create account
|
||||||
|
|
||||||
|
financer.account-group-new.title=financer\: create new account group
|
||||||
|
financer.account-group-new.label.name=Name\:
|
||||||
|
financer.account-group-new.submit=Create account group
|
||||||
|
|
||||||
financer.transaction-new.title=financer\: create new transaction
|
financer.transaction-new.title=financer\: create new transaction
|
||||||
financer.transaction-new.label.from-account=From account\:
|
financer.transaction-new.label.from-account=From account\:
|
||||||
financer.transaction-new.label.to-account=To account\:
|
financer.transaction-new.label.to-account=To account\:
|
||||||
@@ -83,7 +90,8 @@ financer.account-details.table-header.amount=Amount
|
|||||||
financer.account-details.table-header.description=Description
|
financer.account-details.table-header.description=Description
|
||||||
financer.account-details.table-header.byRecurring=Recurring?
|
financer.account-details.table-header.byRecurring=Recurring?
|
||||||
financer.account-details.details.type=Type\:
|
financer.account-details.details.type=Type\:
|
||||||
financer.account-details.details.balance=Current Balance\:
|
financer.account-details.details.balance=Current balance\:
|
||||||
|
financer.account-details.details.group=Group\:
|
||||||
financer.account-details.table-header.actions=Actions
|
financer.account-details.table-header.actions=Actions
|
||||||
financer.account-details.table.actions.deleteTransaction=Delete
|
financer.account-details.table.actions.deleteTransaction=Delete
|
||||||
|
|
||||||
@@ -114,6 +122,7 @@ financer.account-status.CLOSED=Closed
|
|||||||
financer.heading.transaction-new=financer\: create new transaction
|
financer.heading.transaction-new=financer\: create new transaction
|
||||||
financer.heading.recurring-transaction-new=financer\: create new recurring transaction
|
financer.heading.recurring-transaction-new=financer\: create new recurring transaction
|
||||||
financer.heading.account-new=financer\: create new account
|
financer.heading.account-new=financer\: create new account
|
||||||
|
financer.heading.account-group-new=financer\: create new account group
|
||||||
financer.heading.account-overview=financer\: overview
|
financer.heading.account-overview=financer\: overview
|
||||||
financer.heading.account-details=financer\: account details for {0}
|
financer.heading.account-details=financer\: account details for {0}
|
||||||
financer.heading.recurring-transaction-list.dueToday=financer\: recurring transactions due today
|
financer.heading.recurring-transaction-list.dueToday=financer\: recurring transactions due today
|
||||||
@@ -145,4 +154,6 @@ financer.error-message.MISSING_TRANSACTION_ID=No transaction entered!
|
|||||||
financer.error-message.INVALID_TRANSACTION_ID=The transaction is not valid!
|
financer.error-message.INVALID_TRANSACTION_ID=The transaction is not valid!
|
||||||
financer.error-message.TRANSACTION_NOT_FOUND=The transaction could not be found!
|
financer.error-message.TRANSACTION_NOT_FOUND=The transaction could not be found!
|
||||||
financer.error-message.ACCOUNT_NOT_FOUND=The account could not be found!
|
financer.error-message.ACCOUNT_NOT_FOUND=The account could not be found!
|
||||||
financer.error-message.DUPLICATE_ACCOUNT_KEY=An account with the given key already exists!
|
financer.error-message.DUPLICATE_ACCOUNT_KEY=An account with the given key already exists!
|
||||||
|
financer.error-message.DUPLICATE_ACCOUNT_GROUP_NAME=An account group with the given key already exists!
|
||||||
|
financer.error-message.ACCOUNT_GROUP_NOT_FOUND=The account group could not be found!
|
||||||
@@ -6,11 +6,13 @@ financer.account-overview.available-actions.create-account=Neues Konto erstellen
|
|||||||
financer.account-overview.available-actions.create-transaction=Neue Buchung erstellen
|
financer.account-overview.available-actions.create-transaction=Neue Buchung erstellen
|
||||||
financer.account-overview.available-actions.create-recurring-transaction=Neue wiederkehrende Buchung erstellen
|
financer.account-overview.available-actions.create-recurring-transaction=Neue wiederkehrende Buchung erstellen
|
||||||
financer.account-overview.available-actions.recurring-transaction-all=Zeige alle wiederkehrende Buchungen
|
financer.account-overview.available-actions.recurring-transaction-all=Zeige alle wiederkehrende Buchungen
|
||||||
|
financer.account-overview.available-actions.create-account-group=Neue Konto-Gruppe erstellen
|
||||||
financer.account-overview.status=Status\:
|
financer.account-overview.status=Status\:
|
||||||
financer.account-overview.status.recurring-transaction-due-today=Wiederkehrende Buchungen heute f\u00E4llig\:
|
financer.account-overview.status.recurring-transaction-due-today=Wiederkehrende Buchungen heute f\u00E4llig\:
|
||||||
financer.account-overview.status.recurring-transaction-active=Aktive wiederkehrende Buchungen\:
|
financer.account-overview.status.recurring-transaction-active=Aktive wiederkehrende Buchungen\:
|
||||||
financer.account-overview.table-header.id=ID
|
financer.account-overview.table-header.id=ID
|
||||||
financer.account-overview.table-header.key=Schl\u00FCssel
|
financer.account-overview.table-header.key=Konto
|
||||||
|
financer.account-overview.table-header.group=Gruppe
|
||||||
financer.account-overview.table-header.balance=Kontostand
|
financer.account-overview.table-header.balance=Kontostand
|
||||||
financer.account-overview.table-header.type=Typ
|
financer.account-overview.table-header.type=Typ
|
||||||
financer.account-overview.table-header.status=Status
|
financer.account-overview.table-header.status=Status
|
||||||
@@ -18,7 +20,12 @@ financer.account-overview.table-header.status=Status
|
|||||||
financer.account-new.title=financer\: Neues Konto erstellen
|
financer.account-new.title=financer\: Neues Konto erstellen
|
||||||
financer.account-new.label.key=Schl\u00FCssel\:
|
financer.account-new.label.key=Schl\u00FCssel\:
|
||||||
financer.account-new.label.type=Typ\:
|
financer.account-new.label.type=Typ\:
|
||||||
financer.account-new.submit=Account erstellen
|
financer.account-new.label.group=Gruppe\:
|
||||||
|
financer.account-new.submit=Konto erstellen
|
||||||
|
|
||||||
|
financer.account-group-new.title=financer\: Neue Konto-Gruppe erstellen
|
||||||
|
financer.account-group-new.label.name=Name\:
|
||||||
|
financer.account-group-new.submit=Konto-Gruppe erstellen
|
||||||
|
|
||||||
financer.transaction-new.title=financer\: Neue Buchung erstellen
|
financer.transaction-new.title=financer\: Neue Buchung erstellen
|
||||||
financer.transaction-new.label.from-account=Von Konto\:
|
financer.transaction-new.label.from-account=Von Konto\:
|
||||||
@@ -84,6 +91,7 @@ financer.account-details.table-header.description=Beschreibung
|
|||||||
financer.account-details.table-header.byRecurring=Wiederkehrend?
|
financer.account-details.table-header.byRecurring=Wiederkehrend?
|
||||||
financer.account-details.details.type=Typ\:
|
financer.account-details.details.type=Typ\:
|
||||||
financer.account-details.details.balance=Kontostand\:
|
financer.account-details.details.balance=Kontostand\:
|
||||||
|
financer.account-details.details.group=Gruppe\:
|
||||||
financer.account-details.table-header.actions=Aktionen
|
financer.account-details.table-header.actions=Aktionen
|
||||||
financer.account-details.table.actions.deleteTransaction=L\u00F6schen
|
financer.account-details.table.actions.deleteTransaction=L\u00F6schen
|
||||||
|
|
||||||
@@ -114,6 +122,7 @@ financer.account-status.CLOSED=Geschlossen
|
|||||||
financer.heading.transaction-new=financer\: Neue Buchung erstellen
|
financer.heading.transaction-new=financer\: Neue Buchung erstellen
|
||||||
financer.heading.recurring-transaction-new=financer\: Neue wiederkehrende Buchung erstellen
|
financer.heading.recurring-transaction-new=financer\: Neue wiederkehrende Buchung erstellen
|
||||||
financer.heading.account-new=financer\: Neues Konto erstellen
|
financer.heading.account-new=financer\: Neues Konto erstellen
|
||||||
|
financer.heading.account-group-new=financer\: Neue Konto-Gruppe erstellen
|
||||||
financer.heading.account-overview=financer\: \u00DCbersicht
|
financer.heading.account-overview=financer\: \u00DCbersicht
|
||||||
financer.heading.account-details=financer\: Kontodetails f\u00FCr {0}
|
financer.heading.account-details=financer\: Kontodetails f\u00FCr {0}
|
||||||
financer.heading.recurring-transaction-list.dueToday=financer\: wiederkehrende Buchungen heute f\u00E4llig
|
financer.heading.recurring-transaction-list.dueToday=financer\: wiederkehrende Buchungen heute f\u00E4llig
|
||||||
|
|||||||
@@ -32,9 +32,19 @@ tr:hover {
|
|||||||
#new-recurring-transaction-form * {
|
#new-recurring-transaction-form * {
|
||||||
width: 100% !important;
|
width: 100% !important;
|
||||||
}
|
}
|
||||||
|
#action-container * {
|
||||||
|
display: block !important;
|
||||||
|
margin-bottom: 0.1em;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#action-container *,
|
#action-container * {
|
||||||
|
display: inline-grid;
|
||||||
|
padding-inline-end: 0.2em;
|
||||||
|
margin-bottom: 0.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#account-details-action-container *,
|
||||||
#recurring-transaction-list-table-actions-container *,
|
#recurring-transaction-list-table-actions-container *,
|
||||||
#account-transaction-table-actions-container * {
|
#account-transaction-table-actions-container * {
|
||||||
display: block;
|
display: block;
|
||||||
@@ -56,7 +66,8 @@ tr:hover {
|
|||||||
#new-account-form *,
|
#new-account-form *,
|
||||||
#new-transaction-form *,
|
#new-transaction-form *,
|
||||||
#new-recurring-transaction-form *,
|
#new-recurring-transaction-form *,
|
||||||
#recurring-to-transaction-with-amount-form * {
|
#recurring-to-transaction-with-amount-form *,
|
||||||
|
#new-account-group-form * {
|
||||||
display: block;
|
display: block;
|
||||||
margin-top: 1em;
|
margin-top: 1em;
|
||||||
width: 20em;
|
width: 20em;
|
||||||
|
|||||||
@@ -18,8 +18,12 @@
|
|||||||
<span th:text="#{financer.account-details.details.balance}"/>
|
<span th:text="#{financer.account-details.details.balance}"/>
|
||||||
<span th:text="${#numbers.formatDecimal(account.currentBalance/100D, 1, 'DEFAULT', 2, 'DEFAULT')}"/>
|
<span th:text="${#numbers.formatDecimal(account.currentBalance/100D, 1, 'DEFAULT', 2, 'DEFAULT')}"/>
|
||||||
</div>
|
</div>
|
||||||
|
<div id="group-container">
|
||||||
|
<span th:text="#{financer.account-details.details.group}"/>
|
||||||
|
<span th:text="${account.accountGroup?.name}"/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div id="action-container">
|
<div id="account-details-action-container">
|
||||||
<span th:text="#{financer.account-details.available-actions}"/>
|
<span th:text="#{financer.account-details.available-actions}"/>
|
||||||
<a th:if="${!isClosed}" th:href="@{/closeAccount(key=${account.key})}"
|
<a th:if="${!isClosed}" th:href="@{/closeAccount(key=${account.key})}"
|
||||||
th:text="#{financer.account-details.available-actions.close-account}"/>
|
th:text="#{financer.account-details.available-actions.close-account}"/>
|
||||||
|
|||||||
@@ -19,24 +19,32 @@
|
|||||||
<a th:href="@{/recurringTransactionActive}" th:text="${rtAllActiveCount}"/>
|
<a th:href="@{/recurringTransactionActive}" th:text="${rtAllActiveCount}"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<span th:text="#{financer.account-overview.available-actions}"/>
|
||||||
<div id="action-container">
|
<div id="action-container">
|
||||||
<span th:text="#{financer.account-overview.available-actions}"/>
|
<div id="action-container-sub-accounts">
|
||||||
<a th:if="${!showClosed}" th:href="@{'/accountOverview?showClosed=true'}"
|
<a th:if="${!showClosed}" th:href="@{'/accountOverview?showClosed=true'}"
|
||||||
th:text="#{financer.account-overview.available-actions.show-closed}"/>
|
th:text="#{financer.account-overview.available-actions.show-closed}"/>
|
||||||
<a th:if="${showClosed}" th:href="@{'/accountOverview'}"
|
<a th:if="${showClosed}" th:href="@{'/accountOverview'}"
|
||||||
th:text="#{financer.account-overview.available-actions.hide-closed}"/>
|
th:text="#{financer.account-overview.available-actions.hide-closed}"/>
|
||||||
<a th:href="@{/newAccount}" th:text="#{financer.account-overview.available-actions.create-account}"/>
|
<a th:href="@{/newAccount}" th:text="#{financer.account-overview.available-actions.create-account}"/>
|
||||||
<a th:href="@{/newTransaction}" th:text="#{financer.account-overview.available-actions.create-transaction}"/>
|
<a th:href="@{/newAccountGroup}" th:text="#{financer.account-overview.available-actions.create-account-group}"/>
|
||||||
<a th:href="@{/newRecurringTransaction}"
|
</div>
|
||||||
th:text="#{financer.account-overview.available-actions.create-recurring-transaction}"/>
|
<div id="action-container-sub-transactions">
|
||||||
<a th:href="@{/recurringTransactionAll}"
|
<a th:href="@{/newTransaction}" th:text="#{financer.account-overview.available-actions.create-transaction}"/>
|
||||||
th:text="#{financer.account-overview.available-actions.recurring-transaction-all}"/>
|
</div>
|
||||||
|
<div id="action-container-sub-recurring-transactions">
|
||||||
|
<a th:href="@{/newRecurringTransaction}"
|
||||||
|
th:text="#{financer.account-overview.available-actions.create-recurring-transaction}"/>
|
||||||
|
<a th:href="@{/recurringTransactionAll}"
|
||||||
|
th:text="#{financer.account-overview.available-actions.recurring-transaction-all}"/>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<table id="account-overview-table">
|
<table id="account-overview-table">
|
||||||
<tr>
|
<tr>
|
||||||
<th class="hideable-column" th:text="#{financer.account-overview.table-header.id}"/>
|
<th class="hideable-column" th:text="#{financer.account-overview.table-header.id}"/>
|
||||||
<th th:text="#{financer.account-overview.table-header.key}"/>
|
<th th:text="#{financer.account-overview.table-header.key}"/>
|
||||||
<th th:text="#{financer.account-overview.table-header.balance}"/>
|
<th th:text="#{financer.account-overview.table-header.balance}"/>
|
||||||
|
<th class="hideable-column" th:text="#{financer.account-overview.table-header.group}"/>
|
||||||
<th class="hideable-column" th:text="#{financer.account-overview.table-header.type}"/>
|
<th class="hideable-column" th:text="#{financer.account-overview.table-header.type}"/>
|
||||||
<th class="hideable-column" th:text="#{financer.account-overview.table-header.status}"/>
|
<th class="hideable-column" th:text="#{financer.account-overview.table-header.status}"/>
|
||||||
</tr>
|
</tr>
|
||||||
@@ -46,6 +54,7 @@
|
|||||||
<a th:href="@{/accountDetails(key=${acc.key})}" th:text="${acc.key}"/>
|
<a th:href="@{/accountDetails(key=${acc.key})}" th:text="${acc.key}"/>
|
||||||
</td>
|
</td>
|
||||||
<td th:text="${#numbers.formatDecimal(acc.currentBalance/100D, 1, 'DEFAULT', 2, 'DEFAULT')}"/>
|
<td th:text="${#numbers.formatDecimal(acc.currentBalance/100D, 1, 'DEFAULT', 2, 'DEFAULT')}"/>
|
||||||
|
<td class="hideable-column" th:text="${acc.accountGroup?.name}"/>
|
||||||
<td class="hideable-column" th:text="#{'financer.account-type.' + ${acc.type}}"/>
|
<td class="hideable-column" th:text="#{'financer.account-type.' + ${acc.type}}"/>
|
||||||
<td class="hideable-column" th:text="#{'financer.account-status.' + ${acc.status}}"/>
|
<td class="hideable-column" th:text="#{'financer.account-status.' + ${acc.status}}"/>
|
||||||
</tr>
|
</tr>
|
||||||
|
|||||||
@@ -14,7 +14,11 @@
|
|||||||
<input type="text" id="inputKey" th:field="*{key}" />
|
<input type="text" id="inputKey" th:field="*{key}" />
|
||||||
<label for="selectType" th:text="#{financer.account-new.label.type}"/>
|
<label for="selectType" th:text="#{financer.account-new.label.type}"/>
|
||||||
<select id="selectType" th:field="*{type}">
|
<select id="selectType" th:field="*{type}">
|
||||||
<option th:each="type : ${accounttypes}" th:value="${type}" th:text="#{'financer.account-type.' + ${type}}"/>
|
<option th:each="type : ${accountTypes}" th:value="${type}" th:text="#{'financer.account-type.' + ${type}}"/>
|
||||||
|
</select>
|
||||||
|
<label for="selectGroup" th:text="#{financer.account-new.label.group}"/>
|
||||||
|
<select id="selectGroup" th:field="*{group}">
|
||||||
|
<option th:each="group : ${accountGroups}" th:value="${group.name}" th:text="${group.name}"/>
|
||||||
</select>
|
</select>
|
||||||
<input type="submit" th:value="#{financer.account-new.submit}" />
|
<input type="submit" th:value="#{financer.account-new.submit}" />
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -0,0 +1,19 @@
|
|||||||
|
<!DOCTYPE HTML>
|
||||||
|
<html xmlns:th="http://www.thymeleaf.org">
|
||||||
|
<head>
|
||||||
|
<title th:text="#{financer.account-group-new.title}"/>
|
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<link rel="stylesheet" th:href="@{/css/main.css}">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<h1 th:text="#{financer.heading.account-group-new}" />
|
||||||
|
<span class="errorMessage" th:if="${errorMessage != null}" th:text="#{'financer.error-message.' + ${errorMessage}}"/>
|
||||||
|
<form id="new-account-group-form" action="#" th:action="@{/saveAccountGroup}" th:object="${form}" method="post">
|
||||||
|
<label for="inputName" th:text="#{financer.account-group-new.label.name}"/>
|
||||||
|
<input type="text" id="inputName" th:field="*{name}" />
|
||||||
|
<input type="submit" th:value="#{financer.account-group-new.submit}" />
|
||||||
|
</form>
|
||||||
|
<div th:replace="includes/footer :: footer"/>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user