From 1fb4c8fc9809ce8b1425b7c341c0876fb79cddf3 Mon Sep 17 00:00:00 2001 From: MK13 Date: Sun, 6 Oct 2019 18:38:28 +0200 Subject: [PATCH] Mark accounts that are overspend That means that accounts with spending in the current greater than the average spending --- financer-web-client/src/main/resources/static/changelog.txt | 4 ++++ financer-web-client/src/main/resources/static/css/main.css | 6 +++++- .../main/resources/templates/account/accountOverview.html | 3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/financer-web-client/src/main/resources/static/changelog.txt b/financer-web-client/src/main/resources/static/changelog.txt index abba8be..9f3d7a6 100644 --- a/financer-web-client/src/main/resources/static/changelog.txt +++ b/financer-web-client/src/main/resources/static/changelog.txt @@ -1,3 +1,7 @@ +v23 -> v24: +- Mark accounts that are overspend, meaning their spending in the current period is greater than the average spending of + that account + v22 -> v23: - Make table headers sticky if the table scrolls diff --git a/financer-web-client/src/main/resources/static/css/main.css b/financer-web-client/src/main/resources/static/css/main.css index 824f611..9185376 100644 --- a/financer-web-client/src/main/resources/static/css/main.css +++ b/financer-web-client/src/main/resources/static/css/main.css @@ -28,7 +28,11 @@ } tr:hover { - background-color: lightgrey; + background-color: lightgrey; +} + +.overspend { + color: #ff6666; } @media only screen and (max-width: 450px) { diff --git a/financer-web-client/src/main/resources/templates/account/accountOverview.html b/financer-web-client/src/main/resources/templates/account/accountOverview.html index 0ff8494..512b146 100644 --- a/financer-web-client/src/main/resources/templates/account/accountOverview.html +++ b/financer-web-client/src/main/resources/templates/account/accountOverview.html @@ -77,7 +77,8 @@ + th:text="${#numbers.formatDecimal(acc.spendingCurrentExpensePeriod/100D, 1, 'DEFAULT', 2, 'DEFAULT') + currencySymbol}" + th:classappend="${acc.spendingCurrentExpensePeriod > acc.averageSpendingExpensePeriod} ? overspend"/>