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-647: Create Observations Page #1444

Open
wants to merge 28 commits into
base: dev
Choose a base branch
from
Open

Conversation

mauberti-bc
Copy link
Collaborator

@mauberti-bc mauberti-bc commented Dec 3, 2024

Links to Jira Tickets

  • {Include a link to all applicable Jira tickets}

Description of Changes

  • Allows observations to be added from a dedicated page

Testing Notes

  • {List any relevant testing considerations, necessary pre-reqs, and areas of the app to focus on. Specifically, include anything that will help the reviewers of this PR verify the code is functioning as expected.}

TODO

  • Check frontend tests
  • Check backend tests

@mauberti-bc mauberti-bc added the Not Ready For Review Addressing feedback and/or refactoring label Dec 3, 2024
Copy link

codecov bot commented Dec 3, 2024

Codecov Report

Attention: Patch coverage is 20.11776% with 814 lines in your changes missing coverage. Please review.

Project coverage is 45.40%. Comparing base (5416b2d) to head (51dcadd).

Files with missing lines Patch % Lines
...nts/sampling/hooks/useSamplingInformationCache.tsx 0.00% 76 Missing ⚠️
...veys/observations/create/CreateObservationPage.tsx 0.00% 69 Missing ⚠️
...ents/environments/environment/EnvironmentField.tsx 0.00% 69 Missing ⚠️
...onents/sampling/components/SamplingPeriodField.tsx 0.00% 57 Missing ⚠️
...nents/sampling/components/MethodTechniqueField.tsx 0.00% 55 Missing ⚠️
...mponents/sampling/components/SamplingSiteField.tsx 0.00% 45 Missing ⚠️
...s/observation-repository/observation-repository.ts 30.61% 32 Missing and 2 partials ⚠️
...i/src/repositories/observation-repository/utils.ts 60.25% 31 Missing ⚠️
...ations/form/components/subcounts/SubcountsForm.tsx 0.00% 29 Missing ⚠️
...ures/surveys/observations/form/ObservationForm.tsx 0.00% 28 Missing ⚠️
... and 51 more
Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1444      +/-   ##
==========================================
- Coverage   45.92%   45.40%   -0.52%     
==========================================
  Files         907      946      +39     
  Lines       23537    24274     +737     
  Branches     3492     3637     +145     
==========================================
+ Hits        10809    11022     +213     
- Misses      12136    12645     +509     
- Partials      592      607      +15     

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

@mauberti-bc mauberti-bc added Early Feedback Welcome PR is not finished, but early review feedback is welcomed and removed Not Ready For Review Addressing feedback and/or refactoring labels Jan 8, 2025
@mauberti-bc mauberti-bc added Ready For Review PR is ready for review and removed Early Feedback Welcome PR is not finished, but early review feedback is welcomed labels Jan 16, 2025
@NickPhura
Copy link
Collaborator

I pushed up a few misc changes. Mostly just some component cleanup and addressing a few react dependency complaints, etc.

@NickPhura NickPhura added Early Feedback Welcome PR is not finished, but early review feedback is welcomed and removed Ready For Review PR is ready for review labels Jan 20, 2025
mauberti-bc and others added 2 commits January 21, 2025 10:06
wip

wip: create location and date sections on form

wip: style subcount form

wip: adding measurements to subcounts

add dual autocomplete

subcount form

subcount table on create observation page

fix measurement search

show measurement options in subcount table on create observation page

wip: formik validation

add subcount sign placeholder to create request

wip: environments incorrectly formatted in handlesubmit

fix incorrect key

fix environments on create observations page

fix measurement interfaces

SIMSBIOHUB-659: Add Pagination to System Alerts on Admin Page (#1459)

Add Pagination to System Alerts on Admin Page

---------

Co-authored-by: Nick Phura <[email protected]>

Update CSV Error Import Dialog Styling (#1456)

- update csv import error dialog
- replace failure snackbar & add frontend pagination to csv import errors

BugFix: Fix Type for Capture Attachments (#1460)

- modifying critter index file

---------

Co-authored-by: Macgregor Aubertin-Young <[email protected]>
Co-authored-by: Macgregor Aubertin-Young <[email protected]>

BugFix: Method Attributes SQL (#1462)

- fix sql

Added DualAutocompleteUnitField.tsx to help reduce the size of the DualAutocompleteField.tsx.
Renamed some of the dual autocomplete field props, just to make them more consistent/predictable.
Fixed missing props in create/edit technique vantages (missing category data type prop).
Add formik snackbar error component to observation form.
Addressed a few react missing dependency warnings.

Update missed jsdoc comments.

Update missed jsdoc comments 2.

WIP: Add create observation sampling fields.

Working sampling fields.

Enhancements to sampling fields
@NickPhura NickPhura added Ready For Review PR is ready for review and removed Early Feedback Welcome PR is not finished, but early review feedback is welcomed labels Feb 4, 2025
if (pagination.sort && pagination.order) {
if (pagination.sort === 'subcount') {
const knex = getKnex();
query.orderByRaw(knex.raw(`(subcount->>?)::numeric ${pagination.order}`, [pagination.sort]));

Check failure

Code scanning / CodeQL

Database query built from user-controlled sources High

This query string depends on a
user-provided value
.
Copy link
Collaborator

Choose a reason for hiding this comment

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

question: Do you think we should name this directory database-units or something like database-types / database-enums. I see in the database there is an additional type / enum for alert_severity would this also be a database-unit?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Open to any name for the folder. Can't remember how I landed on unit. Probably just trying to pick something generic that could cover database enums (but also any other enum-like concept, if there are others?), and which aren't specifically table models.

@NickPhura NickPhura added the Do Not Merge PR should not be merged label Feb 5, 2025
Copy link

sonarqubecloud bot commented Feb 5, 2025

Quality Gate Failed Quality Gate failed

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

See analysis details on SonarQube Cloud

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Do Not Merge PR should not be merged Ready For Review PR is ready for review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants