-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merge Year report to productio #712
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
feat(report): enhance YearlyReportForm with existing data merge and error handling This update introduces the ability to prefill the YearlyReportForm with existing report data if available, enhancing user experience by reducing repetitive input. The change also includes improved error handling, displaying user-friendly messages when data fetching or submission encounters issues. Additionally, the commit refactors variable names for clarity and adjusts the form submission logic to include new publication settings based on user choices.
…ual reporting process
…nd implement YearlyReportRounds component
… and user experience
…accessibility checks
…ult genebank on mount
…parameter and update description handling; implement patch request in YearlyReportRounds component; add effect to check for active yearly report rounds in Navigation component
…ity logic based on active and manually activated rounds
…filter active report rounds in Navigation component
…on to allow all users; add error handling and logging
…ivacy handling Deleted the unused test for the GenebankReport class in test_database.py. Updated the remove_fields_by_privacy function in database.py to improve handling of field deletions based on privacy levels, ensuring that only relevant fields are removed when access levels are checked. Additionally, enabled full diff for debugging in the test class to aid in future development.
Replaced 'docker-compose' with 'docker compose' in the create_packages.yml workflow file to align with the latest Docker CLI standards. This change ensures consistency in command usage and improves compatibility with newer Docker versions.
Updated the create_packages.yml workflow file to enhance the readability of the docker login command by splitting it across multiple lines. This change improves clarity and maintainability of the workflow configuration.
…e_yearly_report function Enhanced the save_yearly_report function to include validation for herd existence and user permissions. Implemented error handling to return appropriate messages when the herd ID is invalid or the user lacks permission to modify the herd. This improves data integrity and user experience by ensuring only authorized modifications are allowed.
…unctionality Refactored the lint.yml workflow to enhance readability by adding spaces in branch lists and updating comments for clarity. Changed the checkout action to use version 4 and updated the super-linter action to version 7. Added permissions for better control over GitHub Actions status checks. These changes improve the maintainability and functionality of the linting process.
…a_access.py Refactored the data_access.py file to enhance code readability by applying consistent formatting, including line breaks and indentation adjustments. This change improves maintainability and clarity of the codebase, making it easier for developers to navigate and understand the logic within various functions.
…d improved Docker handling Updated the create_packages.yml workflow to trigger builds based on specific file changes in the frontend, app, R API, and Docker configurations. Introduced a paths-filter action to optimize the build process by only building and pushing images that have changed. Improved Docker login and image handling steps for clarity and consistency with the latest Docker CLI standards. This refactor enhances the maintainability and efficiency of the CI/CD pipeline.
…s.yml Updated the create_packages.yml workflow to change the Docker build target from 'frontend' to 'herdbook-frontend'. This adjustment ensures that the correct image is built based on the changes detected, improving the accuracy of the CI/CD pipeline.
…kages.yml Updated the create_packages.yml workflow to sanitize branch names by replacing slashes with hyphens when tagging Docker images. This change ensures that branch names are compatible with Docker tagging conventions, improving the reliability of image builds and pushes in the CI/CD pipeline.
…ok.py Refactored the herdbook.py file to enhance code readability by applying consistent formatting, including line breaks and indentation adjustments. This change improves maintainability and clarity of the codebase, making it easier for developers to navigate and understand the logic within various functions. Additionally, minor adjustments were made to logging messages for better clarity.
…formatting across multiple files Refactored herdbook.py, data_access.py, and test_database.py to enhance code readability by applying consistent formatting, including line breaks and indentation adjustments. These changes improve maintainability and clarity of the codebase, making it easier for developers to navigate and understand the logic within various functions. Additionally, minor adjustments were made to logging messages for better clarity.
…onent Updated the visibility condition in the Navigation component to ensure it only evaluates when there are yearly report rounds available. This change improves the logic by preventing unnecessary checks and enhances code clarity, making it easier to understand the conditions under which the navigation items are displayed.
…nd function Enhanced the update_yearly_report_round function in data_access.py to include the ability to update the report year based on user input. This addition improves the functionality of the yearly report management by allowing for more flexible data handling.
Updated the BatchRabbitUpdateForm and BatchRabbitUpdateStep components to improve the handling of rabbit updates by introducing a reportRound state and refining the validation checks for weight and body fat measurements. Enhanced the filtering logic to ensure only relevant rabbits are included in the yearly report, considering their tracking and measurement validity. Additionally, refactored the UI to utilize radio buttons for body fat selection, improving user experience. These changes aim to streamline the update process and enhance data integrity for rabbit records.
…inability This commit removes unnecessary console logging from the hasValidTrackingInPeriod and filterRabbitsForYearlyReport functions in the rabbit_filters module. The changes enhance code cleanliness and improve maintainability without altering the core functionality. These updates aim to streamline the codebase and improve performance by eliminating redundant debug statements.
…ling Removed the 'public' option from the FieldWithPermission component and enforced 'authenticated' privacy level for all fields in the HerdContactUpdateStep. Enhanced form handling by replacing FieldWithPermission with TextField, improving user experience with clearer validation messages and background color indications for required fields. These changes streamline the privacy management and improve the overall clarity of the contact update process.
…andling Added onUpdateStatus callback to BatchRabbitUpdateForm, BatchRabbitUpdateStep, HerdContactUpdateStep, SelectGenebankStep, SelectHerdStep, YearlyReportForm, YearlyReportMultiStepForm, and YearlyReportStep components to manage update statuses throughout the batch update process. Improved error handling and user feedback during updates, ensuring a smoother user experience. This enhancement allows for better tracking of the update process and improves overall functionality.
… conditions Enhanced the Navigation component by sorting active report rounds by report year in descending order. Updated the visibility conditions to utilize the sorted list, ensuring that the correct report round data is displayed based on user roles (admin or owner). This refactor improves the logic and clarity of the navigation functionality.
Changed the primary key column name from "disease_id" to "yearly_herd_report_id" in the YearlyHerdReport model to better reflect its purpose and improve clarity in the database schema. This update enhances the consistency of the data model without altering any core functionality.
Modified the SelectHerdStep component to ensure that the onUpdateStatus callback is called only after breeding data is successfully loaded. This change improves the clarity of the code by removing premature status updates and enhances error handling by marking the status as "error" when data fetching fails. The dependency array for the useEffect hook has also been updated to include onUpdateStatus, ensuring proper function execution. These updates aim to improve the overall reliability and maintainability of the component.
Added validation checks in the save_yearly_report function to ensure that the report round is active, the report year matches, and that no existing reports exist for the specified herd in the given year. These enhancements improve data integrity and prevent duplicate submissions, ensuring a more robust reporting process.
… for report submissions Improved date handling in the YearlyReportRounds component by adding validation checks to ensure both start and end dates are provided and that they are in the correct order. Implemented user messages to inform users of validation errors, enhancing the user experience and preventing incorrect submissions. These changes aim to improve data integrity and usability in the reporting process.
…alization Modified the Manage component to ensure genebank IDs are returned as strings for consistency. Enhanced the user topic initialization logic to account for user roles, ensuring that the correct default genebank is set based on admin and manager status. This improves the reliability of the component and enhances user experience by providing appropriate defaults.
- Added cache directory to the application configuration for better cache management. - Updated Docker Compose and production YAML files to include a cache volume for improved performance. - Enhanced the .gitignore file to exclude cache files. - Refactored the Restricted component in the frontend to improve user authorization handling and loading state management. These changes aim to streamline the application setup and enhance user experience by ensuring proper caching and authorization checks.
Yearly report module with admin interface
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.