<%= turbo_frame_tag dom_id(user) do %>
  <tr id="<%= dom_id user %>" class="bg-role-<%= user.role %>-light odd:bg-opacity-25 even:bg-opacity-15 text-hsrm-gray whitespace-nowrap hover:bg-opacity-30"">
    <td class="p-2 py-3 text-center">
      <%= link_to admin_user_path(user), target: "_top" do %>
        <span class="badge badge-xl text-role-<%= user.role %> bg-role-<%= user.role %>-light rounded-lg shadow">
          <%= user.id %>
        </span>
      <% end %>
    </td>
    <td class="p-2 py-3">
      <%= user.name %>
    </td>
    <td class="p-2 py-3">
      <%= icon bool_icon(user.verified), class: "icon #{user.verified ? "text-green-600" : "text-red-600"}", title: "E-Mail-Adresse verifiziert" %>
      <%= user.email %>
    </td>
    <td class="p-2 py-3">
      <span class="badge block w-28 bg-role-<%= user.role %>-light">
        <%= user.jobs_as_costumer.size %>
      </span>
    </td>
    <td class="p-2 py-3">
      <span class="badge block w-28 bg-role-<%= user.role %>-light">
        <%= user.role %>
      </span>
    </td>
    <td class="flex justify-center p-2 py-3 space-x-2">
      <%= link_to do %>
        <span class="block bg-gray-300 badge w-28 hover:bg-role-user-light hover:texft-black">User</span>
      <% end unless user.user? %>
      <%= link_to do %>
        <span class="block bg-gray-300 badge w-28 hover:bg-role-operator-light hover:texft-black">Operator</span>
      <% end unless user.operator? %>
      <%= link_to do %>
        <span class="block bg-gray-300 badge w-28 hover:bg-role-admin-light hover:texft-black">Admin</span>
      <% end unless user.admin? %>
    </td>
  </tr>
<% end %>
