diff --git a/app/controllers/valuation/budgets_controller.rb b/app/controllers/valuation/budgets_controller.rb
index 0b7efe858..744b0d4bf 100644
--- a/app/controllers/valuation/budgets_controller.rb
+++ b/app/controllers/valuation/budgets_controller.rb
@@ -6,6 +6,12 @@ class Valuation::BudgetsController < Valuation::BaseController
def index
@budgets = @budgets.current.order(created_at: :desc).page(params[:page])
+ @investments_with_valuation_open = {}
+ @budgets.each do |b|
+ @investments_with_valuation_open[b.id] = b.investments
+ .by_valuator(current_user.valuator.try(:id))
+ .valuation_open
+ .count
+ end
end
-
end
diff --git a/app/views/valuation/budgets/index.html.erb b/app/views/valuation/budgets/index.html.erb
index 4f2b7ffa6..5df21fc3e 100644
--- a/app/views/valuation/budgets/index.html.erb
+++ b/app/views/valuation/budgets/index.html.erb
@@ -7,7 +7,7 @@
| <%= t("valuation.budgets.index.table_name") %> |
<%= t("valuation.budgets.index.table_phase") %> |
- <%= t("valuation.budgets.index.table_assigned_headings") %> |
+ <%= t("valuation.budgets.index.table_assigned_investments_valuation_open") %> |
<%= t("valuation.budgets.index.table_actions") %> |
@@ -21,7 +21,7 @@
<%= t("budget.phase.#{budget.phase}") %>
- 3 partidas
+ <%= @investments_with_valuation_open[budget.id] %>
|
<%= link_to t("valuation.budgets.index.evaluate"),
diff --git a/config/locales/valuation.en.yml b/config/locales/valuation.en.yml
index b28446a77..de19fea09 100644
--- a/config/locales/valuation.en.yml
+++ b/config/locales/valuation.en.yml
@@ -13,7 +13,7 @@ en:
finished: Finished
table_name: Name
table_phase: Phase
- table_assigned_headings: Assigned headings
+ table_assigned_investments_valuation_open: Investment projects assigned with valuation open
table_actions: Actions
evaluate: Evaluate
budget_investments:
diff --git a/config/locales/valuation.es.yml b/config/locales/valuation.es.yml
index b8a9d6a3f..b588c8521 100644
--- a/config/locales/valuation.es.yml
+++ b/config/locales/valuation.es.yml
@@ -13,7 +13,7 @@ es:
finished: Terminados
table_name: Nombre
table_phase: Fase
- table_assigned_headings: Partidas asignadas
+ table_assigned_investments_valuation_open: Prop. Inv. asignadas en evaluación
table_actions: Acciones
evaluate: Evaluar
budget_investments:
|