Skip to content

fix(super-admin): improve super admin panel UX and add user management#3667

Open
gorkem-bwl wants to merge 1 commit intodevelopfrom
fix/super-admin-improvements
Open

fix(super-admin): improve super admin panel UX and add user management#3667
gorkem-bwl wants to merge 1 commit intodevelopfrom
fix/super-admin-improvements

Conversation

@gorkem-bwl
Copy link
Copy Markdown
Contributor

Summary

  • Login redirect: Super admin now always lands on /super-admin after login instead of the regular dashboard.
  • User management: Added invite user modal (with org picker) and edit user modal (click any row) on the all users page. New backend endpoints: PATCH /super-admin/users/:id and GET /super-admin/users/count.
  • UI cleanup: Removed decorative icons from all table cells and action buttons across organizations, all users, and org users pages. Renamed "Users" button to "View users". Set consistent 8px spacing between filter controls and action buttons.
  • Sidebar badge: User count pill on the "Users" menu item, powered by a lightweight count endpoint.
  • Settings breadcrumbs: Title simplified to "Settings" with icon. Password tab shows "Password" in breadcrumb trail.
  • Code quality: Extracted ROLE_OPTIONS and ROLE_COLORS as shared constants. Extracted EditUserModal and InviteUserModal as isolated components. Replaced native <select> with project Select component. Backend update query uses RETURNING CTE to eliminate redundant SELECT.

## 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.
@gorkem-bwl gorkem-bwl requested a review from HarshP4585 April 4, 2026 01:35
@gorkem-bwl gorkem-bwl added this to the 2.3 milestone Apr 4, 2026
Copy link
Copy Markdown
Collaborator

@MuhammadKhalilzadeh MuhammadKhalilzadeh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dashboard does not have any errors on the /super-admin view
And files look fine
Thanks @gorkem-bwl 👍🏻

Let's wait for @HarshP4585 checking it as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants