feat: reintroduce ColumnVisibilityToggle in KanbanFilters
- Moved `ColumnVisibilityToggle` from `Board` and `SwimlanesBase` to `KanbanFilters` for better accessibility. - Updated `KanbanFilters` to manage column visibility, enhancing user control over displayed statuses. - Cleaned up unused imports and adjusted layout for improved UI consistency.
This commit is contained in:
@@ -8,6 +8,8 @@ import { Input } from '@/components/ui/Input';
|
||||
import { useTasksContext } from '@/contexts/TasksContext';
|
||||
import { getAllPriorities, getPriorityColorHex } from '@/lib/status-config';
|
||||
import { SORT_OPTIONS } from '@/lib/sort-config';
|
||||
import { useColumnVisibility } from '@/hooks/useColumnVisibility';
|
||||
import { ColumnVisibilityToggle } from './ColumnVisibilityToggle';
|
||||
|
||||
export interface KanbanFilters {
|
||||
search?: string;
|
||||
@@ -28,6 +30,7 @@ interface KanbanFiltersProps {
|
||||
|
||||
export function KanbanFilters({ filters, onFiltersChange }: KanbanFiltersProps) {
|
||||
const { tags: availableTags, regularTasks } = useTasksContext();
|
||||
const { hiddenStatuses, toggleStatusVisibility } = useColumnVisibility();
|
||||
const [isExpanded, setIsExpanded] = useState(false);
|
||||
const [isSortExpanded, setIsSortExpanded] = useState(false);
|
||||
const [isSwimlaneModeExpanded, setIsSwimlaneModeExpanded] = useState(false);
|
||||
@@ -385,6 +388,16 @@ export function KanbanFilters({ filters, onFiltersChange }: KanbanFiltersProps)
|
||||
)}
|
||||
</div>
|
||||
|
||||
{/* Visibilité des colonnes */}
|
||||
<div className="col-span-full border-t border-slate-700/50 pt-6 mt-4">
|
||||
<ColumnVisibilityToggle
|
||||
hiddenStatuses={hiddenStatuses}
|
||||
onToggleStatus={toggleStatusVisibility}
|
||||
tasks={regularTasks}
|
||||
className="text-xs"
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Résumé des filtres actifs */}
|
||||
{activeFiltersCount > 0 && (
|
||||
<div className="bg-slate-800/30 rounded-lg p-3 border border-slate-700/50">
|
||||
|
||||
Reference in New Issue
Block a user