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

Chore/349 autofill dependent fuel fields #2214

Merged
merged 8 commits into from
Sep 26, 2024

Conversation

dleard
Copy link
Contributor

@dleard dleard commented Sep 17, 2024

On fuel selection, the classification & unit fields are filled automatically from data in the fuel_type database table.

  • A fuelType object has been added to all schemas that contain fuels (object contains: fuelName, classification, units)
  • A custom rjsf field for the fuelType object has been added to handle all these fields as one
  • The form_builder has been updated to handle the change in the schema structure

To test this:
Go to any activity page that has fuels in the schema & add a fuel from the dropdown. After selection, the classification & unit fields should be automatically updated. They should also be read-only.

@dleard dleard force-pushed the chore/349-autofill-dependent-fuel-fields branch 4 times, most recently from fb44f1a to 69de678 Compare September 23, 2024 23:22
Copy link
Contributor

@joshgamache joshgamache left a comment

Choose a reason for hiding this comment

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

Tests passing, and clickthrough had everything showing up where expected and read-only. Took a look through the code and everything looks great there! 👍

@dleard dleard force-pushed the chore/349-autofill-dependent-fuel-fields branch from 69de678 to b8334bb Compare September 26, 2024 16:05
@dleard dleard merged commit 41f71b0 into develop Sep 26, 2024
43 checks passed
@Sepehr-Sobhani Sepehr-Sobhani deleted the chore/349-autofill-dependent-fuel-fields branch September 26, 2024 20:19
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