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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user