Add compact live-filter client lists for partners

This commit is contained in:
A R R R Associates
2026-07-31 15:03:52 +05:30
parent db23d28346
commit f5bfdda775
6 changed files with 257 additions and 49 deletions
+1 -1
View File
@@ -107,7 +107,7 @@ def list_clients(
client_type=client_type, client_group_id=client_group_id, include_archived=include_archived,
)
total = db.execute(select(func.count()).select_from(stmt.subquery())).scalar_one()
per_page = min(max(int(per_page or 25), 1), 100)
per_page = min(max(int(per_page or 25), 1), 5000)
pages = max(ceil(total / per_page), 1)
page = min(max(int(page or 1), 1), pages)
offset = (page - 1) * per_page