- 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.
33 lines
711 B
TypeScript
33 lines
711 B
TypeScript
'use client';
|
|
|
|
import { KanbanBoard } from './Board';
|
|
import { useTasks } from '@/hooks/useTasks';
|
|
import { Task } from '@/lib/types';
|
|
|
|
interface BoardContainerProps {
|
|
initialTasks: Task[];
|
|
initialStats: {
|
|
total: number;
|
|
completed: number;
|
|
inProgress: number;
|
|
todo: number;
|
|
completionRate: number;
|
|
};
|
|
}
|
|
|
|
export function KanbanBoardContainer({ initialTasks, initialStats }: BoardContainerProps) {
|
|
const { tasks, loading, createTask, deleteTask } = useTasks(
|
|
{ limit: 20 },
|
|
{ tasks: initialTasks, stats: initialStats }
|
|
);
|
|
|
|
return (
|
|
<KanbanBoard
|
|
tasks={tasks}
|
|
onCreateTask={createTask}
|
|
onDeleteTask={deleteTask}
|
|
loading={loading}
|
|
/>
|
|
);
|
|
}
|