feat(enhanced-kanban): implement real-time updates and task expansion handling
- Integrated socket event handlers for real-time updates in the enhanced Kanban board, improving task management responsiveness. - Added functionality to toggle task expansion for subtasks, enhancing user interaction with task details. - Updated state management to handle subtasks more effectively, including loading states and counts. - Refactored subtask fetching logic to utilize a dedicated API endpoint, streamlining data retrieval.
This commit is contained in:
@@ -92,6 +92,9 @@ const SubTaskTable = ({ subTasks, loadingSubTasks, refreshSubTasks, t }: SubTask
|
||||
if (task.parent_task_id) {
|
||||
refreshSubTasks();
|
||||
dispatch(updateSubtask({ sectionId: '', subtask: task, mode: 'add' }));
|
||||
|
||||
// Note: Enhanced kanban updates are now handled by the global socket handler
|
||||
// No need to dispatch here as it will be handled by useTaskSocketHandlers
|
||||
}
|
||||
});
|
||||
} catch (error) {
|
||||
@@ -109,6 +112,10 @@ const SubTaskTable = ({ subTasks, loadingSubTasks, refreshSubTasks, t }: SubTask
|
||||
try {
|
||||
await tasksApiService.deleteTask(taskId);
|
||||
dispatch(updateSubtask({ sectionId: '', subtask: { id: taskId, parent_task_id: selectedTaskId || '' }, mode: 'delete' }));
|
||||
|
||||
// Note: Enhanced kanban updates are now handled by the global socket handler
|
||||
// No need to dispatch here as it will be handled by useTaskSocketHandlers
|
||||
|
||||
refreshSubTasks();
|
||||
} catch (error) {
|
||||
logger.error('Error deleting subtask:', error);
|
||||
|
||||
Reference in New Issue
Block a user