Closed matous-volf closed 1 week ago
The changes introduce a new feature for deleting projects within the ProjectForm
component, enhancing its existing capabilities for creating and editing projects. An asynchronous delete_project
function has been implemented in the server module, and error handling has been updated across various error modules. Additionally, the layout of the ProjectForm
has been adjusted for improved button alignment, and handling of optional project references has been refined.
File | Change Summary |
---|---|
src/components/project_form.rs |
Added functionality for deleting a project, including a new button and control flow modifications. Updated import statements and adjusted button layout. Improved handling of optional project references. |
src/errors/error.rs |
Introduced From trait implementation for converting diesel::result::Error to a custom Error type. Modified Display and FromStr implementations to use Self for improved readability. |
src/errors/project_error.rs |
Updated From and FromStr implementations to use Self instead of explicit type references, enhancing code clarity. |
src/errors/task_error.rs |
Modified From and FromStr implementations to use Self for type references, improving readability and consistency. |
src/server/projects.rs |
Added a new asynchronous function delete_project to handle project deletion by project_id , including error handling for database operations. |
migrations/2024-08-19-105140_create_tasks/up.sql |
Modified foreign key constraint on project_id in the tasks table to include ON DELETE SET NULL , preventing loss of task records when a project is deleted. |
BottomPanel
component's enhancements for task editing, sharing a context of form modifications.TaskList
component for task completion are relevant due to their involvement with asynchronous operations, similar to the new delete functionality in the ProjectForm
.Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Summary by CodeRabbit
New Features
Bug Fixes
Documentation
Style
Self
for type references in error handling implementations.Chores