Add new filters to Admin::Budget::Investment navbar
This commit is contained in:
@@ -3,7 +3,7 @@ class Admin::BudgetInvestmentsController < Admin::BaseController
|
||||
include FeatureFlags
|
||||
feature_flag :budgets
|
||||
|
||||
has_filters(%w{without_admin valuation_finished all},
|
||||
has_filters(%w{all without_admin without_valuator under_valuation valuation_finished},
|
||||
only: [:index, :toggle_selection])
|
||||
|
||||
before_action :load_budget
|
||||
|
||||
@@ -53,6 +53,8 @@ class Budget
|
||||
|
||||
scope :valuation_open, -> { where(valuation_finished: false) }
|
||||
scope :without_admin, -> { valuation_open.where(administrator_id: nil) }
|
||||
scope :without_valuator, -> { valuation_open.where(valuator_assignments_count: 0) }
|
||||
scope :under_valuation, -> { valuation_open.where("valuator_assignments_count > 0 AND administrator_id IS NOT ?", nil) }
|
||||
scope :managed, -> { valuation_open.where(valuator_assignments_count: 0).where("administrator_id IS NOT ?", nil) }
|
||||
scope :valuating, -> { valuation_open.where("valuator_assignments_count > 0") }
|
||||
scope :valuation_finished, -> { where(valuation_finished: true) }
|
||||
|
||||
@@ -140,6 +140,8 @@ en:
|
||||
filters:
|
||||
all: All
|
||||
without_admin: Without assigned admin
|
||||
without_valuator: Without assigned valuator
|
||||
under_valuation: Under valuation
|
||||
valuation_finished: Valuation finished
|
||||
feasible: Feasible
|
||||
selected: Selected
|
||||
|
||||
@@ -140,6 +140,8 @@ es:
|
||||
filters:
|
||||
all: Todos
|
||||
without_admin: Sin administrador
|
||||
without_valuator: Sin evaluador
|
||||
under_valuation: En evaluación
|
||||
valuation_finished: Evaluación finalizada
|
||||
feasible: Viables
|
||||
selected: Seleccionados
|
||||
|
||||
Reference in New Issue
Block a user