chg: [orgs list] show numbers of users

This commit is contained in:
terrtia 2024-09-17 15:16:28 +02:00
parent 6509b5d732
commit cc7e67d5ed
No known key found for this signature in database
GPG key ID: 1E1B1F50D84613D0
2 changed files with 3 additions and 1 deletions

View file

@ -309,7 +309,7 @@ def check_acl_edit_level(obj, user_org, user_id, user_role, new_level):
def api_get_orgs_meta(): def api_get_orgs_meta():
meta = {'orgs': []} meta = {'orgs': []}
options = {'date_created', 'description', 'name'} options = {'date_created', 'description', 'name', 'nb_users'}
for org_uuid in get_orgs(): for org_uuid in get_orgs():
org = Organisation(org_uuid) org = Organisation(org_uuid)
meta['orgs'].append(org.get_meta(options=options)) meta['orgs'].append(org.get_meta(options=options))

View file

@ -35,6 +35,7 @@
<th>uuid</th> <th>uuid</th>
<th>Description</th> <th>Description</th>
<th>Created at</th> <th>Created at</th>
<th>Nb Users</th>
<th>Actions</th> <th>Actions</th>
</tr> </tr>
</thead> </thead>
@ -49,6 +50,7 @@
{{org['date_created']}} {{org['date_created']}}
{% endif %} {% endif %}
</td> </td>
<td>{{org['nb_users']}}</td>
<td> <td>
<div class="d-flex justify-content-start"> <div class="d-flex justify-content-start">
{# <a class="btn btn-outline-primary ml-3 px-1 py-0" href="{{ url_for('settings_b.edit_user', org_uuid=org['uuid']) }}">#} {# <a class="btn btn-outline-primary ml-3 px-1 py-0" href="{{ url_for('settings_b.edit_user', org_uuid=org['uuid']) }}">#}