0)) ? 'pb-2' : 'pb-0'}`} style={sourceStyles}>
{/* Header */}
{/* Emojis */}
{displayEmojis.length > 0 && (
{displayEmojis.slice(0, 2).map((emoji, index) => (
{emoji}
))}
)}
{/* Titre ou input d'édition */}
{isEditingTitle ? (
setEditTitle(e.target.value)}
onKeyDown={handleTitleKeyPress}
onBlur={handleTitleSave}
autoFocus
className="flex-1 bg-transparent border-none outline-none text-[var(--foreground)] font-mono text-sm font-medium leading-tight"
/>
) : (
{titleWithoutEmojis}
)}
{/* Actions */}
{!isEditingTitle && onEdit && (
)}
{!isEditingTitle && onDelete && (
)}
{/* Indicateur de priorité */}
{/* Description */}
{description && (
{description}
)}
{/* Tags avec couleurs personnalisées */}
{tags.length > 0 && (
{tags.slice(0, 3).map((tag, index) => {
const tagConfig = availableTags.find(t => t.name === tag);
return (
{tag}
);
})}
{tags.length > 3 && (
+{tags.length - 3}
)}
)}
{/* Footer avec métadonnées */}
{(dueDate || (source && source !== 'manual') || completedAt || (todosCount !== undefined && todosCount > 0)) && (
{/* Date d'échéance */}
{dueDate ? (
⏰
{formatDateForDisplay(dueDate, 'DISPLAY_MEDIUM')}
) : (
)}
{/* Badges source */}
{/* Jira */}
{source === 'jira' && jiraKey && (
jiraConfig?.baseUrl ? (
{jiraKey}
) : (
{jiraKey}
)
)}
{/* TFS */}
{source === 'tfs' && tfsPullRequestId && tfsProject && tfsRepository && (
tfsConfig?.organizationUrl ? (
PR-{tfsPullRequestId}
) : (
PR-{tfsPullRequestId}
)
)}
{/* Projets */}
{jiraProject && (
{jiraProject}
)}
{tfsRepository && (
{tfsRepository}
)}
{/* Type Jira */}
{jiraType && (
{jiraType}
)}
{/* Statut terminé avec date de résolution */}
{completedAt && (
✓
{formatDateForDisplay(completedAt, 'DISPLAY_SHORT')}
)}
{/* Nombre de todos reliés */}
{todosCount !== undefined && todosCount > 0 && (
📝 {todosCount}
)}
)}
{/* Contenu personnalisé */}
{children}