feat: update TaskCard component to include todosCount in padding logic

- Modified padding logic to account for `todosCount`, ensuring proper spacing when there are todos present.
- Updated footer visibility condition to include `todosCount`, enhancing the display of task metadata based on the presence of todos.
This commit is contained in:
Julien Froidefond
2025-09-30 10:19:34 +02:00
parent 9d63d31064
commit dc7b7c7616

View File

@@ -328,7 +328,7 @@ const TaskCard = forwardRef<HTMLDivElement, TaskCardProps>(
)}
{...props}
>
<div className={`px-3 pt-3 ${(dueDate || (source && source !== 'manual') || completedAt) ? 'pb-3' : 'pb-0'}`} style={sourceStyles}>
<div className={`px-3 pt-3 ${(dueDate || (source && source !== 'manual') || completedAt || (todosCount !== undefined && todosCount > 0)) ? 'pb-2' : 'pb-0'}`} style={sourceStyles}>
{/* Header */}
<div className="flex items-start gap-2 mb-2">
{/* Emojis */}
@@ -442,7 +442,7 @@ const TaskCard = forwardRef<HTMLDivElement, TaskCardProps>(
)}
{/* Footer avec métadonnées */}
{(dueDate || (source && source !== 'manual') || completedAt) && (
{(dueDate || (source && source !== 'manual') || completedAt || (todosCount !== undefined && todosCount > 0)) && (
<div className="pt-2 border-t border-[var(--border)]/50">
<div className={`flex items-center justify-between ${fontClasses.meta}`}>
{/* Date d'échéance */}