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

SIMSBIOHUB-188 - Manage Animals #1171

Merged
merged 13 commits into from
Nov 16, 2023
Merged

SIMSBIOHUB-188 - Manage Animals #1171

merged 13 commits into from
Nov 16, 2023

Conversation

MacQSL
Copy link
Collaborator

@MacQSL MacQSL commented Nov 10, 2023

Links to Jira Tickets

-SIMSBIOHUB-188

Description of Changes

  • Overhauled the Edit Animal modal to be a full screen page instead. Accessed through the Manage Animals button on a survey.
  • Animals in this view appear listed in the sidebar by their alias. Clicking on one of these items opens an accordion to the various form sections.
  • Each form section has been adapted into a list of static cards. You can edit or delete cards from the relevant button icons. You can also add another card from the top of the page. Clicking the add or edit buttons brings up a form modal that will send a request on submission of the form.
  • Deleting any card should prompt a confirm delete modal.
  • Telemetry devices still work slightly differently than the rest of this page in that device and deployments get added together and deployments can be deleted but devices cannot. It's fairly consistently integrated otherwise.
  • Currently all sections hit the bulk endpoint in Critterbase (allows multiple sections to be added at once).

Testing Notes

  • should be able to create and edit all sections
  • Telemetry section is still in flux and will be moved out in upcoming telemetry UI tickets.

Copy link

codecov bot commented Nov 10, 2023

Codecov Report

Attention: 341 lines in your changes are missing coverage. Please review.

Comparison is base (ae0b035) 61.03% compared to head (8ab342a) 60.82%.

Files Patch % Lines
.../surveys/view/survey-animals/SurveyAnimalsPage.tsx 22.96% 103 Missing and 1 partial ⚠️
...animals/telemetry-device/DeploymentFormSection.tsx 2.00% 49 Missing ⚠️
...eys/view/survey-animals/AnimalSectionDataCards.tsx 44.61% 34 Missing and 2 partials ⚠️
...ures/surveys/view/survey-animals/AddEditAnimal.tsx 62.06% 18 Missing and 4 partials ⚠️
...ls/telemetry-device/TelemetryDeviceFormContent.tsx 4.34% 22 Missing ⚠️
...survey-animals/form-sections/LocationEntryForm.tsx 0.00% 21 Missing ⚠️
...survey-animals/form-sections/MarkingAnimalForm.tsx 35.00% 13 Missing ⚠️
...ey-animals/form-sections/MeasurementAnimalForm.tsx 52.00% 10 Missing and 2 partials ⚠️
...surveys/view/survey-animals/animal-form-helpers.ts 8.33% 4 Missing and 7 partials ⚠️
...survey-animals/form-sections/CaptureAnimalForm.tsx 12.50% 7 Missing ⚠️
... and 16 more
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1171      +/-   ##
==========================================
- Coverage   61.03%   60.82%   -0.22%     
==========================================
  Files         554      562       +8     
  Lines       16809    16962     +153     
  Branches     2587     2626      +39     
==========================================
+ Hits        10260    10317      +57     
- Misses       5869     5959      +90     
- Partials      680      686       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@curtisupshall curtisupshall changed the title Somsbiohub 188 2 SIMSBIOHUB-188 Nov 10, 2023
Copy link
Contributor

@curtisupshall curtisupshall left a comment

Choose a reason for hiding this comment

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

Code looks good! Had a handful of minor comments

@MacQSL MacQSL requested a review from jeznorth November 10, 2023 22:28
curtisupshall
curtisupshall previously approved these changes Nov 11, 2023
Copy link
Contributor

@curtisupshall curtisupshall left a comment

Choose a reason for hiding this comment

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

Had another look at the code. LGTM!

@al-rosenthal
Copy link
Contributor

I tested this locally and found a few small things:

  • when adding a measurement with a count I can trick the validator with 1 1 but it causes an API error
  • The event date in Mortality events is not marked as required but it validates as such

al-rosenthal
al-rosenthal previously approved these changes Nov 15, 2023
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.

looks good! 🐘

al-rosenthal
al-rosenthal previously approved these changes Nov 15, 2023
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.

🐊

curtisupshall
curtisupshall previously approved these changes Nov 15, 2023
@MacQSL MacQSL dismissed stale reviews from curtisupshall and al-rosenthal via 0c9c9d6 November 15, 2023 21:53
al-rosenthal
al-rosenthal previously approved these changes Nov 15, 2023
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.

🏈

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 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@curtisupshall curtisupshall changed the title SIMSBIOHUB-188 SIMSBIOHUB-188 - Manage Animals Nov 16, 2023
@NickPhura NickPhura merged commit 0612e40 into dev Nov 16, 2023
18 of 20 checks passed
@NickPhura NickPhura deleted the SOMSBIOHUB-188-2 branch December 9, 2023 00:05
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.

5 participants