Redesign login UI, add theme toggle, refactor user update
- Redesigned login page with two-panel layout and branding - Added HexaDistro logo and theme toggle to sidebar/header - Refactored user update: roles via update endpoint, removed assignRole API/controller - Extended UpdateUserRequest for username, role, password changes - UserService.UpdateAsync syncs changes with AuthHex, with rollback - Stock balances client dedupes by itemId-locationId - Middleware matcher excludes static assets from auth checks - Improved localStorage clearing for user context - Added lucide-react for icons - Minor UI/code cleanups for consistency and UX
This commit is contained in:
@@ -13,6 +13,10 @@ export interface CreateUserBody {
|
||||
|
||||
export interface UpdateUserBody {
|
||||
fullName: string
|
||||
username?: string
|
||||
roleId?: string
|
||||
currentPassword?: string
|
||||
newPassword?: string
|
||||
}
|
||||
|
||||
export const users = {
|
||||
@@ -28,9 +32,6 @@ export const users = {
|
||||
update: (id: string, body: UpdateUserBody) =>
|
||||
api.put<UserResponse>(`/users/${id}`, body).then(r => r.data),
|
||||
|
||||
assignRole: (id: string, roleId: string) =>
|
||||
api.put<UserResponse>(`/users/${id}/role`, { roleId }).then(r => r.data),
|
||||
|
||||
deactivate: (id: string) =>
|
||||
api.delete(`/users/${id}`),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user