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

Bctw 935 add critter form #1069

Merged
merged 144 commits into from
Aug 25, 2023
Merged

Bctw 935 add critter form #1069

merged 144 commits into from
Aug 25, 2023

Conversation

MacQSL
Copy link
Collaborator

@MacQSL MacQSL commented Aug 16, 2023

Pre Requirements

Links to Jira Tickets

Description of Changes

  • This PR contains the new Create Critter (Add Individuals) form.

  • Handles general animal details, captures, mortalities, measurements, markings, families

  • Inline validation using formik + additional critterbase requests to check if certain values are valid.

  • CbSelect component handles retrieving and displaying the critterbase related lookup values.

  • Some additional wrapper components / custom tooltips.

  • Storing all animal form related strings in i18n.ts

  • Mostly net-new components, with some additional refactoring of some duplicated components into a single component used in survey section.

  • Note: Does not currently support images or telemetry devices. Will make seperate tickets for those additional features.

Testing Notes

  • This PR contains changes from both myself (Mac) and Graham.
  • Currently this form is sending requests directly to Critterbase. In upcoming tickets this will change to using the SIM's API as a proxy.
  • Added a development button for displaying the form values / critterbase payload at the bottom of the form.
  • No UI tests written for this yet, waiting till we finalize the UI and talk standards for what to test in the UI etc.
  • No critters will display in the survey section after completion, waiting on additional mockups for what that looks like.

MacQSL and others added 30 commits July 18, 2023 10:27
…o critterbase calls, still need to implement automated signup
…mponents can now be added to form on button click
… calling cb api through hooks in the frontend. No more extra auth headers, now all done through keycloak JWT.
…rbase. Made a wrapper function for critterbase selects that uses existing Formik components
…der and the docker compose that we don't need anymore
@MacQSL
Copy link
Collaborator Author

MacQSL commented Aug 22, 2023

@NickPhura Resolved the issues in the above comment

@al-rosenthal
Copy link
Contributor

I tested this and noticed a few things:

SIMS is now on mui 5 so it would be great if the date pickers were updated to use the mui date picker. An example of these is in the project create form

When Moose, Grizzly or any of the Animal Families (Alces, Canidae, Ursidae ect) are selected under the Markings form, the Marking Type field is still works but the Marking Body Location is disable but still required by the form. If it isn't required for those animals it shouldn't block the form.

With Animal Measurements if Estimated Age is selected the value field specifies Value [kilogram's]

nit pick: In a capture event, if I toggle the UTM Coordinates it fills the coordinates with the center point of the map. Not sure if this is a bug or not just something I noticed

@MacQSL
Copy link
Collaborator Author

MacQSL commented Aug 22, 2023

@al-rosenthal

  • Good suggestion on the MUI date pickers i'll update those now

  • I'll update the marking section to prevent it from being blocked if no values exist.

"With Animal Measurements if Estimated Age is selected the value field specifies Value [kilogram's]"

  • Yea this part is kinda silly, its just referencing the measurement unit in the database. I set it to something temporarily [kilograms] in Critterbase dev for testing. Not an issue in production.

  • I think the utm corrdinate is just generating off of 0,0 this can probably be removed and leave black till they fill it in.

Update: All issues mentioned resolved.

@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

Copy link
Contributor

@al-rosenthal al-rosenthal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🌮

@MacQSL MacQSL merged commit 05d3902 into dev Aug 25, 2023
@MacQSL MacQSL deleted the BCTW-935-Add-Critter-Form branch August 25, 2023 23:53
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.

4 participants