feat: refactor IntegrationFilter for Kanban and Dashboard compatibility
- Updated IntegrationFilter to support both Kanban and Dashboard modes with new filters for manual tasks. - Replaced SourceQuickFilter with IntegrationFilter in Desktop and Mobile controls for consistency. - Removed deprecated SourceQuickFilter component to streamline codebase. - Enhanced task filtering logic to include pinned tasks and manual task visibility.
This commit is contained in:
@@ -70,7 +70,10 @@ export function TasksProvider({ children, initialTasks, initialTags, initialStat
|
||||
// Filtres TFS
|
||||
showTfsOnly: preferences.kanbanFilters.showTfsOnly || false,
|
||||
hideTfsTasks: preferences.kanbanFilters.hideTfsTasks || false,
|
||||
tfsProjects: preferences.kanbanFilters.tfsProjects || []
|
||||
tfsProjects: preferences.kanbanFilters.tfsProjects || [],
|
||||
// Filtres Manuel
|
||||
showManualOnly: preferences.kanbanFilters.showManualOnly || false,
|
||||
hideManualTasks: preferences.kanbanFilters.hideManualTasks || false
|
||||
}), [preferences]);
|
||||
|
||||
// Fonction pour mettre à jour les filtres avec persistance
|
||||
@@ -92,7 +95,10 @@ export function TasksProvider({ children, initialTasks, initialTags, initialStat
|
||||
// Filtres TFS
|
||||
showTfsOnly: newFilters.showTfsOnly,
|
||||
hideTfsTasks: newFilters.hideTfsTasks,
|
||||
tfsProjects: newFilters.tfsProjects
|
||||
tfsProjects: newFilters.tfsProjects,
|
||||
// Filtres Manuel
|
||||
showManualOnly: newFilters.showManualOnly,
|
||||
hideManualTasks: newFilters.hideManualTasks
|
||||
};
|
||||
|
||||
const viewPreferenceUpdates = {
|
||||
@@ -151,7 +157,9 @@ export function TasksProvider({ children, initialTasks, initialTags, initialStat
|
||||
(kanbanFilters.hideJiraTasks ? 1 : 0) +
|
||||
(kanbanFilters.tfsProjects?.filter(Boolean).length || 0) +
|
||||
(kanbanFilters.showTfsOnly ? 1 : 0) +
|
||||
(kanbanFilters.hideTfsTasks ? 1 : 0);
|
||||
(kanbanFilters.hideTfsTasks ? 1 : 0) +
|
||||
(kanbanFilters.showManualOnly ? 1 : 0) +
|
||||
(kanbanFilters.hideManualTasks ? 1 : 0);
|
||||
}, [kanbanFilters]);
|
||||
|
||||
// Filtrage et tri des tâches régulières (pas les épinglées)
|
||||
@@ -212,6 +220,13 @@ export function TasksProvider({ children, initialTasks, initialTags, initialStat
|
||||
filtered = filtered.filter(task => task.source !== 'tfs');
|
||||
}
|
||||
|
||||
// Filtres spécifiques Manuel
|
||||
if (kanbanFilters.showManualOnly) {
|
||||
filtered = filtered.filter(task => task.source === 'manual');
|
||||
} else if (kanbanFilters.hideManualTasks) {
|
||||
filtered = filtered.filter(task => task.source !== 'manual');
|
||||
}
|
||||
|
||||
// Filtre par projets TFS
|
||||
if (kanbanFilters.tfsProjects?.length) {
|
||||
filtered = filtered.filter(task =>
|
||||
|
||||
Reference in New Issue
Block a user