feat: add todosCount to RecentTasks and TaskCard components

- Included `todosCount` prop in `RecentTasks` and `TaskCard` for better task management visibility.
- Updated `TaskCard` UI to display the number of related todos, enhancing user interaction.
- Modified `Task` interface and `TasksService` to support todos count retrieval from the database.
- Added sample `todosCount` values in `UIShowcaseClient` for demonstration purposes.
This commit is contained in:
Julien Froidefond
2025-09-29 21:30:24 +02:00
parent 74c658b3e7
commit ec6c51f9ec
6 changed files with 38 additions and 1 deletions

View File

@@ -28,6 +28,9 @@ interface TaskCardProps extends HTMLAttributes<HTMLDivElement> {
tfsProject?: string;
tfsRepository?: string;
// Task ID for todos count
todosCount?: number;
// Interactive
isDragging?: boolean;
isPending?: boolean;
@@ -62,6 +65,7 @@ const TaskCard = forwardRef<HTMLDivElement, TaskCardProps>(
tfsPullRequestId,
tfsProject,
tfsRepository,
todosCount,
isDragging = false,
isPending = false,
onEdit,
@@ -519,6 +523,13 @@ const TaskCard = forwardRef<HTMLDivElement, TaskCardProps>(
DONE
</span>
)}
{/* Nombre de todos reliés */}
{todosCount !== undefined && todosCount > 0 && (
<Badge variant="outline" size="sm" className="text-cyan-400 border-cyan-400/30">
📝 {todosCount}
</Badge>
)}
</div>
</div>
</div>