feat: add filter for completed tasks in the last 7 days
- Implemented `showCompletedLast7Days` filter in `KanbanFilters` to toggle visibility of tasks completed in the last week. - Updated `GeneralFilters` to include a new filter chip for the completed tasks toggle. - Enhanced `TasksProvider` to filter tasks based on the new criteria, improving task management capabilities. - Adjusted `FilterSummary` to display the active filter status for better user feedback.
This commit is contained in:
@@ -9,6 +9,7 @@ interface FilterSummaryProps {
|
||||
priorities?: string[];
|
||||
tags?: string[];
|
||||
showWithDueDate?: boolean;
|
||||
showCompletedLast7Days?: boolean;
|
||||
showJiraOnly?: boolean;
|
||||
hideJiraTasks?: boolean;
|
||||
jiraProjects?: string[];
|
||||
@@ -72,6 +73,15 @@ export function FilterSummary({
|
||||
});
|
||||
}
|
||||
|
||||
// Affichage complété les 7 derniers jours
|
||||
if (filters.showCompletedLast7Days) {
|
||||
filterItems.push({
|
||||
label: 'Affichage',
|
||||
value: 'Complété les 7 derniers jours',
|
||||
variant: 'success'
|
||||
});
|
||||
}
|
||||
|
||||
// Jira
|
||||
if (filters.showJiraOnly) {
|
||||
filterItems.push({
|
||||
|
||||
@@ -517,10 +517,11 @@ const TaskCard = forwardRef<HTMLDivElement, TaskCardProps>(
|
||||
</Badge>
|
||||
)}
|
||||
|
||||
{/* Statut terminé */}
|
||||
{/* Statut terminé avec date de résolution */}
|
||||
{completedAt && (
|
||||
<span className="text-emerald-400 font-mono font-bold">
|
||||
✓ DONE
|
||||
<span className="text-emerald-400 font-mono font-bold flex items-center gap-1">
|
||||
<span>✓</span>
|
||||
<span>{formatDateForDisplay(completedAt, 'DISPLAY_SHORT')}</span>
|
||||
</span>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user