feat(task-list): enhance task creation and UI components

- Improved the on_quick_task function to handle empty task names and emit null when no task is created, ensuring better user feedback.
- Updated SubtaskLoadingSkeleton and TaskRow components for improved styling and spacing, enhancing visual consistency.
- Introduced AddTaskRow component for streamlined task addition, integrating socket communication for real-time updates.
- Refactored TaskListV2 to optimize rendering and improve performance, including adjustments to column headers and task display.
- Added custom column components for enhanced task management flexibility and user interaction.
This commit is contained in:
chamiakJ
2025-07-06 14:51:22 +05:30
parent e3a9618dc9
commit a5291483f7
13 changed files with 1164 additions and 1128 deletions

View File

@@ -56,6 +56,8 @@ export async function on_quick_task(_io: Server, socket: Socket, data?: string)
const q = `SELECT create_quick_task($1) AS task;`;
const body = JSON.parse(data as string);
body.name = (body.name || "").trim();
body.priority_id = body.priority_id?.trim() || null;
body.status_id = body.status_id?.trim() || null;
@@ -111,10 +113,12 @@ export async function on_quick_task(_io: Server, socket: Socket, data?: string)
notifyProjectUpdates(socket, d.task.id);
}
} else {
// Empty task name, emit null to indicate no task was created
socket.emit(SocketEvents.QUICK_TASK.toString(), null);
}
} catch (error) {
log_error(error);
socket.emit(SocketEvents.QUICK_TASK.toString(), null);
}
socket.emit(SocketEvents.QUICK_TASK.toString(), null);
}