Skip to content

Commit

Permalink
Merge branch 'v2_16_0'
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins committed Oct 29, 2023
2 parents 5b5c0f5 + ab5790b commit f8a15a0
Show file tree
Hide file tree
Showing 21 changed files with 82 additions and 80 deletions.
20 changes: 10 additions & 10 deletions BudgetMasterServer/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>BudgetMaster</artifactId>
<groupId>de.deadlocker8</groupId>
<version>2.15.1</version>
<version>2.16.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand All @@ -27,22 +27,22 @@
<jlibs.version>3.2.0</jlibs.version>
<versionizer.version>3.0.1</versionizer.version>
<webjars-locator.version>0.47</webjars-locator.version>
<jquery.version>3.6.4</jquery.version>
<jquery.version>3.7.1</jquery.version>
<materializecss.version>1.0.0</materializecss.version>
<fontawesome.version>6.4.0</fontawesome.version>
<fontawesome.version>6.4.2</fontawesome.version>
<sortablejs.version>1.15.0</sortablejs.version>
<mousetrap.version>1.6.5</mousetrap.version>
<codemirror.version>5.62.2</codemirror.version>
<selenium.version>4.10.0</selenium.version>
<jgit.version>6.6.0.202305301015-r</jgit.version>
<selenium.version>4.13.0</selenium.version>
<jgit.version>6.7.0.202309050840-r</jgit.version>
<natorder.version>1.1.3</natorder.version>
<itextpdf.version>5.5.13.3</itextpdf.version>
<vanilla-picker.version>2.12.1</vanilla-picker.version>
<jacoco-maven-plugin.version>0.8.10</jacoco-maven-plugin.version>
<opencsv.version>5.7.1</opencsv.version>
<jacoco-maven-plugin.version>0.8.11</jacoco-maven-plugin.version>
<opencsv.version>5.8</opencsv.version>
<datatables.version>1.13.5</datatables.version>
<jakarta.xml.bind-api.version>4.0.0</jakarta.xml.bind-api.version>
<junit-jupiter-engine.version>5.9.3</junit-jupiter-engine.version>
<jakarta.xml.bind-api.version>4.0.1</jakarta.xml.bind-api.version>
<junit-jupiter-engine.version>5.10.0</junit-jupiter-engine.version>

<project.outputDirectory>${project.build.directory}/../build/${project.version}</project.outputDirectory>
<project.artifactName>${project.artifactId}-v${project.version}</project.artifactName>
Expand Down Expand Up @@ -235,7 +235,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.1.2</version>
<version>3.2.1</version>
<dependencies>
<dependency>
<groupId>org.junit.jupiter</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,8 @@ public String index(Model model)
public String whatsNewModal(Model model)
{
final List<NewsEntry> newsEntries = new ArrayList<>();
newsEntries.add(NewsEntry.createWithLocalizationKey("csvImportBugfixMultipleTimes"));
newsEntries.add(NewsEntry.createWithLocalizationKey("dockerImageSize"));
newsEntries.add(NewsEntry.createWithLocalizationKey("csvImportAvoidPageReload"));
newsEntries.add(NewsEntry.createWithLocalizationKey("csvImportBugfixFloatingPointPrecision"));
newsEntries.add(NewsEntry.createWithLocalizationKey("csvImportBugfixTemplateAndCategory"));
newsEntries.add(NewsEntry.createWithLocalizationKey("sortCategoriesInCharts"));
newsEntries.add(NewsEntry.createWithLocalizationKey("filterBugfix"));
newsEntries.add(NewsEntry.createWithLocalizationKey("accountBalances"));
newsEntries.add(NewsEntry.createWithLocalizationKey("transferTooltip"));

model.addAttribute(ModelAttributes.NEWS_ENTRIES, newsEntries);
return ReturnValues.WHATS_NEW;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@
import org.springframework.stereotype.Service;

import java.text.DecimalFormatSymbols;
import java.text.MessageFormat;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;


Expand Down Expand Up @@ -173,16 +175,33 @@ public int getAmount(Transaction transaction, Account account)
return transaction.getAmount();
}

public int getAccountBudget()
public int getCurrentAccountBudget()
{
final Account currentAccount = getCurrentAccount();
return getBudgetForAccount(currentAccount);
}

