Closed matous-volf closed 2 months ago
The changes across multiple components in the Rust application enhance task and project management functionalities. Key modifications include the introduction of state management for editing tasks, dynamic date assignments in category inputs, and refined error handling. The codebase now supports simultaneous editing of tasks and projects, improves readability, and updates error handling mechanisms for better clarity and extensibility.
Files | Change Summary |
---|---|
src/components/bottom_panel.rs |
Introduced task_being_edited for managing task editing state, refined use_effect logic, and updated TaskForm rendering logic. |
src/components/category_input.rs |
Changed static date assignment to dynamically use the current date in Category::Calendar . |
src/components/form_open_button.rs |
Added task_being_edited context variable to manage task state alongside project state. |
src/components/layout.rs |
Added context provider for task_being_edited , enhancing responsiveness to user interactions. |
src/components/pages/projects_page.rs |
Simplified conditional expressions and streamlined onclick event handler for better readability. |
src/components/project_form.rs |
Streamlined handling of project parameter during submission and improved control flow with if let construct. |
src/components/task_form.rs |
Added task: Option<Task> parameter for handling task creation and editing, updated submission logic accordingly. |
src/components/task_list.rs |
Introduced task_being_edited for tracking editing state and modified rendering logic for conditional styling. |
src/errors/mod.rs |
Renamed error handling modules for clarity: project_create_error to project_error and task_create_error to task_error . |
src/errors/project_error.rs |
Added From trait implementation for ProjectError to convert diesel::result::Error . |
src/errors/task_error.rs |
Refactored from TaskCreateError to TaskError , added new From implementations for validation and database errors. |
src/server/projects.rs |
Refined error handling in create_project and edit_project functions to capture specific database errors. |
src/server/tasks.rs |
Updated error handling to use TaskError , added new edit_task function for modifying existing tasks. |
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