feature: Digitization Workstation UI

This commit is contained in:
voltsrage
2026-06-27 12:15:43 +08:00
parent 88e70b3dbe
commit e22d33b654
55 changed files with 6411 additions and 143 deletions
@@ -0,0 +1,32 @@
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
/// <summary>
/// User directory for batch assignment and operational lookups.
/// </summary>
[ApiController]
[Route("api/v1/users")]
[Produces("application/json")]
[Authorize]
public class UsersController : ControllerBase
{
private readonly IUserDirectoryService _users;
public UsersController(IUserDirectoryService users) => _users = users;
/// <summary>
/// Lists active users, optionally filtered by role.
/// </summary>
[HttpGet]
[Authorize(Roles = "INTAKE_CLERK,ADMINISTRATOR")]
[ProducesResponseType(typeof(ApiResponse<IReadOnlyList<UserSummaryResponse>>), StatusCodes.Status200OK)]
public async Task<IActionResult> List([FromQuery] string? role)
{
UserRole? parsedRole = null;
if (!string.IsNullOrWhiteSpace(role))
parsedRole = UserRoleExtensions.FromDbString(role);
var results = await _users.ListByRoleAsync(parsedRole);
return Ok(ApiResponse<IReadOnlyList<UserSummaryResponse>>.Ok(results));
}
}