public int getAccountBudgetByID(Integer accountID)
{
final Optional<Account> accountOptional = accountRepository.findById(accountID);
if(accountOptional.isEmpty())
{
throw new IllegalArgumentException(MessageFormat.format("No account with ID \"{0}\" found", accountID));
}

final Account account = accountOptional.get();
return getBudgetForAccount(account);
}

private int getBudgetForAccount(Account account)
{
Account currentAccount = getCurrentAccount();
final LocalDate endDate = DateHelper.getCurrentDate();
List<Transaction> transactions = transactionService.getTransactionsForAccountUntilDate(currentAccount, endDate, FilterConfiguration.DEFAULT);
List<Transaction> transactions = transactionService.getTransactionsForAccountUntilDate(account, endDate, FilterConfiguration.DEFAULT);

int sum = 0;
for(Transaction transaction : transactions)
{
sum += getAmount(transaction, currentAccount);
sum += getAmount(transaction, account);
}

return sum;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.security.SecureRandom;
import java.text.MessageFormat;
import java.time.LocalDate;
import java.util.ArrayList;
Expand Down Expand Up @@ -47,7 +48,7 @@ public DemoDataCreator(CategoryService categoryService, IconService iconService,
this.accountService = accountService;
this.transactionService = transactionService;

this.random = new Random();
this.random = new SecureRandom();
}

public void createDemoData()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
locale=de

# DEFAULT
credits=Verwendete Schriftarten: Roboto<br>Verwendete Bibliotheken:<br>spring-boot-starter-parent 3.1.1<br>spring-boot-devtools 3.1.1<br>spring-boot-starter-web 3.1.1<br>spring-boot-starter-test 3.1.1<br>spring-boot-starter-security 3.1.1<br>spring-boot-starter-freemarker 3.1.1<br>spring-boot-starter-validation 3.1.1<br>spring-boot-starter-data-jpa 3.1.1<br>hibernate-jpamodelgen 6.1.7.Final<br>jakarta.xml.bind-api 4.0.0<br>maven-surefire-plugin 2.22.2<br>launch4j-maven-plugin 1.7.25<br>jquery 3.6.4<br>materialize 1.0.0<br>fontawesome 6.4.0<br>Google Material Icons<br>Vanilla-picker 2.12.1<br>SortableJS 1.15.0<br>jlibs 3.2.0<br>itextpdf 5.5.13.3<br>mousetrap 1.6.5<br>plotly 2.24.2<br>momentjs 2.29.4<br>codemirror 5.62.2<br>webjars-locator 0.46<br>libUtils 3.2.7<br>libStorage 3.2.3<br>natorder 1.1.3<br>jgit 6.6.0.202305301015-r<br>opencsv 5.7.1<br>datatables 1.13.5<br>
credits=Verwendete Schriftarten: Roboto<br>Verwendete Bibliotheken:<br>spring-boot-starter-parent 3.1.5<br>spring-boot-devtools 3.1.5<br>spring-boot-starter-web 3.1.5<br>spring-boot-starter-test 3.1.5<br>spring-boot-starter-security 3.1.5<br>spring-boot-starter-freemarker 3.1.5<br>spring-boot-starter-validation 3.1.5<br>spring-boot-starter-data-jpa 3.1.5<br>hibernate-jpamodelgen 6.1.7.Final<br>jakarta.xml.bind-api 4.0.1<br>maven-surefire-plugin 2.22.2<br>launch4j-maven-plugin 1.7.25<br>jquery 3.7.1<br>materialize 1.0.0<br>fontawesome 6.4.2<br>Google Material Icons<br>Vanilla-picker 2.12.1<br>SortableJS 1.15.0<br>jlibs 3.2.0<br>itextpdf 5.5.13.3<br>mousetrap 1.6.5<br>plotly 2.27.0<br>momentjs 2.29.4<br>codemirror 5.62.2<br>webjars-locator 0.46<br>libUtils 3.2.7<br>libStorage 3.2.3<br>natorder 1.1.3<br>jgit 6.7.0.202309050840-r<br>opencsv 5.8<br>datatables 1.13.5<br>
folder=Deadlocker/BudgetMaster
roadmap.url=https://roadmaps.thecodelabs.de/roadmap/1
github.url=https://github.com/deadlocker8/BudgetMaster
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
locale=en

# DEFAULT
credits=Fonts used: Roboto<br>Libraries used:<br>spring-boot-starter-parent 3.1.1<br>spring-boot-devtools 3.1.1<br>spring-boot-starter-web 3.1.1<br>spring-boot-starter-test 3.1.1<br>spring-boot-starter-security 3.1.1<br>pring-boot-starter-freemarker 3.1.1<br>spring-boot-starter-validation 3.1.1<br>spring-boot-starter-data-jpa 3.1.1<br>hibernate-jpamodelgen 6.1.7.Final<br>jakarta.xml.bind-api 4.0.0<br>maven-surefire-plugin 2.22.2<br>launch4j-maven-plugin 1.7.25<br>jquery 3.6.4<br>materialize 1.0.0<br>fontawesome 6.4.0<br>Google Material Icons<br>Vanilla-picker 2.12.1<br>SortableJS 1.15.0<br>jlibs 3.2.0<br>itextpdf 5.5.13.3<br>mousetrap 1.6.5<br>plotly 2.24.2<br>momentjs 2.29.4<br>codemirror 5.62.2<br>webjars-locator 0.46<br>libUtils 3.2.7<br>libStorage 3.2.3<br>natorder 1.1.3<br>jgit 6.6.0.202305301015-r<br>opencsv 5.7.1<br>datatables 1.13.5<br>
credits=Fonts used: Roboto<br>Libraries used:<br>spring-boot-starter-parent 3.1.5<br>spring-boot-devtools 3.1.5<br>spring-boot-starter-web 3.1.5<br>spring-boot-starter-test 3.1.5<br>spring-boot-starter-security 3.1.5<br>pring-boot-starter-freemarker 3.1.5<br>spring-boot-starter-validation 3.1.5<br>spring-boot-starter-data-jpa 3.1.5<br>hibernate-jpamodelgen 6.1.7.Final<br>jakarta.xml.bind-api 4.0.1<br>maven-surefire-plugin 2.22.2<br>launch4j-maven-plugin 1.7.25<br>jquery 3.7.1<br>materialize 1.0.0<br>fontawesome 6.4.2<br>Google Material Icons<br>Vanilla-picker 2.12.1<br>SortableJS 1.15.0<br>jlibs 3.2.0<br>itextpdf 5.5.13.3<br>mousetrap 1.6.5<br>plotly 2.27.0<br>momentjs 2.29.4<br>codemirror 5.62.2<br>webjars-locator 0.46<br>libUtils 3.2.7<br>libStorage 3.2.3<br>natorder 1.1.3<br>jgit 6.7.0.202309050840-r<br>opencsv 5.8<br>datatables 1.13.5<br>
folder=Deadlocker/BudgetMaster
roadmap.url=https://roadmaps.thecodelabs.de/roadmap/2
github.url=https://github.com/deadlocker8/BudgetMaster
Expand Down
23 changes: 4 additions & 19 deletions BudgetMasterServer/src/main/resources/languages/news_de.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,8 @@ news.further.information=Weitere Informationen
news.all.releases=Alle veröffentlichten und geplanten Versionen:
news.detailed=Ausführliches Changelog (nur auf Englisch):

news.csvImportBugfixMultipleTimes.headline=Bugfix: Buchungen werden nicht mehr doppelt gespeichert
news.csvImportBugfixMultipleTimes.description=Behebt einen Fehler, der dazu führte, dass Buchungen beim CSV-Import mehrfach gespeichert wurden.
news.accountBalances.headline=Kontostände
news.accountBalances.description=Die Kontenauswahl zeigt für jedes Konto den aktuellen Saldo an.

news.dockerImageSize.headline=Größe des Docker-Images reduziert
news.dockerImageSize.description=Deutliche Reduzierung der Größe des Docker-Images.

news.csvImportAvoidPageReload.headline=CSV-Import: Neuladen der Seite vermeiden
news.csvImportAvoidPageReload.description=Beim Überspringen oder Inline-Speichern einer Buchung aus einer CSV wird die Seite nicht mehr neu geladen.

news.csvImportBugfixFloatingPointPrecision.headline=Bugfix: CSV-Import Fließkommagenauigkeit
news.csvImportBugfixFloatingPointPrecision.description=Behebt einen Fehler, der aufgrund der Fließkommagenauigkeit zu falschen Transaktionsbeträgen führte.

news.csvImportBugfixTemplateAndCategory.headline=Bugfix: CSV-Import aus Vorlage
news.csvImportBugfixTemplateAndCategory.description=Behebt einen Fehler, der dazu führte, dass die Kategorie einer Vorlage durch die CSV-Daten überschrieben wurde.

news.sortCategoriesInCharts.headline=Kategorien in Balkendiagrammen alphabetisch sortieren
news.sortCategoriesInCharts.description=Kategorien in Balkendiagrammen werden jetzt alphabetisch sortiert.

news.filterBugfix.headline=Bugfix: Verwendung von Filtern
news.filterBugfix.description=Behebt einen Fehler, der verhinderte, dass Filter verwendet werden konnten.
news.transferTooltip.headline=Umbuchungsrichtun
news.transferTooltip.description=Added tooltip for transfers in transaction overview to show source and destination account.
23 changes: 4 additions & 19 deletions BudgetMasterServer/src/main/resources/languages/news_en.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,8 @@ news.further.information=Further information
news.all.releases=All published and planned releases:
news.detailed=Detailed changelog (english only):

news.csvImportBugfixMultipleTimes.headline=Bugfix: Transactions are no longer saved multiple times
news.csvImportBugfixMultipleTimes.description=Fixed an error that caused transactions to be saved multiple times during CSV import.
news.accountBalances.headline=Account balances
news.accountBalances.description=Show the current balance for each account in the account select.

news.dockerImageSize.headline=Improve docker image size
news.dockerImageSize.description=Drastically reduce the size of the docker image.

news.csvImportAvoidPageReload.headline=CSV import: avoid page reload
news.csvImportAvoidPageReload.description=Avoid page reload on skip/undo skip and on inline save.

news.csvImportBugfixFloatingPointPrecision.headline=Bugfix: CSV import floating point precision
news.csvImportBugfixFloatingPointPrecision.description=Fixes a bug that lead to wrong transactions amounts due to floating point precision.

news.csvImportBugfixTemplateAndCategory.headline=Bugfix: CSV import from template
news.csvImportBugfixTemplateAndCategory.description=Fixes a bug hat caused the category of a template to be overridden by the CSV data.

news.sortCategoriesInCharts.headline=Sort categories alphabetically in bar charts
news.sortCategoriesInCharts.description=Categories in bar charts are now sorted alphabetically.

news.filterBugfix.headline=Bugfix: filter usage
news.filterBugfix.description=Fixes a bug that prevented filters from being usable.
news.transferTooltip.headline=Konten für Umbuchungen anzeigen
news.transferTooltip.description=Umbuchungen zeigen in einem Tooltip das Quel- und Zielkonto.
11 changes: 10 additions & 1 deletion BudgetMasterServer/src/main/resources/static/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -375,9 +375,18 @@ input[type="radio"]:checked + span::after, [type="radio"].with-gap:checked + spa
border: 3px solid var(--color-grey);
}

