Refinamiento de permisos y ajustes en controles. Añade gestión sobre saldos y visualización. Entre otros..

This commit is contained in:
2025-06-06 18:33:09 -03:00
parent 8fb94f8cef
commit 35e24ab7d2
104 changed files with 5917 additions and 1205 deletions

View File

@@ -47,11 +47,11 @@ namespace GestionIntegral.Api.Controllers.Distribucion
[HttpGet]
[ProducesResponseType(typeof(IEnumerable<CanillaDto>), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status403Forbidden)]
public async Task<IActionResult> GetAllCanillas([FromQuery] string? nomApe, [FromQuery] int? legajo, [FromQuery] bool? soloActivos = true)
public async Task<IActionResult> GetAllCanillas([FromQuery] string? nomApe, [FromQuery] int? legajo, [FromQuery] bool? esAccionista, [FromQuery] bool? soloActivos = true)
{
if (!TienePermiso(PermisoVer)) return Forbid();
var canillas = await _canillaService.ObtenerTodosAsync(nomApe, legajo, soloActivos);
return Ok(canillas);
var canillitas = await _canillaService.ObtenerTodosAsync(nomApe, legajo, soloActivos, esAccionista); // <<-- Pasa el parámetro
return Ok(canillitas);
}
// GET: api/canillas/{id}
@@ -117,7 +117,7 @@ namespace GestionIntegral.Api.Controllers.Distribucion
public async Task<IActionResult> ToggleBajaCanilla(int id, [FromBody] ToggleBajaCanillaDto bajaDto)
{
if (!TienePermiso(PermisoBaja)) return Forbid();
if (!ModelState.IsValid) return BadRequest(ModelState);
if (!ModelState.IsValid) return BadRequest(ModelState);
var idUsuario = GetCurrentUserId();
if (idUsuario == null) return Unauthorized();