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

Filtered reports generation #5593

Merged
merged 4 commits into from
Apr 15, 2024

Conversation

elasticspoon
Copy link
Collaborator

@elasticspoon elasticspoon commented Mar 30, 2024

Issue #5579
Blocked by #5590
Fixes #3243 (i think? i just randomly found this issue)

To close issue still need to implement adding court topics, etc to reports themselves.

Reworks report generation page to use a modal and allow selection of contacts into report by date range.

New generate page with new button:
image

New modal with generation options:
image
image

Modal on both generation pages:
image

Expose methods in court report context to make unit
testing easier.

Write additional unit tests.
Remove old tests.

Remove redundant tests, some behavior is
already tested by the Dates object.
@github-actions github-actions bot added javascript for use by Github Labeler to mark pull requests that update Javascript code ruby Pull requests that update Ruby code Tests! 🎉💖👏 erb labels Mar 30, 2024
@elasticspoon elasticspoon force-pushed the filtered-reports-generation branch 3 times, most recently from e2af233 to 943a49f Compare April 7, 2024 01:33
Add generate docx modal with date pickers to filter dates of case
contacts to include in the generated report.

Modify current tests to open the modal before
attempting to click within it.

Allow range filtering of contacts in case report
@elasticspoon elasticspoon force-pushed the filtered-reports-generation branch from 943a49f to 52fc2e6 Compare April 7, 2024 01:35
@elasticspoon elasticspoon marked this pull request as ready for review April 7, 2024 01:46
Copy link
Collaborator

@compwron compwron left a comment

Choose a reason for hiding this comment

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

I am in favor - I want to look at this more deeply when I have time. @FireLemons do you have time to review?

On the case show page it should autofill the start date of
the date range with the most recent court date.

This most closely mirrors existing behavior.
@elasticspoon elasticspoon force-pushed the filtered-reports-generation branch from bedc63b to b449a47 Compare April 8, 2024 20:13
@@ -158,6 +158,12 @@ def most_recent_past_court_date
court_dates.where("date < ?", Date.today).order(:date).last
end

def formatted_latest_court_date
Copy link
Collaborator

Choose a reason for hiding this comment

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

has test?

@@ -41,6 +41,58 @@
end
end

describe "Report Generation", js: true do
Copy link
Collaborator

Choose a reason for hiding this comment

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

YAY test

@@ -204,6 +171,7 @@
end
end

# TODO: make this a request spec
Copy link
Collaborator

Choose a reason for hiding this comment

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

agreed

@compwron
Copy link
Collaborator

changing reports generation makes me very nervous but I think this is reasonable

@compwron
Copy link
Collaborator

screenshots are good... let's do it

@compwron compwron merged commit f310e88 into rubyforgood:main Apr 15, 2024
13 of 14 checks passed
@elasticspoon elasticspoon deleted the filtered-reports-generation branch April 15, 2024 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
erb javascript for use by Github Labeler to mark pull requests that update Javascript code ruby Pull requests that update Ruby code Tests! 🎉💖👏
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Write complicated feature test for court reports case contact ranges
2 participants