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:
32
components/kanban/BoardContainer.tsx
Normal file
32
components/kanban/BoardContainer.tsx
Normal file
@@ -0,0 +1,32 @@
|
||||
'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}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user