Move admin budget investments tabs filters to advanced filters component
This commit is contained in:
@@ -4,10 +4,8 @@ class Admin::BudgetInvestmentsController < Admin::BaseController
|
||||
|
||||
feature_flag :budgets
|
||||
|
||||
has_orders %w{oldest}, only: [:show, :edit]
|
||||
has_filters(%w{all without_admin without_valuator under_valuation
|
||||
valuation_finished winners},
|
||||
only: [:index, :toggle_selection])
|
||||
has_orders %w[oldest], only: [:show, :edit]
|
||||
has_filters %w[all], only: [:index, :toggle_selection]
|
||||
|
||||
before_action :load_budget
|
||||
before_action :load_investment, only: [:show, :edit, :update, :toggle_selection]
|
||||
|
||||
@@ -23,7 +23,9 @@ class Admin::BudgetsController < Admin::BaseController
|
||||
def calculate_winners
|
||||
return unless @budget.balloting_process?
|
||||
@budget.headings.each { |heading| Budget::Result.new(@budget, heading).delay.calculate_winners }
|
||||
redirect_to admin_budget_budget_investments_path(budget_id: @budget.id, filter: "winners"),
|
||||
redirect_to admin_budget_budget_investments_path(
|
||||
budget_id: @budget.id,
|
||||
advanced_filters: ["winners"]),
|
||||
notice: I18n.t("admin.budgets.winners.calculated")
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user