Skip to content

Organization-based filtering for posts #791

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

Open
wants to merge 9 commits into
base: acceptance-between-administrators
Choose a base branch
from

Conversation

gmartincor
Copy link
Collaborator

Context

grabacion-de-pantalla-2025-04-15-a-las-200200_CNuCZyum.mp4

This functionality complements the existing category filtering and allows filtering offers by organizations and categories at the same time .

Changes implemented

I have added an organization filtering system in the post listing interface (both offers and inquiries) that:

  1. Uses the existing application design pattern based on has_scope to maintain consistency and follow Rails best practices
  2. Integrates seamlessly with the existing filtering system, allowing combinations with other filters (category, text search)
  3. Correctly persists filtering parameters between requests
  4. Improves the UX by keeping the button for creating new posts visible regardless of applied filters

At the technical level, the implementation follows the MVC architecture:

  • Model: Addition of the by_organization scope in the Post model (base class for Offer and Inquiry)
  • Controller: Integration of the new scope in PostsController, preserving existing filtering logic
  • View: Modification of filtering partials to include the organization selector, with behavior consistent with the category selector

Benefits for users

  • Users can filter content by specific organization, allowing faster access to relevant posts
  • Administrators of multiple time banks can visualize and manage posts by organization
  • Users can combine filters (e.g., category + organization) for more precise searches

Next steps

This implementation lays the groundwork for future related improvements:

  • Saving filtering preferences per user
  • Evolving towards an advanced filtering system with more options

@gmartincor gmartincor changed the title Implementation of organization-based filtering for posts Organization-based filtering for posts Apr 15, 2025
@franpb14 franpb14 changed the base branch from time-between-banks-base to acceptance-between-administrators April 15, 2025 19:51
@markets
Copy link
Collaborator

markets commented Apr 17, 2025

@sseerrggii @gmartincor @franpb14 Are we sure we want this feature? 🤔 Not sure if I get the use-case.

@sseerrggii
Copy link
Contributor

Hi @markets yes! @gmartincor is working on #789
In order to facilitate exchanges between organizations we need the ability to filter ofers/demands by organization

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.

3 participants