From 25aef9b2d50819696d4444aea48c27d684482be8 Mon Sep 17 00:00:00 2001 From: matthieu Date: Sat, 14 Mar 2026 09:05:35 +0100 Subject: [PATCH] feat : add dashboard with Chart.js charts and filters Implement the dashboard page with real data from the API: - KPI cards (hours, active tasks, total tasks, projects) - Charts: hours by day (line), hours by project (doughnut), tasks by status (doughnut), tasks by priority (bar), tasks by project (horizontal stacked bar) - Filters: period (week/month), project, user - Add chart.js and vue-chartjs dependencies - Add dashboard sidebar icon and translations Co-Authored-By: Claude Opus 4.6 --- frontend/i18n/locales/fr.json | 19 +- frontend/layouts/default.vue | 6 +- frontend/package-lock.json | 123 +++--- frontend/package.json | 2 + frontend/pages/index.vue | 667 ++++++++++++++++++++++++++++- frontend/plugins/chartjs.client.ts | 28 ++ 6 files changed, 776 insertions(+), 69 deletions(-) create mode 100644 frontend/plugins/chartjs.client.ts diff --git a/frontend/i18n/locales/fr.json b/frontend/i18n/locales/fr.json index 676860a..57372ca 100644 --- a/frontend/i18n/locales/fr.json +++ b/frontend/i18n/locales/fr.json @@ -111,8 +111,21 @@ "hoursWorked": "Heures travaillées", "inProgress": "En cours", "done": "Terminé", + "filters": { + "period": "Période", + "project": "Projet", + "user": "Utilisateur", + "allProjects": "Tous les projets", + "allUsers": "Tous les utilisateurs" + }, + "periods": { + "thisWeek": "Cette semaine", + "lastWeek": "Semaine dernière", + "thisMonth": "Ce mois", + "lastMonth": "Mois dernier" + }, "stats": { - "hoursThisWeek": "Heures cette semaine", + "hoursPeriod": "Heures sur la période", "myActiveTasks": "Mes tâches actives", "completed": "terminée(s)", "totalTasks": "Tâches totales", @@ -121,8 +134,8 @@ "users": "utilisateur(s)" }, "charts": { - "hoursByDay": "Heures par jour (semaine en cours)", - "hoursByProject": "Temps par projet (semaine en cours)", + "hoursByDay": "Heures par jour", + "hoursByProject": "Temps par projet", "tasksByStatus": "Tâches par statut", "tasksByPriority": "Tâches par priorité", "tasksByProject": "Tâches par projet" diff --git a/frontend/layouts/default.vue b/frontend/layouts/default.vue index 04ad910..1866c76 100644 --- a/frontend/layouts/default.vue +++ b/frontend/layouts/default.vue @@ -22,7 +22,7 @@