From 2965e1d5ac5ad6fbc87d1d428a3d0d19065be361 Mon Sep 17 00:00:00 2001 From: ManishMadan2882 Date: Tue, 23 Jun 2026 14:48:26 +0530 Subject: [PATCH] (feat:admin) filter users intead of exact match, minor ui --- .../storage/db/repositories/admin_stats.py | 2 +- frontend/src/Navigation.tsx | 37 ++++++------------- frontend/src/admin/Users.tsx | 2 +- frontend/src/teams/TeamSwitcher.tsx | 2 +- 4 files changed, 15 insertions(+), 28 deletions(-) diff --git a/application/storage/db/repositories/admin_stats.py b/application/storage/db/repositories/admin_stats.py index a78fa316..7c9b5811 100644 --- a/application/storage/db/repositories/admin_stats.py +++ b/application/storage/db/repositories/admin_stats.py @@ -94,7 +94,7 @@ class AdminStatsRepository: where = "" count_params: dict = {} if user_id_filter is not None: - where = "WHERE lower(u.user_id) = lower(:uid)" + where = "WHERE u.user_id ILIKE '%' || :uid || '%'" count_params["uid"] = user_id_filter total = self._conn.execute( text(f"SELECT count(*) FROM users u {where}"), count_params diff --git a/frontend/src/Navigation.tsx b/frontend/src/Navigation.tsx index ff431964..3cd144db 100644 --- a/frontend/src/Navigation.tsx +++ b/frontend/src/Navigation.tsx @@ -318,7 +318,9 @@ export default function Navigation({ navOpen, setNavOpen }: NavigationProps) { {/* Icon rail (desktop only, when sidebar collapsed) */} {!navOpen && !isMobile && !isTablet && ( -
+
-
- { - if (isMobile || isTablet) { - setNavOpen(false); - } - }} - /> -
+
setSearch(e.target.value)} onKeyDown={(e) => { diff --git a/frontend/src/teams/TeamSwitcher.tsx b/frontend/src/teams/TeamSwitcher.tsx index d39545df..f1a1e285 100644 --- a/frontend/src/teams/TeamSwitcher.tsx +++ b/frontend/src/teams/TeamSwitcher.tsx @@ -143,7 +143,7 @@ export default function TeamSwitcher({ )} - + {currentTeam ? (