Skip to content
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

Hotfixes for breedform and yearlyreport auto herd selection #716

Merged
merged 4 commits into from
Jan 4, 2025

Conversation

jhagberg
Copy link
Collaborator

@jhagberg jhagberg commented Jan 4, 2025

No description provided.

…nagement

- Changed initial state of showBirthForm from true to false for better user experience.
- Enhanced autoFillBreedDate function to include robust date parsing and validation, ensuring accurate calculation of breed date from birth date.
- Updated logic in useEffect to handle cases where breed_date is null or empty, improving the reliability of the form's auto-fill feature.

These changes aim to streamline the breeding form functionality and enhance the overall user experience by ensuring accurate date handling.
…tep and SelectHerdStep components

- Updated the user role checks to handle optional chaining for manager roles, ensuring more robust access control.
- Refactored herd options initialization in SelectHerdStep to streamline the logic for displaying herds based on user roles (admin, manager, owner).
- Enhanced the rendering logic to improve user experience, particularly for users with a single herd, by auto-selecting the herd when applicable.
- Improved the overall structure and readability of the code by organizing callback functions and effects more clearly.

These changes aim to enhance the user experience and maintainability of the components by ensuring accurate role-based access and streamlined herd selection.
- Removed unused imports and cleaned up code by eliminating commented-out sections, enhancing readability.
- Streamlined user role checks and herd selection logic to ensure accurate display of herds based on user roles (admin, manager, owner).
- Improved rendering logic for breeding tables, including better handling of empty states and user prompts.
- Enhanced the dialog for adding new breedings, ensuring a more intuitive user experience.

These changes aim to enhance maintainability and user experience within the SelectHerdStep component.
…for improved functionality and user experience

- Added optional handleNext prop to SelectGenebankStep to facilitate navigation after genebank selection.
- Streamlined user role checks in YearlyReportMultiStepForm, enhancing clarity and ensuring accurate step progression based on user roles (admin, manager).
- Implemented auto-selection of genebank for non-admin/non-manager users, improving user experience by reducing manual input.
- Removed unnecessary comments and debug logs to enhance code readability and maintainability.

These changes aim to improve the overall functionality and user experience within the affected components.
@jhagberg jhagberg merged commit 05658ce into production Jan 4, 2025
0 of 3 checks passed
@jhagberg jhagberg deleted the hotfix/herdselect branch January 4, 2025 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant