From 972d23abbdd9ab6ede27237e32b1be458ef146f1 Mon Sep 17 00:00:00 2001 From: Herculino Trotta Date: Mon, 17 Feb 2025 10:28:37 -0300 Subject: [PATCH] feat(insights:category-explorer): add empty message when there's no data or no category selected --- .../fragments/category_explorer/charts/account.html | 4 ++++ .../fragments/category_explorer/charts/currency.html | 4 ++++ .../insights/fragments/category_explorer/index.html | 7 ++++--- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/app/templates/insights/fragments/category_explorer/charts/account.html b/app/templates/insights/fragments/category_explorer/charts/account.html index 4f9c297..a3b91f3 100644 --- a/app/templates/insights/fragments/category_explorer/charts/account.html +++ b/app/templates/insights/fragments/category_explorer/charts/account.html @@ -1,4 +1,5 @@ {% load i18n %} +{% if account_data.labels %}
@@ -77,3 +78,6 @@ ); } +{% else %} + +{% endif %} diff --git a/app/templates/insights/fragments/category_explorer/charts/currency.html b/app/templates/insights/fragments/category_explorer/charts/currency.html index 16d5c9b..1622bb9 100644 --- a/app/templates/insights/fragments/category_explorer/charts/currency.html +++ b/app/templates/insights/fragments/category_explorer/charts/currency.html @@ -1,4 +1,5 @@ {% load i18n %} +{% if currency_data.labels %}
@@ -78,3 +79,6 @@ ); } +{% else %} + +{% endif %} diff --git a/app/templates/insights/fragments/category_explorer/index.html b/app/templates/insights/fragments/category_explorer/index.html index 650afe3..c131a02 100644 --- a/app/templates/insights/fragments/category_explorer/index.html +++ b/app/templates/insights/fragments/category_explorer/index.html @@ -8,26 +8,27 @@
-
+
{% trans "Income/Expense by Account" %}
+
-
+
{% trans "Income/Expense by Currency" %}
- +