Skip to content

Conversation

@JCampana98
Copy link
Collaborator

Closes #93

Changes

  • Added filter by date range to records page.
  • Added start and end date filtering to queryAllRows in Records DAO.

Testing

  • Have multiple Records with varying dates to test filtering.
  • Click the filter button on the top right.
  • Try multiple date range filters.
  • Try clearing the filters.

@JCampana98 JCampana98 requested a review from Pertempto April 19, 2025 13:58
@JCampana98 JCampana98 self-assigned this Apr 19, 2025
@JCampana98
Copy link
Collaborator Author

Ready 🫡

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Apr 19, 2025

Deploying karriba with  Cloudflare Pages  Cloudflare Pages

Latest commit: c9b2a44
Status: ✅  Deploy successful!
Preview URL: https://7a2cafbd.karriba.pages.dev
Branch Preview URL: https://93-filter-by-date.karriba.pages.dev

View logs

);
}

Widget _buildFilterSheet() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should move this to a separate RecordsFilterBottomSheet widget.

I've noticed a bug where when I select a date range, the bottom sheet still shows the previously selected date range. It doesn't update the displayed date range until I apply the date range and re-open the bottom sheet.

I think moving to a separate widget might help with this, because the setState might apply correctly.

Also, it is recommended to use widgets rather than helper methods for things like this because it improves performance - https://www.youtube.com/watch?v=IOyq-eTRhvo

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Moved and fixed 😄 I also added a little message when no records are found to show "No records found." on the center of the page.

Copy link
Contributor

@Pertempto Pertempto left a comment

Choose a reason for hiding this comment

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

Very nice! 👍🏽

@Pertempto Pertempto merged commit bfc1595 into main Apr 26, 2025
2 checks passed
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.

feat: filter by date

3 participants