.global-account-select-option-column-2 {
display: flex;
flex-direction: column;
margin-left: 2rem;
}

.global-account-select-option-name {
font-size: 1.4rem;
margin-left: 2rem;
}

.global-account-select-option-balance {
font-size: 1.4rem;
}

.global-account-select-option-content {
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<#import "helpers/header.ftl" as header>
<#import "helpers/customSelectMacros.ftl" as customSelectMacros>

<@header.globals/>

<div id="modalGlobalAccountSelect" class="modal modal-fixed-footer background-color-light">
<div class="modal-content">
Expand Down Expand Up @@ -39,7 +40,15 @@
</#if>
<div class="global-account-select-option-content">
<@customSelectMacros.accountIcon account accountName "category-circle-preview account-icon-big"/>
<div class="global-account-select-option-name truncate">${accountName}</div>
<div class="global-account-select-option-column-2">
<div class="global-account-select-option-name truncate">${accountName}</div>
<#assign accountBudget = helpers.getAccountBudgetByID(account.getID())/>
<#if accountBudget <= 0>
<div class="global-account-select-option-balance ${redTextColor}">${currencyService.getCurrencyString(accountBudget)}</div>
<#else>
<div class="global-account-select-option-balance ${greenTextColor}">${currencyService.getCurrencyString(accountBudget)}</div>
</#if>
</div>
</div>
</div>
</a>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<#import "/spring.ftl" as s>
<title>${title}</title>
<meta charset="UTF-8"/>
<link rel="stylesheet" href="<@s.url '/webjars/font-awesome/6.4.0/css/all.min.css'/>">
<link rel="stylesheet" href="<@s.url '/webjars/font-awesome/6.4.2/css/all.min.css'/>">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="<@s.url "/webjars/materializecss/1.0.0/css/materialize.min.css"/>">
<@style "colors"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@
<div class="truncate global-account-select-name text-default">${accountName}</div>

<div>
<#assign accountBudget = helpers.getAccountBudget()/>
<#assign accountBudget = helpers.getCurrentAccountBudget()/>
<#if accountBudget <= 0>
<div class="global-account-select-budget ${redTextColor}">${currencyService.getCurrencyString(accountBudget)}</div>
<#else>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<#macro scripts>
<#import "/spring.ftl" as s>
<script src="<@s.url '/webjars/jquery/3.6.4/jquery.min.js'/>"></script>
<script src="<@s.url '/webjars/jquery/3.7.1/jquery.min.js'/>"></script>
<script src="<@s.url '/webjars/materializecss/1.0.0/js/materialize.min.js'/>"></script>
<script src="<@s.url '/webjars/mousetrap/1.6.5/mousetrap.js'/>"></script>
<script>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
</div>

<#if importScripts>
<script src="<@s.url '/webjars/jquery/3.6.4/jquery.min.js'/>"></script>
<script src="<@s.url '/webjars/jquery/3.7.1/jquery.min.js'/>"></script>
<script src="<@s.url '/webjars/materializecss/1.0.0/js/materialize.min.js'/>"></script>
<script>
initSettingsContainer('${formName}', '${containerId}');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<i class="material-icons">repeat</i>
</#if>
<#if transaction.isTransfer()>
<i class="material-icons">swap_horiz</i>
<i class="material-icons tooltipped" data-position="bottom" data-tooltip="${transaction.getAccount().getName()} ➔ ${transaction.getTransferAccount().getName()}">swap_horiz</i>
</#if>

<#if !transaction.isRepeating() && !transaction.isTransfer()>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ private TestConstants()
// empty
}

