Filter by stage id, much better collection filtering

This commit is contained in:
Jorge Manrubia
2025-07-18 05:50:22 +02:00
parent 61dc39d158
commit d81568ff57
28 changed files with 58694 additions and 11 deletions
+3 -4
View File
@@ -62,6 +62,9 @@ class Command::Parser::Context
user.filters.from_params(params.permit(*Filter::Params::PERMITTED_PARAMS).reverse_merge(**FilterScoped::DEFAULT_PARAMS))
end
def candidate_stages
Workflow::Stage.where(workflow_id: cards.joins(:collection).select("collections.workflow_id").distinct)
end
private
attr_reader :controller, :action, :params
@@ -88,8 +91,4 @@ class Command::Parser::Context
@action = route[:action]
@params = ActionController::Parameters.new(Rack::Utils.parse_nested_query(uri.query).merge(route.except(:controller, :action)))
end
def candidate_stages
Workflow::Stage.where(workflow_id: cards.joins(:collection).select("collections.workflow_id").distinct)
end
end