Files
Kalana B. Thilakarathna 531b3a7fef 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
2026-10-19 02:20:14 +05:30

36 lines
804 B
C#

using System.ComponentModel.DataAnnotations;
namespace Distribution.Features.User;
public record CreateUserRequest(
[EmailAddress] string Username,
string Password,
string FullName,
Guid RoleId,
Guid? ReportsToUserId);
public record UpdateUserRequest(
string FullName,
string? Username = null,
Guid? RoleId = null,
string? CurrentPassword = null,
string? NewPassword = null);
public record AssignUserRoleRequest(Guid RoleId);
public record AssignUserScopeRequest(
List<Guid> RegionIds,
List<Guid> RouteIds,
List<Guid> StoreIds);
public record UserResponse(
Guid Id,
string Username,
string FullName,
Guid RoleId,
string RoleName,
Guid? ReportsToUserId,
bool IsActive,
DateTime CreatedAt,
DateTime? UpdatedAt);