Merge pull request #2342 from wairbut-m2c/iagirre-budgets-column-show-valuators

Budget: add column show to valuators
This commit is contained in:
Alberto
2018-04-30 17:49:15 +02:00
committed by GitHub
13 changed files with 193 additions and 23 deletions

View File

@@ -63,6 +63,7 @@ class Budget
scope :under_valuation, -> { valuation_open.valuating.where("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 OR valuator_group_assignments_count > 0" ) }
scope :visible_to_valuators, -> { where(visible_to_valuators: true) }
scope :valuation_finished, -> { where(valuation_finished: true) }
scope :valuation_finished_feasible, -> { where(valuation_finished: true, feasibility: "feasible") }
scope :feasible, -> { where(feasibility: "feasible") }