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

Assign multiple survey blocks and stratums to a sampling site #1217

Merged
merged 58 commits into from
Mar 5, 2024

Conversation

mauberti-bc
Copy link
Collaborator

Links to Jira Tickets

None

Description of Changes

  • New DB table joining sampling sites to survey blocks
  • New repository and service for handling sampling site blocks
  • Updates to sample location service to include sampling site blocks
  • New form components on the Sampling Site form to manage sample blocks
  • Todo: Unit tests

Testing Notes

  • Should be able to add, update, and delete sampling blocks when editing a Sampling Site

@mauberti-bc mauberti-bc added the Early Feedback Welcome PR is not finished, but early review feedback is welcomed label Feb 20, 2024
api/src/repositories/sample-location-repository.ts Outdated Show resolved Hide resolved
api/src/repositories/sample-location-repository.ts Outdated Show resolved Hide resolved
api/src/repositories/sample-location-repository.ts Outdated Show resolved Hide resolved
api/src/repositories/sample-blocks-repository.ts Outdated Show resolved Hide resolved
api/src/services/sample-block-service.ts Outdated Show resolved Hide resolved
api/src/repositories/sample-blocks-repository.ts Outdated Show resolved Hide resolved
api/src/repositories/sample-blocks-repository.ts Outdated Show resolved Hide resolved
api/src/services/sample-block-service.ts Outdated Show resolved Hide resolved
NickPhura
NickPhura previously approved these changes Feb 23, 2024
@NickPhura NickPhura self-requested a review February 23, 2024 00:43
@codecov-commenter
Copy link

codecov-commenter commented Feb 26, 2024

Codecov Report

Attention: Patch coverage is 41.61290% with 181 lines in your changes are missing coverage. Please review.

Project coverage is 55.12%. Comparing base (c96c865) to head (45e771c).

Files Patch % Lines
...ns/sampling-sites/components/SamplingBlockForm.tsx 0.00% 28 Missing ⚠️
...ng-sites/edit/components/SamplingBlockEditForm.tsx 0.00% 28 Missing ⚠️
...-sites/edit/components/SamplingStratumEditForm.tsx 0.00% 28 Missing ⚠️
.../sampling-sites/components/SamplingStratumForm.tsx 0.00% 26 Missing ⚠️
.../features/surveys/components/SurveyStratumForm.tsx 8.33% 11 Missing ⚠️
api/src/repositories/sample-stratums-repository.ts 71.42% 10 Missing ⚠️
...rc/features/surveys/components/SurveyBlockForm.tsx 0.00% 10 Missing ⚠️
api/src/services/sample-stratum-service.ts 61.11% 7 Missing ⚠️
api/src/services/sample-block-service.ts 64.70% 6 Missing ⚠️
...ing-sites/components/SamplingSiteGroupingsForm.tsx 0.00% 6 Missing ⚠️
... and 9 more
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1217      +/-   ##
==========================================
- Coverage   55.35%   55.12%   -0.24%     
==========================================
  Files         592      603      +11     
  Lines       17985    18272     +287     
  Branches     2772     2810      +38     
==========================================
+ Hits         9956    10072     +116     
- Misses       7368     7538     +170     
- Partials      661      662       +1     

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

@mauberti-bc mauberti-bc changed the title Assign multiple survey blocks to a sampling site Assign multiple survey blocks and stratums to a sampling site Feb 27, 2024
@al-rosenthal
Copy link
Contributor

I was able to add block and stratum to the sampling site but I'm unable to remove the stratum. Visually it disappears but opening up the edit page for the sampling site the stratum persists

Copy link

sonarqubecloud bot commented Mar 5, 2024

Quality Gate Failed Quality Gate failed

Failed conditions
11.8% Duplication on New Code (required ≤ 3%)
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint

Copy link
Collaborator

@NickPhura NickPhura left a comment

Choose a reason for hiding this comment

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

Ran locally, seems to work as expected.

🗺️

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.

@al-rosenthal al-rosenthal merged commit a125a7d into dev Mar 5, 2024
16 of 17 checks passed
@al-rosenthal al-rosenthal deleted the sample-site-blocks branch March 5, 2024 20:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready For Review PR is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants