feat: enhance Kanban functionality and update TODO.md

- Completed the creation and validation forms for tasks in the Kanban board, improving task management capabilities.
- Integrated new task creation and deletion functionalities in the `KanbanBoard` and `KanbanColumn` components.
- Added quick task addition feature in `Column` component for better user experience.
- Updated `TaskCard` to support task deletion with a new button.
- Marked several tasks as completed in `TODO.md` to reflect the progress on Kanban features.
- Updated TypeScript types to include 'manual' as a new task source.
This commit is contained in:
Julien Froidefond
2025-09-14 08:48:39 +02:00
parent 79f8035d18
commit 0b7e0edb2f
14 changed files with 1056 additions and 37 deletions

View File

@@ -6,9 +6,17 @@ import { Badge } from '@/components/ui/Badge';
interface TaskCardProps {
task: Task;
onDelete?: (taskId: string) => Promise<void>;
}
export function TaskCard({ task }: TaskCardProps) {
export function TaskCard({ task, onDelete }: TaskCardProps) {
const handleDelete = async (e: React.MouseEvent) => {
e.preventDefault();
e.stopPropagation();
if (onDelete) {
await onDelete(task.id);
}
};
// Extraire les emojis du titre pour les afficher comme tags visuels
const emojiRegex = /[\u{1F600}-\u{1F64F}]|[\u{1F300}-\u{1F5FF}]|[\u{1F680}-\u{1F6FF}]|[\u{1F1E0}-\u{1F1FF}]|[\u{2600}-\u{26FF}]|[\u{2700}-\u{27BF}]/gu;
const emojis = task.title.match(emojiRegex) || [];
@@ -33,12 +41,25 @@ export function TaskCard({ task }: TaskCardProps) {
{titleWithoutEmojis}
</h4>
{/* Indicateur de priorité tech */}
<div className={`w-2 h-2 rounded-full flex-shrink-0 mt-1 animate-pulse ${
task.priority === 'high' ? 'bg-red-400 shadow-red-400/50 shadow-sm' :
task.priority === 'medium' ? 'bg-yellow-400 shadow-yellow-400/50 shadow-sm' :
'bg-slate-500'
}`} />
<div className="flex items-center gap-2 flex-shrink-0">
{/* Bouton de suppression discret */}
{onDelete && (
<button
onClick={handleDelete}
className="opacity-0 group-hover:opacity-100 w-4 h-4 rounded-full bg-red-900/50 hover:bg-red-800/80 border border-red-500/30 hover:border-red-400/50 flex items-center justify-center transition-all duration-200 text-red-400 hover:text-red-300 text-xs"
title="Supprimer la tâche"
>
×
</button>
)}
{/* Indicateur de priorité tech */}
<div className={`w-2 h-2 rounded-full animate-pulse ${
task.priority === 'high' ? 'bg-red-400 shadow-red-400/50 shadow-sm' :
task.priority === 'medium' ? 'bg-yellow-400 shadow-yellow-400/50 shadow-sm' :
'bg-slate-500'
}`} />
</div>
</div>
{/* Description tech */}
@@ -84,6 +105,12 @@ export function TaskCard({ task }: TaskCardProps) {
<span className="text-slate-600 font-mono">--:--</span>
)}
{task.source !== 'manual' && task.source && (
<Badge variant="outline" size="sm">
{task.source}
</Badge>
)}
{task.completedAt && (
<span className="text-emerald-400 font-mono font-bold"> DONE</span>
)}