Skip to content

Fix dynamic date filter handling in Transaction model and requests#79

Merged
Nextraile merged 2 commits into
vercelfrom
main
May 26, 2026
Merged

Fix dynamic date filter handling in Transaction model and requests#79
Nextraile merged 2 commits into
vercelfrom
main

Conversation

@Nextraile

Copy link
Copy Markdown
Collaborator

This pull request refactors how dynamic date filters are handled for transactions, simplifying the controller logic and moving filter type handling into the request validation layer. The changes ensure that filter types (before, after, between) are consistently prepended to filter values, and the model’s scope method is updated to expect this new format.

Dynamic Date Filter Handling Improvements:

  • Moved the responsibility of prepending filter types (before, after, between) to filter values from the controller to the IndexTransactionsRequest by implementing a new passedValidation method. This ensures filters are consistently formatted before reaching the model.
  • Updated the scopeDynamicDateFilter method in the Transaction model to expect the filter type as the first parameter in the value string, adjusting parameter extraction accordingly. [1] [2]

Controller Filter Configuration Simplification:

  • Removed the default filter type arguments from the controller’s allowed filters for both index and indexDeleted methods, as the filter type is now handled in the request. [1] [2]

Copilot AI review requested due to automatic review settings May 26, 2026 00:20
@vercel

vercel Bot commented May 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
my-finance Ready Ready Preview, Comment May 26, 2026 12:20am

@Nextraile Nextraile merged commit ae3e4d2 into vercel May 26, 2026
2 of 3 checks passed
@Nextraile Nextraile removed the request for review from Copilot May 26, 2026 00:44
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.

1 participant