feat: add task editing and title updating features
- Introduced `onEditTask` and `onUpdateTitle` props in `KanbanBoard`, `KanbanColumn`, and `TaskCard` components for enhanced task management. - Implemented editing functionality in `TaskCard` to allow users to update task titles directly. - Added `EditTaskForm` in `KanbanBoardContainer` to handle task editing state and submission. - Updated `TasksService` to ensure all task properties can be modified during updates.
This commit is contained in:
@@ -13,9 +13,11 @@ interface KanbanColumnProps {
|
||||
tasks: Task[];
|
||||
onCreateTask?: (data: CreateTaskData) => Promise<void>;
|
||||
onDeleteTask?: (taskId: string) => Promise<void>;
|
||||
onEditTask?: (task: Task) => void;
|
||||
onUpdateTitle?: (taskId: string, newTitle: string) => Promise<void>;
|
||||
}
|
||||
|
||||
export function KanbanColumn({ id, title, color, tasks, onCreateTask, onDeleteTask }: KanbanColumnProps) {
|
||||
export function KanbanColumn({ id, title, color, tasks, onCreateTask, onDeleteTask, onEditTask, onUpdateTitle }: KanbanColumnProps) {
|
||||
const [showQuickAdd, setShowQuickAdd] = useState(false);
|
||||
// Couleurs tech/cyberpunk
|
||||
const techStyles = {
|
||||
@@ -111,7 +113,7 @@ export function KanbanColumn({ id, title, color, tasks, onCreateTask, onDeleteTa
|
||||
</div>
|
||||
) : (
|
||||
tasks.map((task) => (
|
||||
<TaskCard key={task.id} task={task} onDelete={onDeleteTask} />
|
||||
<TaskCard key={task.id} task={task} onDelete={onDeleteTask} onEdit={onEditTask} onUpdateTitle={onUpdateTitle} />
|
||||
))
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user