feat: complete tag management and UI integration
- Marked multiple tasks as completed in TODO.md related to tag management features. - Replaced manual tag input with `TagInput` component in `CreateTaskForm`, `EditTaskForm`, and `QuickAddTask` for better UX. - Updated `TaskCard` to display tags using `TagDisplay` with color support. - Enhanced `TasksService` to manage task-tag relationships with CRUD operations. - Integrated tag management into the global context for better accessibility across components.
This commit is contained in:
@@ -48,6 +48,13 @@ async function resetDatabase() {
|
||||
console.log('');
|
||||
console.log('📋 Tâches restantes:');
|
||||
const remainingTasks = await prisma.task.findMany({
|
||||
include: {
|
||||
taskTags: {
|
||||
include: {
|
||||
tag: true
|
||||
}
|
||||
}
|
||||
},
|
||||
orderBy: { createdAt: 'desc' }
|
||||
});
|
||||
|
||||
@@ -59,7 +66,9 @@ async function resetDatabase() {
|
||||
'cancelled': '❌'
|
||||
}[task.status] || '❓';
|
||||
|
||||
const tags = JSON.parse(task.tagsJson || '[]');
|
||||
// Utiliser les relations TaskTag
|
||||
const tags = task.taskTags ? task.taskTags.map(tt => tt.tag.name) : [];
|
||||
|
||||
const tagsStr = tags.length > 0 ? ` [${tags.join(', ')}]` : '';
|
||||
|
||||
console.log(` ${index + 1}. ${statusEmoji} ${task.title}${tagsStr}`);
|
||||
|
||||
Reference in New Issue
Block a user