fix: update KanbanFilters to use regularTasks instead of tasks

- Changed `tasks` to `regularTasks` in `KanbanFilters` for accurate task counting.
- Updated priority and tag count calculations to reflect the new `regularTasks` prop, ensuring filters work with non-pinned tasks.
- Adjusted `TasksContext` to provide `regularTasks`, enhancing task management clarity.
This commit is contained in:
Julien Froidefond
2025-09-15 08:44:23 +02:00
parent 165d414fef
commit bfe542bf10
2 changed files with 8 additions and 6 deletions

View File

@@ -10,7 +10,8 @@ import { KanbanFilters } from '@/components/kanban/KanbanFilters';
import { sortTasks, getSortOption, DEFAULT_SORT, createSortKey } from '@/lib/sort-config';
interface TasksContextType {
tasks: Task[];
tasks: Task[]; // Toutes les tâches
regularTasks: Task[]; // Tâches sans les épinglées (pour Kanban)
stats: {
total: number;
completed: number;
@@ -175,6 +176,7 @@ export function TasksProvider({ children, initialTasks, initialStats, initialTag
const contextValue: TasksContextType = {
...tasksState,
regularTasks,
tags,
tagsLoading,
tagsError,