diff --git a/components/kanban/Board.tsx b/components/kanban/Board.tsx index 4b745de..f417697 100644 --- a/components/kanban/Board.tsx +++ b/components/kanban/Board.tsx @@ -25,9 +25,10 @@ interface KanbanBoardProps { onUpdateTitle?: (taskId: string, newTitle: string) => Promise; onUpdateStatus?: (taskId: string, newStatus: TaskStatus) => Promise; loading?: boolean; + compactView?: boolean; } -export function KanbanBoard({ tasks, onCreateTask, onDeleteTask, onEditTask, onUpdateTitle, onUpdateStatus, loading = false }: KanbanBoardProps) { +export function KanbanBoard({ tasks, onCreateTask, onDeleteTask, onEditTask, onUpdateTitle, onUpdateStatus, loading = false, compactView = false }: KanbanBoardProps) { const [isCreateModalOpen, setIsCreateModalOpen] = useState(false); const [activeTask, setActiveTask] = useState(null); @@ -157,6 +158,7 @@ export function KanbanBoard({ tasks, onCreateTask, onDeleteTask, onEditTask, onU onDeleteTask={onDeleteTask} onEditTask={onEditTask} onUpdateTitle={onUpdateTitle} + compactView={compactView} /> ))} diff --git a/components/kanban/BoardContainer.tsx b/components/kanban/BoardContainer.tsx index fe69164..8b45c47 100644 --- a/components/kanban/BoardContainer.tsx +++ b/components/kanban/BoardContainer.tsx @@ -61,6 +61,7 @@ export function KanbanBoardContainer() { onUpdateTitle={handleUpdateTitle} onUpdateStatus={handleUpdateStatus} loading={loading} + compactView={kanbanFilters.compactView} /> Promise; onEditTask?: (task: Task) => void; onUpdateTitle?: (taskId: string, newTitle: string) => Promise; + compactView?: boolean; } -export function KanbanColumn({ id, title, color, tasks, onCreateTask, onDeleteTask, onEditTask, onUpdateTitle }: KanbanColumnProps) { +export function KanbanColumn({ id, title, color, tasks, onCreateTask, onDeleteTask, onEditTask, onUpdateTitle, compactView = false }: KanbanColumnProps) { const [showQuickAdd, setShowQuickAdd] = useState(false); // Configuration de la zone droppable @@ -125,7 +126,7 @@ export function KanbanColumn({ id, title, color, tasks, onCreateTask, onDeleteTa ) : ( tasks.map((task) => ( - + )) )} diff --git a/components/kanban/KanbanFilters.tsx b/components/kanban/KanbanFilters.tsx index 0559a3c..6309719 100644 --- a/components/kanban/KanbanFilters.tsx +++ b/components/kanban/KanbanFilters.tsx @@ -4,7 +4,6 @@ import { useState } from 'react'; import { TaskPriority } from '@/lib/types'; import { Button } from '@/components/ui/Button'; import { Input } from '@/components/ui/Input'; -import { TagDisplay } from '@/components/ui/TagDisplay'; import { useTasksContext } from '@/contexts/TasksContext'; export interface KanbanFilters { @@ -12,6 +11,7 @@ export interface KanbanFilters { tags?: string[]; priorities?: TaskPriority[]; showCompleted?: boolean; + compactView?: boolean; } interface KanbanFiltersProps { @@ -51,6 +51,13 @@ export function KanbanFilters({ filters, onFiltersChange }: KanbanFiltersProps) }); }; + const handleCompactViewToggle = () => { + onFiltersChange({ + ...filters, + compactView: !filters.compactView + }); + }; + const handleClearFilters = () => { onFiltersChange({}); }; @@ -79,6 +86,28 @@ export function KanbanFilters({ filters, onFiltersChange }: KanbanFiltersProps) /> + {/* Bouton vue compacte */} + + + )} + + {onDelete && ( + + )} + + {/* Indicateur de priorité compact */} +
+
+ + + ); + } + + // Vue détaillée : version complète return (