diff --git a/src/services/task-management/tasks.ts b/src/services/task-management/tasks.ts index 2a08ae1..dda499b 100644 --- a/src/services/task-management/tasks.ts +++ b/src/services/task-management/tasks.ts @@ -254,17 +254,19 @@ export class TasksService { * Récupère les statistiques des tâches */ async getTaskStats() { - const [total, completed, inProgress, todo, backlog, cancelled, freeze, archived] = await Promise.all([ + const [total, done, archived, inProgress, todo, backlog, cancelled, freeze] = await Promise.all([ prisma.task.count(), prisma.task.count({ where: { status: 'done' } }), + prisma.task.count({ where: { status: 'archived' } }), prisma.task.count({ where: { status: 'in_progress' } }), prisma.task.count({ where: { status: 'todo' } }), prisma.task.count({ where: { status: 'backlog' } }), prisma.task.count({ where: { status: 'cancelled' } }), - prisma.task.count({ where: { status: 'freeze' } }), - prisma.task.count({ where: { status: 'archived' } }) + prisma.task.count({ where: { status: 'freeze' } }) ]); + const completed = done + archived; // Terminées = Done + Archived + return { total, completed,