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

Adds "Recent Incidents Only" functionality #157

Merged
merged 7 commits into from
Jan 3, 2025

Conversation

binarygeotech
Copy link
Contributor

@binarygeotech binarygeotech commented Dec 27, 2024

Close #144

  • Adds settings to show only recent incidents by adding new fields to the settings page.
    • Show Recent Incidents Only (toggle button)
    • Number of Days to Show Recent Incidents (number input)
  • Disables date filter on the incidents page if "Show Recent Incidents Only" is true
  • Hides the pagination links on the incidents page if "Show Recent Incidents Only" is true
  • Applies filter to incidents query based on the specified number of days on the settings page
  • Applies filter to incidents query for RSS feeds based on the specified number of days on the settings page

@binarygeotech
Copy link
Contributor Author

@jbrooksuk kindly take a look at this PR if it does what you proposed on the referenced issue.

src/View/Components/IncidentTimeline.php Outdated Show resolved Hide resolved
src/View/Components/IncidentTimeline.php Outdated Show resolved Hide resolved
@jbrooksuk
Copy link
Member

By the way, @binarygeotech we'll also need to update the translation file.

…dents flag and update language file for new label
@binarygeotech
Copy link
Contributor Author

@jbrooksuk your suggested updates have been applied;

  • Updated variable name to camelCase
  • Updated the translation file
  • Removed redundant local variable $appSettings
  • Removed unused variable recentIncidentsDays from being passed to the UI

@jbrooksuk
Copy link
Member

Thanks! Code looks good to me, I'm not at my laptop to test yet, but I'll be back soon.

@binarygeotech
Copy link
Contributor Author

@jbrooksuk the required update have been made, kindly review. Happy new year to you from Nigeria.

@binarygeotech
Copy link
Contributor Author

@jbrooksuk I've update the PR with the recent localisation updates. I believe the PR is good to go now.

@jbrooksuk jbrooksuk merged commit 0bc3e06 into cachethq:main Jan 3, 2025
17 checks passed
@jbrooksuk
Copy link
Member

This is awesome, thanks for your help on this feature, @binarygeotech!

@binarygeotech binarygeotech deleted the feature/issue-144 branch January 13, 2025 01:36
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.

Setting to only show recent incidents
2 participants