Implementación AnomalIA - Fix de dropdowns y permisos.
All checks were successful
Optimized Build and Deploy / remote-build-and-deploy (push) Successful in 5m17s

This commit is contained in:
2025-06-30 15:26:14 -03:00
parent 95aa09d62a
commit c96d259892
59 changed files with 1430 additions and 337 deletions

View File

@@ -50,10 +50,19 @@ namespace GestionIntegral.Api.Controllers.Distribucion
public async Task<IActionResult> GetAllCanillas([FromQuery] string? nomApe, [FromQuery] int? legajo, [FromQuery] bool? esAccionista, [FromQuery] bool? soloActivos = true)
{
if (!TienePermiso(PermisoVer)) return Forbid();
var canillitas = await _canillaService.ObtenerTodosAsync(nomApe, legajo, soloActivos, esAccionista); // <<-- Pasa el parámetro
var canillitas = await _canillaService.ObtenerTodosAsync(nomApe, legajo, soloActivos, esAccionista);
return Ok(canillitas);
}
[HttpGet("dropdown")]
[ProducesResponseType(typeof(IEnumerable<CanillaDropdownDto>), StatusCodes.Status200OK)]
public async Task<IActionResult> GetAllDropdownCanillas([FromQuery] bool? esAccionista, [FromQuery] bool? soloActivos = true)
{
var canillitas = await _canillaService.ObtenerTodosDropdownAsync(esAccionista, soloActivos);
return Ok(canillitas);
}
// GET: api/canillas/{id}
[HttpGet("{id:int}", Name = "GetCanillaById")]
[ProducesResponseType(typeof(CanillaDto), StatusCodes.Status200OK)]

View File

@@ -64,6 +64,23 @@ namespace GestionIntegral.Api.Controllers.Distribucion
}
}
[HttpGet("dropdown")]
[ProducesResponseType(typeof(IEnumerable<OtroDestinoDropdownDto>), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
public async Task<IActionResult> GetAllOtrosDestinosDropdown()
{
try
{
var destinos = await _otroDestinoService.ObtenerTodosDropdownAsync();
return Ok(destinos);
}
catch (Exception ex)
{
_logger.LogError(ex, "Error al obtener Otros Destinos para dropdown.");
return StatusCode(StatusCodes.Status500InternalServerError, "Error interno al obtener la lista de destinos.");
}
}
// GET: api/otrosdestinos/{id}
[HttpGet("{id:int}", Name = "GetOtroDestinoById")]
[ProducesResponseType(typeof(OtroDestinoDto), StatusCodes.Status200OK)]