feat: add user count display for each role
- Add Users column showing number of users assigned to each role - Load user counts efficiently in single query to avoid N+1 - Similar implementation to membership fee types member count
This commit is contained in:
parent
36858db97c
commit
9c8cdb5e17
2 changed files with 33 additions and 1 deletions
|
|
@ -49,6 +49,10 @@
|
|||
<% end %>
|
||||
</:col>
|
||||
|
||||
<:col :let={role} label={gettext("Users")}>
|
||||
<span class="badge badge-ghost">{get_user_count(role, @user_counts)}</span>
|
||||
</:col>
|
||||
|
||||
<:action :let={role}>
|
||||
<div class="sr-only">
|
||||
<.link navigate={~p"/admin/roles/#{role}"}>{gettext("Show")}</.link>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue