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

Add more date range selection options #4518 #4533

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

pshong79
Copy link
Collaborator

Resolves #4518

Description

This change is to add more date range selections through the application - specifically "Prior Year" and "Last 12 Months".

"Prior Year" is from January 1 through December 31 of the previous year.
"Last 12 Months" is from the day after today of the previous year through today. For example, if today is July 14, 2024, the range should be July 15, 2023 to July 14, 2024.

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Tested manually
Add a couple of specs in distribution_by_county_system_spec for "Prior Year" and "Last 12 Months" date range selections.

Screenshots

Before:
Screenshot 2024-07-14 at 22 20 32

After:
(Last 12 Months)
Note: Today's date is July 14, 2024.
Screenshot 2024-07-14 at 22 19 58

(Prior Year)
Screenshot 2024-07-14 at 22 19 46

@pshong79 pshong79 changed the title WIP: Add more date range selection options #4518 Add more date range selection options #4518 Jul 15, 2024
Copy link
Collaborator

@cielf cielf left a comment

Choose a reason for hiding this comment

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

Checks out functionally. @dorner - do you want to take a look from the technical pov?

@cielf cielf requested a review from dorner July 15, 2024 15:31
end
expect(page).to have_text("25", count: 4)
expect(page).to have_text("$262.50", count: 4)
end
Copy link
Collaborator

Choose a reason for hiding this comment

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

Aren't these tests identical? Ideally to test this we'd want to have a distribution that is included and one that's not included, specifically for these 2 blocks of time.

Copy link
Collaborator Author

@pshong79 pshong79 Jul 17, 2024

Choose a reason for hiding this comment

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

Yeah.... I was curious about those expects. I will dig in a bit deeper to see what I can figure out.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sorry! I haven't forgotten about this.... Work has picked up a bit so been eating up a lot of my time at the moment!

@pshong79
Copy link
Collaborator Author

pshong79 commented Aug 5, 2024

Sorry, it looks like work may continue to take up most of my time for the next few weeks. If someone wants to pick this up and take it across the finish line, that is totally fine. Otherwise, I can come back to it once work settles back down again.

The only remaining task left to do is fix these two tests:

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.

Add more shortcuts to the date range selection -- last year, last 12 months
3 participants