From d8ec62c239b379e0297976d90f3c8d3275874420 Mon Sep 17 00:00:00 2001 From: Simon Vieille Date: Sat, 8 Feb 2025 15:58:58 +0100 Subject: [PATCH] feat(dashboard): add customization --- Makefile | 2 +- frontend/js/chart/monthThreshold.js | 7 +- frontend/js/components/Filters.vue | 14 +- frontend/js/components/dashboard/Capital.vue | 2 + .../js/components/dashboard/Distribution.vue | 2 +- frontend/js/components/dashboard/Filters.vue | 2 +- .../components/dashboard/MonthThresholds.vue | 9 +- frontend/js/lib/storage.js | 8 +- frontend/js/views/CategoriesView.vue | 15 +- frontend/js/views/DashboardView.vue | 171 ++++++++++++------ frontend/js/views/FilesView.vue | 9 +- frontend/js/views/SavingAccountsView.vue | 5 +- frontend/js/views/TransactionsView.vue | 5 +- frontend/js/views/UsersView.vue | 7 +- package-lock.json | 18 ++ package.json | 1 + 16 files changed, 192 insertions(+), 85 deletions(-) diff --git a/Makefile b/Makefile index 444c1e6..552106d 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ tpl: TEMPL_EXPERIMENT=rawgo templ generate lint: - npm run lint + npm run lint || true npm run format .PHONY: diff --git a/frontend/js/chart/monthThreshold.js b/frontend/js/chart/monthThreshold.js index 6a7cb29..6f01e4b 100644 --- a/frontend/js/chart/monthThreshold.js +++ b/frontend/js/chart/monthThreshold.js @@ -41,7 +41,12 @@ const compute = (transactions, cats, dateFrom, dateTo) => { datas[date] = {} } - if (!Object.prototype.hasOwnProperty.call(datas[date], value.category.id.toString())) { + if ( + !Object.prototype.hasOwnProperty.call( + datas[date], + value.category.id.toString(), + ) + ) { datas[date][value.category.id.toString()] = 0 } diff --git a/frontend/js/components/Filters.vue b/frontend/js/components/Filters.vue index 4794a7b..d32f5a8 100644 --- a/frontend/js/components/Filters.vue +++ b/frontend/js/components/Filters.vue @@ -2,7 +2,7 @@
@@ -31,14 +33,18 @@ />
+
Aucune donnée
diff --git a/frontend/js/components/dashboard/Distribution.vue b/frontend/js/components/dashboard/Distribution.vue index 001f63f..90bc4fe 100644 --- a/frontend/js/components/dashboard/Distribution.vue +++ b/frontend/js/components/dashboard/Distribution.vue @@ -5,7 +5,7 @@
diff --git a/frontend/js/components/dashboard/Filters.vue b/frontend/js/components/dashboard/Filters.vue index 9f46e27..2ec336d 100644 --- a/frontend/js/components/dashboard/Filters.vue +++ b/frontend/js/components/dashboard/Filters.vue @@ -9,7 +9,7 @@ diff --git a/frontend/js/components/dashboard/MonthThresholds.vue b/frontend/js/components/dashboard/MonthThresholds.vue index db69779..dbbb56c 100644 --- a/frontend/js/components/dashboard/MonthThresholds.vue +++ b/frontend/js/components/dashboard/MonthThresholds.vue @@ -60,14 +60,7 @@ + + diff --git a/frontend/js/views/FilesView.vue b/frontend/js/views/FilesView.vue index 20ddbcb..e9f42f3 100644 --- a/frontend/js/views/FilesView.vue +++ b/frontend/js/views/FilesView.vue @@ -33,7 +33,7 @@
@@ -55,7 +55,10 @@ {{ item.name }}
-
+
- + - + - +