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

feat(district): Add button to autofill docket query form #311

Merged
merged 16 commits into from
Jan 10, 2023

Conversation

ERosendo
Copy link
Contributor

@ERosendo ERosendo commented Jan 10, 2023

This PR resolves freelawproject/recap#190.

This PR introduces the following changes:

  • A new field is added to the getAvailabilityForDocket request. This PR adds the date_last_filing field to the list of dynamically selected fields.

  • This PR adds two helper functions in the utils.js file.

    • pacerDateFormat: takes a date and returns it in 'MM/DD/YYYY' format
    • recapAddLatestFilingButton: creates the HTML button that is inserted on the page and also creates an onClick event listener for this object. This utility function uses the date_last_filing from the response of getAvailabilityForDocket request to create a data attribute in the button.
  • This PR adds CSS classes to change the styling of the new button.

  • The helper method called removeBanners is updated to also remove the new button.

  • This PR adds the helper method recapAddLatestFilingButton to the Docket Query handler to create the filing button next to the date input field of the form.

Here's a gif showing the feature:

refresh-button-district

…form

- This commit adds two helper functions in the utils.js file. The first method is pacerDateFormat, which takes a date and returns it in 'MM/DD/YYYY' format. The other function is recapAddLatestFilingButton, this helper creates the HTML element that is inserted on the page.
- This commit uses the new helper method to add the filing button next to the date input field.
@ERosendo ERosendo marked this pull request as ready for review January 10, 2023 16:01
Copy link
Member

@mlissner mlissner left a comment

Choose a reason for hiding this comment

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

A few q's/comments, but approach looks sound, thank you!

src/utils.js Outdated Show resolved Hide resolved
src/utils.js Outdated Show resolved Hide resolved
src/utils.js Outdated Show resolved Hide resolved
@mlissner mlissner merged commit 867db07 into main Jan 10, 2023
@mlissner mlissner deleted the 190-add-last-filing-button branch January 10, 2023 22:09
@mlissner
Copy link
Member

Awesome. If this passes your QA, let's deploy today!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

RECAP should be more helpful at sharing date info and saving money
2 participants