Display customer jobs in admin/user#index

This commit is contained in:
2024-10-03 18:36:36 +02:00
parent 1dcac5b6f4
commit 88b5568b2f

View File

@@ -18,13 +18,13 @@
<%= highlight user.email, [params.dig(:q, :firstname_or_lastname_or_email_cont).to_s, params.dig(:q, :email_start).to_s] %>
</td>
<td class="p-2 py-3 text-right">
<%= user.created_jobs.not_canceled.size %>
<%= user.customer_jobs.not_canceled.size %>
</td>
<td class="p-2 py-3 text-center">
<%= l user.created_at.localtime.to_date %>
</td>
<td class="p-2 py-3 text-nowrap">
<span class="inline-flex -space-x-px overflow-hidden rounded-md bg-white shadow divide-x divide-gray-300">
<span class="inline-flex -space-x-px overflow-hidden bg-white divide-x divide-gray-300 rounded-md shadow">
<% User.roles.keys.each do |role| %>
<% if allowed_to? :change_role?, user %>
<% if user.role == role.to_s %>
@@ -36,7 +36,7 @@
<% if user.role == role.to_s %>
<span class="inline-block px-4 py-2 text-sm uppercase font-medium text-<%= role %> bg-role-<%= role %>-light focus:relative"><%= role %></span>
<% else %>
<span class="inline-block px-4 py-2 text-sm uppercase font-medium text-gray-400 focus:relative"><%= role %></span>
<span class="inline-block px-4 py-2 text-sm font-medium text-gray-400 uppercase focus:relative"><%= role %></span>
<% end %>
<% end %>
<% end %>