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

369: Add unit to regulated product #2487

Merged
merged 15 commits into from
Nov 22, 2024
Merged

Conversation

acatchpole
Copy link
Contributor

@acatchpole acatchpole commented Nov 19, 2024

Card

Changes:

  • Created migration that:
    • adds unit and is_regulated fields to regulated_product table. (Note: the ticket says the field should be "regulated" and i made the boolean field "is_regulated")
    • populates new fields based off of this file
    • adds 2 new unregulated products (as listed in file above) to the regulated_product table
  • Updated relevant models in the front and backend to support these new fields.
  • Unit data is now included in existing API call
  • Units now display correctly in the Production Data form
  • Removed regulated products 'Mining: critical mineral, other than copper' and 'Smelting: critical mineral, other than aluminum and lead-zinc' per request from business (they are not used by any existing operation)

To Verify:

(mostly stolen from SH)

  1. From terminal command, start the api server:
cd bc_obps
make reset_db
make run
  1. From terminal command, start the app development server:
cd bciers && yarn dev-all
  1. Navigate to http://localhost:3000
  2. Click button Log in with Business BCeID
  3. Sign in to Keycloak using bc-cas-dev
  4. Click title Submit Annual Report(s)
  5. Click Start next to Operation 3 (an SFO)
  6. Proceed through the 3 tabs populating Operation Information and hitting Save & Continue
  7. On 'Review Facility Information' page, hit Save & Continue
  8. On the side tasklist, click title Production Data
  9. Click the checkboxes beside any of the listed products and see that the 'Unit' field is populated
  10. Put some test data into the first 3 fields of a product and hit Save & Continue and see that the 'Unit' field is still populated (necessary b/c the unit value now comes from a different structure [see here where data source is different depending on if there is report_product data available])

@acatchpole acatchpole force-pushed the 369-add-unit-to-regulatedProduct branch 3 times, most recently from d799799 to 951ffcf Compare November 20, 2024 00:01
@acatchpole acatchpole marked this pull request as ready for review November 20, 2024 00:01
@acatchpole acatchpole force-pushed the 369-add-unit-to-regulatedProduct branch 2 times, most recently from 2d00417 to f3ec6aa Compare November 20, 2024 23:35
Copy link
Contributor

@dleard dleard left a comment

Choose a reason for hiding this comment

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

Nice work! Looks good to me :shipit:

@acatchpole acatchpole force-pushed the 369-add-unit-to-regulatedProduct branch 2 times, most recently from f99e0f1 to 8be529a Compare November 22, 2024 22:12
@acatchpole acatchpole force-pushed the 369-add-unit-to-regulatedProduct branch from 8be529a to 88c8f45 Compare November 22, 2024 22:57
@acatchpole acatchpole merged commit 1716b66 into develop Nov 22, 2024
39 checks passed
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.

2 participants