<%= render 'shared/back_link' %>

<h2><%= t("admin.valuators.summary.title") %></h2>

<table id="spending_proposals" class="investment-projects-summary">
  <th><%= t("admin.valuators.summary.valuator_name") %></th>
  <th><%= t("admin.valuators.summary.finished_and_feasible_count") %></th>
  <th><%= t("admin.valuators.summary.finished_and_unfeasible_count") %></th>
  <th><%= t("admin.valuators.summary.finished_count") %></th>
  <th><%= t("admin.valuators.summary.in_evaluation_count") %></th>
  <th><%= t("admin.valuators.summary.total_count") %></th>
  <th><%= t("admin.valuators.summary.cost") %></th>

  <% @valuators.each do |valuator| %>
    <tr id="<%= dom_id(valuator) %>">
      <td class="name">
        <%= valuator.description_or_email %>
      </td>
      <td class="finished-and-feasible-count">
        <%= valuator.spending_proposals.finished_and_feasible.count %>
      </td>
      <td class="finished-and-unfeasible-count">
        <%= valuator.spending_proposals.finished_and_unfeasible.count %>
      </td>
      <td class="finished-count">
        <%= valuator.spending_proposals.valuation_finished.count %>
      </td>
      <td class="in-evaluation-count">
        <%= valuator.spending_proposals.valuating.count %>
      </td>
      <td class="total-count">
        <%= valuator.spending_proposals.count %>
      </td>
      <td class="total-price text-center">
        <%= number_to_currency(valuator.spending_proposals.sum(:price)) %>
      </td>
    </tr>
  <% end %>
</table>