prints the right value in budgets table
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<tr>
|
||||
<th><%= t("valuation.budgets.index.table_name") %></th>
|
||||
<th><%= t("valuation.budgets.index.table_phase") %></th>
|
||||
<th><%= t("valuation.budgets.index.table_assigned_headings") %></th>
|
||||
<th><%= t("valuation.budgets.index.table_assigned_investments_valuation_open") %></th>
|
||||
<th><%= t("valuation.budgets.index.table_actions") %></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -21,7 +21,7 @@
|
||||
<%= t("budget.phase.#{budget.phase}") %>
|
||||
</td>
|
||||
<td>
|
||||
3 partidas
|
||||
<%= @investments_with_valuation_open[budget.id] %>
|
||||
</td>
|
||||
<td>
|
||||
<%= link_to t("valuation.budgets.index.evaluate"),
|
||||
|
||||
Reference in New Issue
Block a user