Comenzando la implementación final de permisos y depuración. Se sigue...

This commit is contained in:
2025-06-03 18:42:56 -03:00
parent 062cc05fd0
commit 8fb94f8cef
46 changed files with 711 additions and 493 deletions

View File

@@ -71,6 +71,25 @@ namespace GestionIntegral.Api.Controllers.Impresion
}
}
// GET: api/plantas/dropdown
[HttpGet("dropdown")]
[ProducesResponseType(typeof(IEnumerable<PlantaDropdownDto>), StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
// NO chequeo TienePermiso("IP001")(requiere autenticación)
public async Task<IActionResult> GetPlantasForDropdown()
{
try
{
var plantas = await _plantaService.ObtenerParaDropdownAsync();
return Ok(plantas);
}
catch (Exception ex)
{
_logger.LogError(ex, "Error al obtener plantas para dropdown.");
return StatusCode(StatusCodes.Status500InternalServerError, "Error interno al obtener plantas para selección.");
}
}
// GET: api/plantas/{id}
// Permiso: IP001 (Ver Plantas)
[HttpGet("{id:int}", Name = "GetPlantaById")]