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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user