<commit_before><% content_for :page_title do %>
  Alocação de tempo
<% end %>

<% content_for :page_actions do %>
  <li id="new_product_link">
		<%= button_link_to "Alocar tempo", new_admin_effort_path %>
  </li>
<% end %>

<table>
  <thead><tr>
    <th>Funcionário</th>
    <th>Tarefa</th>
		<% if false %>
	    <th>Object</th>
	    <th>Object type</th>
		<% end %>
    <th>Início</th>
    <th>Fim</th>
    <th>Total</th>
    <th data-hook="admin_orders_index_header_actions" class="actions"></th>
  </tr></thead>

<tbody>
<% @efforts.each do |effort| %>
  <tr>
    <td><%= effort.user.firstname %></td>
    <td><%= effort.task.activity_task %></td>
		<% if false %>
	    <td><%= effort.object_id %></td>
	    <td><%= effort.object_type %></td>
		<% end %>
    <td><%= effort.display(:started_at) %></td>
    <td><%= effort.display(:completed_at) %></td>
    <td><%= effort.display_amount %></td>
    <td class='actions align-center' data-hook="admin_orders_index_row_actions">
			<%= link_to_edit_url edit_admin_effort_path(effort), :no_text => true %>
			<%= link_to_delete(effort, :no_text => true, :url => admin_effort_path(effort)) if can? :destroy, effort %>
		</td>
  </tr>
<% end %>
</tbody>
</table><commit_msg>Ajustes para não quebrar a view do admin quando não houver user no efforts.<commit_after><% content_for :page_title do %>
  Alocação de tempo
<% end %>

<% content_for :page_actions do %>
  <li id="new_product_link">
		<%= button_link_to "Alocar tempo", new_admin_effort_path %>
  </li>
<% end %>

<table>
  <thead><tr>
    <th>Funcionário</th>
    <th>Tarefa</th>
		<% if false %>
	    <th>Object</th>
	    <th>Object type</th>
		<% end %>
    <th>Início</th>
    <th>Fim</th>
    <th>Total</th>
    <th data-hook="admin_orders_index_header_actions" class="actions"></th>
  </tr></thead>

<tbody>
<% @efforts.each do |effort| %>
  <tr>
    <td><%= effort.user.firstname if effort.user %></td>
    <td><%= effort.task.activity_task %></td>
		<% if false %>
	    <td><%= effort.object_id %></td>
	    <td><%= effort.object_type %></td>
		<% end %>
    <td><%= effort.display(:started_at) %></td>
    <td><%= effort.display(:completed_at) %></td>
    <td><%= effort.display_amount %></td>
    <td class='actions align-center' data-hook="admin_orders_index_row_actions">
    <% if spree_current_user.admin? %>
			<%= link_to_edit_url edit_admin_effort_path(effort), :no_text => true %>
			<%= link_to_delete(effort, :no_text => true, :url => admin_effort_path(effort)) if can? :destroy, effort %>
    <%end%>
		</td>
  </tr>
<% end %>
</tbody>
</table>
{'fraction_non_alphanumeric': 0.21167315175097276, 'fraction_numerical': 0.0, 'mean_word_length': 3.796641791044776, 'pattern_counts': {'":': 0, '<': 133, '<?xml version=': 0, '>': 139, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4219511', 'n_tokens_mistral': 1099, 'n_tokens_neox': 993, 'n_words': 191}