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

Refactor manifest into sections #676

Merged

Conversation

dpgraham4401
Copy link
Member

Description

This PR is part of the process of taking the HUGE ManifestForm.tsx component and breaking it down into smaller more managable chunks. Each chunk/section manages a more managable part of the state. State that needs to be shared by all is lifted to the central redux store (the ManifestContext still exists but I plan on moving more things out of that into the central store). This PR also implements a number of custom hooks that abstract away the redux store and hide that information, and make our components more declarative (like openHandlerSearch and saveManifest) moving many of our effects into custom hooks and moving the logic out of the UI.

Issue ticket number and link

Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

…Section, GeneratorSection, WasteLineSection, TransporterSection

In addition:
add pyupgrade pre-commit hook and upgrade hooks
…d a custom hook (useHandlerSearchConfigs) to interface with the logic. This commit also stores generator and TSDF epa ID in url search parameter for draft manifests
… a custom hook, useSaveManifest. This hook wraps around our RTK query endpoints/hooks. Depending on the manifest saved, it initiates the appropriate action to POST/PUT to the haztrak server or saving to e-Manifest
@github-actions github-actions bot added client Related to front end workings (React/Redux) server Related to backend workings (Django/Rest API) test Unit tests are, or need to be, included labels Jan 9, 2024
@dpgraham4401 dpgraham4401 merged commit 923c895 into USEPA:main Jan 9, 2024
7 checks passed
@dpgraham4401 dpgraham4401 deleted the refactor_manifest_into_sections branch January 9, 2024 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client Related to front end workings (React/Redux) server Related to backend workings (Django/Rest API) test Unit tests are, or need to be, included
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

1 participant