Commit b102293
committed
fix(super-admin): improve super admin panel UX and add user management
## Changes
### Login redirect
- Super admin now always redirects to /super-admin after login instead of the
regular dashboard, regardless of whether organizations exist.
### Organizations page (/super-admin)
- Removed decorative icons from table cells and action buttons.
- Renamed "Users" action button to "View users".
- Set 8px gap between action buttons for consistent spacing.
### All Users page (/super-admin/users)
- Added "Invite user" button with modal (includes organization picker).
- Added row click to open an edit user modal (name, surname, email, role,
joined date, last login).
- Removed decorative icons from table cells and action buttons.
- Removed inline user count text (moved to sidebar pill instead).
- Set 8px gap between filter controls for consistent spacing.
- Extracted EditUserModal and InviteUserModal as isolated components to
reduce parent state from 16+ variables down to 3 toggles.
### Org Users page (/super-admin/organizations/:id/users)
- Removed decorative icons from email column and remove button.
### Sidebar
- Added user count pill badge on the "Users" menu item.
- Uses a dedicated lightweight count endpoint instead of fetching all users.
### Settings page (/super-admin/settings)
- Changed title from "Super Admin Settings" to "Settings".
- Added explicit breadcrumbs with settings icon.
- Shows "Password" breadcrumb when on the password tab.
### Backend
- Added PATCH /super-admin/users/:id endpoint for editing user details.
- Added GET /super-admin/users/count endpoint for sidebar badge.
- Update query uses CTE with RETURNING to avoid a second SELECT.
### Code quality
- Extracted ROLE_OPTIONS and ROLE_COLORS as shared constants in roles.ts,
eliminating duplication across 3 files.
- Replaced native <select> elements with the project Select component.1 parent d5cee28 commit b102293
File tree
10 files changed
+470
-93
lines changed- Clients/src
- application
- constants
- repository
- presentation
- components/SuperAdminSidebar
- pages
- Authentication/Login
- SuperAdmin
- AllUsers
- Organizations
- Settings
- Users
- Servers
- controllers
- routes
10 files changed
+470
-93
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
50 | 54 | | |
51 | 55 | | |
52 | 56 | | |
| |||
59 | 63 | | |
60 | 64 | | |
61 | 65 | | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
62 | 70 | | |
63 | 71 | | |
64 | 72 | | |
Lines changed: 18 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
9 | 25 | | |
10 | 26 | | |
11 | 27 | | |
| |||
19 | 35 | | |
20 | 36 | | |
21 | 37 | | |
| 38 | + | |
22 | 39 | | |
23 | 40 | | |
24 | 41 | | |
| |||
Lines changed: 2 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
178 | | - | |
| 178 | + | |
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | 184 | | |
188 | 185 | | |
189 | 186 | | |
190 | 187 | | |
191 | 188 | | |
192 | | - | |
| 189 | + | |
193 | 190 | | |
194 | 191 | | |
195 | 192 | | |
| |||
0 commit comments