public static final String POSTGRES_VERSION = "postgres:15.2";
public static final String POSTGRES_VERSION = "postgres:16.0";
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public void prepareTestInstance(TestContext testContext)
if(context instanceof final ConfigurableApplicationContext configurableApplicationContext)
{
FirefoxOptions options = new FirefoxOptions();
options.setHeadless(false);
options.addPreference("devtools.console.stdout.content", true);
driver = new FirefoxDriver(options);
driver.manage().window().maximize();
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ARG APP_DIR=/BudgetMaster
RUN mkdir -p $APP_DIR
RUN mkdir -p /root/.Deadlocker/BudgetMaster

COPY BudgetMasterServer/build/2.15.1/BudgetMasterServer-v2.15.1.jar /BudgetMaster/BudgetMaster.jar
COPY BudgetMasterServer/build/2.16.0/BudgetMasterServer-v2.16.0.jar /BudgetMaster/BudgetMaster.jar
COPY BudgetMasterServer/src/main/resources/config/templates/settings-docker.properties /root/.Deadlocker/BudgetMaster/settings.properties
RUN echo "server.port=9000" > ~/.Deadlocker/BudgetMaster/settings.properties

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Manage your monthly budget easily with BudgetMaster

- __start:__ 17.12.16
- __current release:__ v2.15.1 (44) from 18.07.23
- __current release:__ v2.16.0 (45) from 29.10.23

## Key Features
- Keep your data private - Host your own BudgetMaster server or use it in standalone mode. All data remains on your machines.
Expand Down
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>de.deadlocker8</groupId>
<artifactId>BudgetMaster</artifactId>
<packaging>pom</packaging>
<version>2.15.1</version>
<version>2.16.0</version>
<name>BudgetMaster</name>

<modules>
Expand Down Expand Up @@ -40,7 +40,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.1.1</version>
<version>3.1.5</version>
<relativePath/>
</parent>

Expand All @@ -51,13 +51,13 @@

<app.versionDate>${maven.build.timestamp}</app.versionDate>
<maven.build.timestamp.format>dd.MM.yy</maven.build.timestamp.format>
<app.versionCode>44</app.versionCode>
<app.versionCode>45</app.versionCode>
<app.author>Robert Goldmann</app.author>

<testcontainer.version>1.18.3</testcontainer.version>
<testcontainer.version>1.19.1</testcontainer.version>
<assertj-core.version>3.24.2</assertj-core.version>

<dependency-check-maven.version>8.3.1</dependency-check-maven.version>
<dependency-check-maven.version>8.4.2</dependency-check-maven.version>
</properties>

<dependencies>
Expand Down

0 comments on commit f8a15a0

Please sign in to comment.