<h3><%= t("admin.poll_shifts.new.shifts") %></h3>
<table>
  <thead>
    <tr>
      <th><%= t("admin.poll_shifts.new.date") %></th>
      <th><%= t("admin.poll_shifts.new.officer") %></th>
      <th><%= t("admin.poll_shifts.new.table_email") %></th>
      <th><%= Poll::Shift.human_attribute_name(:task) %></th>
      <th><%= t("admin.poll_shifts.new.shift") %></th>
    </tr>
  </thead>
  <tbody>
    <% @shifts.each do |shift| %>
      <tr id="shift_<%= shift.id %>" class="shift">
        <td><%= l(shift.date.to_date, format: :long) %></td>
        <td><%= shift.officer_name %></td>
        <td><%= shift.officer_email %></td>
        <td><%= t("admin.poll_shifts.#{shift.task}") %></td>
        <td>
          <%= render Admin::TableActionsComponent.new(
            shift,
            actions: [:destroy],
            destroy_text: t("admin.poll_shifts.new.remove_shift")
          ) %>
        </td>
      </tr>
    <% end %>
  </tbody>
</table>
