refactor: update Kanban component imports and streamline filters

- Replaced direct imports of `KanbanFilters` with type imports from `@/lib/types` across multiple components for consistency.
- Simplified `KanbanPageClient` by integrating `DesktopControls` for better organization and readability, removing redundant desktop control code.
- Ensured `compactView` is explicitly typed as boolean in relevant components to enhance type safety.
This commit is contained in:
Julien Froidefond
2025-09-26 08:32:07 +02:00
parent c224c644b1
commit a5199a8302
11 changed files with 177 additions and 147 deletions

View File

@@ -6,7 +6,7 @@ import { useTags } from '@/hooks/useTags';
import { useUserPreferences } from './UserPreferencesContext';
import { Task, Tag, TaskStats, TaskStatus } from '@/lib/types';
import { CreateTaskData, TaskFilters } from '@/clients/tasks-client';
import { KanbanFilters } from '@/components/kanban/KanbanFilters';
import type { KanbanFilters } from '@/lib/types';
import { sortTasks, getSortOption, DEFAULT_SORT, createSortKey } from '@/lib/sort-config';
interface TasksContextType {
@@ -94,9 +94,9 @@ export function TasksProvider({ children, initialTasks, initialTags, initialStat
};
const viewPreferenceUpdates = {
compactView: newFilters.compactView,
swimlanesByTags: newFilters.swimlanesByTags,
swimlanesMode: newFilters.swimlanesMode
compactView: newFilters.compactView as boolean,
swimlanesByTags: newFilters.swimlanesByTags as boolean,
swimlanesMode: newFilters.swimlanesMode as 'tags' | 'priority'
};
// Mettre à jour via UserPreferencesContext