chore(tests): dotnet format sobre archivos pre-existentes (surfaced durante CAT-001)
Fix mecánico de whitespace detectado por dotnet format --verify-no-changes durante la verify phase de CAT-001 (PR #30). Sin cambios funcionales.
This commit is contained in:
@@ -53,12 +53,12 @@ public sealed class FiscalController : ControllerBase
|
||||
IValidator<UpdateIngresosBrutosCommand> updateIibbValidator,
|
||||
IValidator<NuevaVersionIngresosBrutosCommand> nuevaVersionIibbValidator)
|
||||
{
|
||||
_dispatcher = dispatcher;
|
||||
_createIvaValidator = createIvaValidator;
|
||||
_updateIvaValidator = updateIvaValidator;
|
||||
_dispatcher = dispatcher;
|
||||
_createIvaValidator = createIvaValidator;
|
||||
_updateIvaValidator = updateIvaValidator;
|
||||
_nuevaVersionIvaValidator = nuevaVersionIvaValidator;
|
||||
_createIibbValidator = createIibbValidator;
|
||||
_updateIibbValidator = updateIibbValidator;
|
||||
_createIibbValidator = createIibbValidator;
|
||||
_updateIibbValidator = updateIibbValidator;
|
||||
_nuevaVersionIibbValidator = nuevaVersionIibbValidator;
|
||||
}
|
||||
|
||||
@@ -78,15 +78,15 @@ public sealed class FiscalController : ControllerBase
|
||||
[FromQuery] bool? activo = null,
|
||||
[FromQuery] string? codigo = null)
|
||||
{
|
||||
if (page < 1) return BadRequest(new { error = "page must be >= 1" });
|
||||
if (page < 1) return BadRequest(new { error = "page must be >= 1" });
|
||||
if (pageSize < 1) return BadRequest(new { error = "pageSize must be >= 1" });
|
||||
|
||||
var query = new ListTiposDeIvaQuery(page, pageSize, activo, codigo);
|
||||
var query = new ListTiposDeIvaQuery(page, pageSize, activo, codigo);
|
||||
var result = await _dispatcher.Send<ListTiposDeIvaQuery, PagedResult<TipoDeIvaDto>>(query);
|
||||
|
||||
return Ok(new
|
||||
{
|
||||
Items = result.Items.Select(FiscalContractMapper.ToIvaResponse).ToList(),
|
||||
Items = result.Items.Select(FiscalContractMapper.ToIvaResponse).ToList(),
|
||||
result.Page,
|
||||
result.PageSize,
|
||||
result.Total
|
||||
@@ -102,7 +102,7 @@ public sealed class FiscalController : ControllerBase
|
||||
[ProducesResponseType(StatusCodes.Status404NotFound)]
|
||||
public async Task<IActionResult> GetIvaById([FromRoute] int id)
|
||||
{
|
||||
var query = new GetTipoDeIvaByIdQuery(id);
|
||||
var query = new GetTipoDeIvaByIdQuery(id);
|
||||
var result = await _dispatcher.Send<GetTipoDeIvaByIdQuery, TipoDeIvaDto>(query);
|
||||
return Ok(FiscalContractMapper.ToIvaResponse(result));
|
||||
}
|
||||
@@ -115,7 +115,7 @@ public sealed class FiscalController : ControllerBase
|
||||
[ProducesResponseType(StatusCodes.Status403Forbidden)]
|
||||
public async Task<IActionResult> GetHistorialIva([FromRoute] int id)
|
||||
{
|
||||
var query = new GetHistorialTipoDeIvaQuery(id);
|
||||
var query = new GetHistorialTipoDeIvaQuery(id);
|
||||
var result = await _dispatcher.Send<GetHistorialTipoDeIvaQuery, IReadOnlyList<HistorialCadenaDto>>(query);
|
||||
return Ok(result.Select(FiscalContractMapper.ToHistorialIvaResponse).ToList());
|
||||
}
|
||||
@@ -143,10 +143,10 @@ public sealed class FiscalController : ControllerBase
|
||||
}
|
||||
|
||||
var command = new CreateTipoDeIvaCommand(
|
||||
Codigo: request.Codigo ?? string.Empty,
|
||||
Descripcion: request.Descripcion ?? string.Empty,
|
||||
Porcentaje: request.Porcentaje ?? 0m,
|
||||
AplicaIVA: request.AplicaIVA ?? false,
|
||||
Codigo: request.Codigo ?? string.Empty,
|
||||
Descripcion: request.Descripcion ?? string.Empty,
|
||||
Porcentaje: request.Porcentaje ?? 0m,
|
||||
AplicaIVA: request.AplicaIVA ?? false,
|
||||
VigenciaDesde: vigenciaDesde.Value,
|
||||
VigenciaHasta: vigenciaHasta);
|
||||
|
||||
@@ -202,11 +202,11 @@ public sealed class FiscalController : ControllerBase
|
||||
return BadRequest(new { error = "Request body is required" });
|
||||
|
||||
var command = new UpdateTipoDeIvaCommand(
|
||||
Id: id,
|
||||
Codigo: request.Codigo ?? string.Empty,
|
||||
Id: id,
|
||||
Codigo: request.Codigo ?? string.Empty,
|
||||
Descripcion: request.Descripcion ?? string.Empty,
|
||||
AplicaIVA: request.AplicaIVA ?? false,
|
||||
Activo: request.Activo ?? true);
|
||||
AplicaIVA: request.AplicaIVA ?? false,
|
||||
Activo: request.Activo ?? true);
|
||||
|
||||
var validation = await _updateIvaValidator.ValidateAsync(command);
|
||||
if (!validation.IsValid)
|
||||
@@ -239,9 +239,9 @@ public sealed class FiscalController : ControllerBase
|
||||
return BadRequest(new { error = "vigenciaDesde must be a valid date (yyyy-MM-dd)" });
|
||||
|
||||
var command = new NuevaVersionTipoDeIvaCommand(
|
||||
PredecesoraId: id,
|
||||
PredecesoraId: id,
|
||||
NuevoPorcentaje: request.Porcentaje ?? 0m,
|
||||
VigenciaDesde: vigenciaDesde.Value);
|
||||
VigenciaDesde: vigenciaDesde.Value);
|
||||
|
||||
var validation = await _nuevaVersionIvaValidator.ValidateAsync(command);
|
||||
if (!validation.IsValid)
|
||||
@@ -269,7 +269,7 @@ public sealed class FiscalController : ControllerBase
|
||||
public async Task<IActionResult> DeactivateIva([FromRoute] int id)
|
||||
{
|
||||
var command = new DeactivateTipoDeIvaCommand(id);
|
||||
var result = await _dispatcher.Send<DeactivateTipoDeIvaCommand, TipoDeIvaDto>(command);
|
||||
var result = await _dispatcher.Send<DeactivateTipoDeIvaCommand, TipoDeIvaDto>(command);
|
||||
return Ok(FiscalContractMapper.ToIvaResponse(result));
|
||||
}
|
||||
|
||||
@@ -283,7 +283,7 @@ public sealed class FiscalController : ControllerBase
|
||||
public async Task<IActionResult> ReactivateIva([FromRoute] int id)
|
||||
{
|
||||
var command = new ReactivateTipoDeIvaCommand(id);
|
||||
var result = await _dispatcher.Send<ReactivateTipoDeIvaCommand, TipoDeIvaDto>(command);
|
||||
var result = await _dispatcher.Send<ReactivateTipoDeIvaCommand, TipoDeIvaDto>(command);
|
||||
return Ok(FiscalContractMapper.ToIvaResponse(result));
|
||||
}
|
||||
|
||||
@@ -303,7 +303,7 @@ public sealed class FiscalController : ControllerBase
|
||||
[FromQuery] bool? activo = null,
|
||||
[FromQuery] string? provincia = null)
|
||||
{
|
||||
if (page < 1) return BadRequest(new { error = "page must be >= 1" });
|
||||
if (page < 1) return BadRequest(new { error = "page must be >= 1" });
|
||||
if (pageSize < 1) return BadRequest(new { error = "pageSize must be >= 1" });
|
||||
|
||||
ProvinciaArgentina? provinciaEnum = null;
|
||||
@@ -314,12 +314,12 @@ public sealed class FiscalController : ControllerBase
|
||||
provinciaEnum = parsed;
|
||||
}
|
||||
|
||||
var query = new ListIngresosBrutosQuery(page, pageSize, activo, provinciaEnum);
|
||||
var query = new ListIngresosBrutosQuery(page, pageSize, activo, provinciaEnum);
|
||||
var result = await _dispatcher.Send<ListIngresosBrutosQuery, PagedResult<IngresosBrutosDto>>(query);
|
||||
|
||||
return Ok(new
|
||||
{
|
||||
Items = result.Items.Select(FiscalContractMapper.ToIibbResponse).ToList(),
|
||||
Items = result.Items.Select(FiscalContractMapper.ToIibbResponse).ToList(),
|
||||
result.Page,
|
||||
result.PageSize,
|
||||
result.Total
|
||||
@@ -335,7 +335,7 @@ public sealed class FiscalController : ControllerBase
|
||||
[ProducesResponseType(StatusCodes.Status404NotFound)]
|
||||
public async Task<IActionResult> GetIibbById([FromRoute] int id)
|
||||
{
|
||||
var query = new GetIngresosBrutosByIdQuery(id);
|
||||
var query = new GetIngresosBrutosByIdQuery(id);
|
||||
var result = await _dispatcher.Send<GetIngresosBrutosByIdQuery, IngresosBrutosDto>(query);
|
||||
return Ok(FiscalContractMapper.ToIibbResponse(result));
|
||||
}
|
||||
@@ -348,7 +348,7 @@ public sealed class FiscalController : ControllerBase
|
||||
[ProducesResponseType(StatusCodes.Status403Forbidden)]
|
||||
public async Task<IActionResult> GetHistorialIibb([FromRoute] int id)
|
||||
{
|
||||
var query = new GetHistorialIngresosBrutosQuery(id);
|
||||
var query = new GetHistorialIngresosBrutosQuery(id);
|
||||
var result = await _dispatcher.Send<GetHistorialIngresosBrutosQuery, IReadOnlyList<HistorialCadenaIibbDto>>(query);
|
||||
return Ok(result.Select(FiscalContractMapper.ToHistorialIibbResponse).ToList());
|
||||
}
|
||||
@@ -397,9 +397,9 @@ public sealed class FiscalController : ControllerBase
|
||||
}
|
||||
|
||||
var command = new CreateIngresosBrutosCommand(
|
||||
Provincia: provinciaEnum,
|
||||
Descripcion: request.Descripcion ?? string.Empty,
|
||||
Alicuota: request.Alicuota ?? 0m,
|
||||
Provincia: provinciaEnum,
|
||||
Descripcion: request.Descripcion ?? string.Empty,
|
||||
Alicuota: request.Alicuota ?? 0m,
|
||||
VigenciaDesde: vigenciaDesde.Value,
|
||||
VigenciaHasta: vigenciaHasta);
|
||||
|
||||
@@ -453,9 +453,9 @@ public sealed class FiscalController : ControllerBase
|
||||
return BadRequest(new { error = "Request body is required" });
|
||||
|
||||
var command = new UpdateIngresosBrutosCommand(
|
||||
Id: id,
|
||||
Id: id,
|
||||
Descripcion: request.Descripcion ?? string.Empty,
|
||||
Activo: request.Activo ?? true);
|
||||
Activo: request.Activo ?? true);
|
||||
|
||||
var validation = await _updateIibbValidator.ValidateAsync(command);
|
||||
if (!validation.IsValid)
|
||||
@@ -518,7 +518,7 @@ public sealed class FiscalController : ControllerBase
|
||||
public async Task<IActionResult> DeactivateIibb([FromRoute] int id)
|
||||
{
|
||||
var command = new DeactivateIngresosBrutosCommand(id);
|
||||
var result = await _dispatcher.Send<DeactivateIngresosBrutosCommand, IngresosBrutosDto>(command);
|
||||
var result = await _dispatcher.Send<DeactivateIngresosBrutosCommand, IngresosBrutosDto>(command);
|
||||
return Ok(FiscalContractMapper.ToIibbResponse(result));
|
||||
}
|
||||
|
||||
@@ -532,7 +532,7 @@ public sealed class FiscalController : ControllerBase
|
||||
public async Task<IActionResult> ReactivateIibb([FromRoute] int id)
|
||||
{
|
||||
var command = new ReactivateIngresosBrutosCommand(id);
|
||||
var result = await _dispatcher.Send<ReactivateIngresosBrutosCommand, IngresosBrutosDto>(command);
|
||||
var result = await _dispatcher.Send<ReactivateIngresosBrutosCommand, IngresosBrutosDto>(command);
|
||||
return Ok(FiscalContractMapper.ToIibbResponse(result));
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace SIGCM2.Application.Common;
|
||||
/// </summary>
|
||||
public sealed record PermisosOverride(
|
||||
[property: JsonPropertyName("grant")] IReadOnlyList<string> Grant,
|
||||
[property: JsonPropertyName("deny")] IReadOnlyList<string> Deny)
|
||||
[property: JsonPropertyName("deny")] IReadOnlyList<string> Deny)
|
||||
{
|
||||
/// <summary>No overrides — empty grant and deny.</summary>
|
||||
public static readonly PermisosOverride Empty =
|
||||
@@ -46,7 +46,7 @@ public sealed record PermisosOverride(
|
||||
|
||||
return new PermisosOverride(
|
||||
parsed.Grant ?? Array.Empty<string>(),
|
||||
parsed.Deny ?? Array.Empty<string>());
|
||||
parsed.Deny ?? Array.Empty<string>());
|
||||
}
|
||||
catch (JsonException)
|
||||
{
|
||||
|
||||
@@ -37,7 +37,7 @@ public sealed class UpdateUsuarioPermisosOverridesCommandHandler
|
||||
public async Task<UsuarioPermisosDto> Handle(UpdateUsuarioPermisosOverridesCommand command)
|
||||
{
|
||||
var grant = command.Grant ?? [];
|
||||
var deny = command.Deny ?? [];
|
||||
var deny = command.Deny ?? [];
|
||||
|
||||
// 1. Overlap check — grant ∩ deny → 400
|
||||
var overlap = grant.Intersect(deny, StringComparer.Ordinal).ToArray();
|
||||
|
||||
@@ -40,30 +40,30 @@ public static class ProvinciaArgentinaExtensions
|
||||
{
|
||||
private static readonly Dictionary<ProvinciaArgentina, string> DisplayNames = new()
|
||||
{
|
||||
[ProvinciaArgentina.BuenosAires] = "Buenos Aires",
|
||||
[ProvinciaArgentina.Catamarca] = "Catamarca",
|
||||
[ProvinciaArgentina.Chaco] = "Chaco",
|
||||
[ProvinciaArgentina.Chubut] = "Chubut",
|
||||
[ProvinciaArgentina.BuenosAires] = "Buenos Aires",
|
||||
[ProvinciaArgentina.Catamarca] = "Catamarca",
|
||||
[ProvinciaArgentina.Chaco] = "Chaco",
|
||||
[ProvinciaArgentina.Chubut] = "Chubut",
|
||||
[ProvinciaArgentina.CiudadAutonomaDeBuenosAires] = "Ciudad Autónoma de Buenos Aires",
|
||||
[ProvinciaArgentina.Cordoba] = "Córdoba",
|
||||
[ProvinciaArgentina.Corrientes] = "Corrientes",
|
||||
[ProvinciaArgentina.EntreRios] = "Entre Ríos",
|
||||
[ProvinciaArgentina.Formosa] = "Formosa",
|
||||
[ProvinciaArgentina.Jujuy] = "Jujuy",
|
||||
[ProvinciaArgentina.LaPampa] = "La Pampa",
|
||||
[ProvinciaArgentina.LaRioja] = "La Rioja",
|
||||
[ProvinciaArgentina.Mendoza] = "Mendoza",
|
||||
[ProvinciaArgentina.Misiones] = "Misiones",
|
||||
[ProvinciaArgentina.Neuquen] = "Neuquén",
|
||||
[ProvinciaArgentina.RioNegro] = "Río Negro",
|
||||
[ProvinciaArgentina.Salta] = "Salta",
|
||||
[ProvinciaArgentina.SanJuan] = "San Juan",
|
||||
[ProvinciaArgentina.SanLuis] = "San Luis",
|
||||
[ProvinciaArgentina.SantaCruz] = "Santa Cruz",
|
||||
[ProvinciaArgentina.SantaFe] = "Santa Fe",
|
||||
[ProvinciaArgentina.SantiagoDelEstero] = "Santiago del Estero",
|
||||
[ProvinciaArgentina.TierraDelFuego] = "Tierra del Fuego",
|
||||
[ProvinciaArgentina.Tucuman] = "Tucumán",
|
||||
[ProvinciaArgentina.Cordoba] = "Córdoba",
|
||||
[ProvinciaArgentina.Corrientes] = "Corrientes",
|
||||
[ProvinciaArgentina.EntreRios] = "Entre Ríos",
|
||||
[ProvinciaArgentina.Formosa] = "Formosa",
|
||||
[ProvinciaArgentina.Jujuy] = "Jujuy",
|
||||
[ProvinciaArgentina.LaPampa] = "La Pampa",
|
||||
[ProvinciaArgentina.LaRioja] = "La Rioja",
|
||||
[ProvinciaArgentina.Mendoza] = "Mendoza",
|
||||
[ProvinciaArgentina.Misiones] = "Misiones",
|
||||
[ProvinciaArgentina.Neuquen] = "Neuquén",
|
||||
[ProvinciaArgentina.RioNegro] = "Río Negro",
|
||||
[ProvinciaArgentina.Salta] = "Salta",
|
||||
[ProvinciaArgentina.SanJuan] = "San Juan",
|
||||
[ProvinciaArgentina.SanLuis] = "San Luis",
|
||||
[ProvinciaArgentina.SantaCruz] = "Santa Cruz",
|
||||
[ProvinciaArgentina.SantaFe] = "Santa Fe",
|
||||
[ProvinciaArgentina.SantiagoDelEstero] = "Santiago del Estero",
|
||||
[ProvinciaArgentina.TierraDelFuego] = "Tierra del Fuego",
|
||||
[ProvinciaArgentina.Tucuman] = "Tucumán",
|
||||
};
|
||||
|
||||
private static readonly Dictionary<string, ProvinciaArgentina> ByDisplayName =
|
||||
|
||||
@@ -8,35 +8,35 @@ namespace SIGCM2.Domain.Permissions;
|
||||
public static class Permiso
|
||||
{
|
||||
// ── Ventas: contado ──────────────────────────────────────────────────────
|
||||
public const string VentasContadoCrear = "ventas:contado:crear";
|
||||
public const string VentasContadoModificar = "ventas:contado:modificar";
|
||||
public const string VentasContadoCobrar = "ventas:contado:cobrar";
|
||||
public const string VentasContadoFacturar = "ventas:contado:facturar";
|
||||
public const string VentasContadoCrear = "ventas:contado:crear";
|
||||
public const string VentasContadoModificar = "ventas:contado:modificar";
|
||||
public const string VentasContadoCobrar = "ventas:contado:cobrar";
|
||||
public const string VentasContadoFacturar = "ventas:contado:facturar";
|
||||
|
||||
// ── Ventas: cuenta corriente ─────────────────────────────────────────────
|
||||
public const string VentasCtacteCrear = "ventas:ctacte:crear";
|
||||
public const string VentasCtacteFacturar = "ventas:ctacte:facturar";
|
||||
public const string VentasCtacteCrear = "ventas:ctacte:crear";
|
||||
public const string VentasCtacteFacturar = "ventas:ctacte:facturar";
|
||||
|
||||
// ── Textos ───────────────────────────────────────────────────────────────
|
||||
public const string TextosEditar = "textos:editar";
|
||||
public const string TextosReclamosVer = "textos:reclamos:ver";
|
||||
public const string TextosEditar = "textos:editar";
|
||||
public const string TextosReclamosVer = "textos:reclamos:ver";
|
||||
|
||||
// ── Pauta ────────────────────────────────────────────────────────────────
|
||||
public const string PautaAzanuVer = "pauta:azanu:ver";
|
||||
public const string PautaLimpiar = "pauta:limpiar";
|
||||
public const string PautaAzanuVer = "pauta:azanu:ver";
|
||||
public const string PautaLimpiar = "pauta:limpiar";
|
||||
public const string PautaRecursosFueraDeHora = "pauta:recursos:fueradehora";
|
||||
|
||||
// ── Productores ──────────────────────────────────────────────────────────
|
||||
public const string ProductoresDeudaVer = "productores:deuda:ver";
|
||||
public const string ProductoresPendientesCrear = "productores:pendientes:crear";
|
||||
public const string ProductoresDeudaBypass = "productores:deuda:bypass";
|
||||
public const string ProductoresDeudaVer = "productores:deuda:ver";
|
||||
public const string ProductoresPendientesCrear = "productores:pendientes:crear";
|
||||
public const string ProductoresDeudaBypass = "productores:deuda:bypass";
|
||||
|
||||
// ── Administración ───────────────────────────────────────────────────────
|
||||
public const string AdministracionUsuariosGestionar = "administracion:usuarios:gestionar";
|
||||
public const string AdministracionUsuariosGestionar = "administracion:usuarios:gestionar";
|
||||
public const string AdministracionTarifariosGestionar = "administracion:tarifarios:gestionar";
|
||||
public const string AdministracionMediosGestionar = "administracion:medios:gestionar";
|
||||
public const string AdministracionAuditoriaVer = "administracion:auditoria:ver";
|
||||
public const string AdministracionFiscalGestionar = "administracion:fiscal:gestionar";
|
||||
public const string AdministracionMediosGestionar = "administracion:medios:gestionar";
|
||||
public const string AdministracionAuditoriaVer = "administracion:auditoria:ver";
|
||||
public const string AdministracionFiscalGestionar = "administracion:fiscal:gestionar";
|
||||
|
||||
/// <summary>
|
||||
/// Set completo de todos los códigos canónicos (útil para validación y seeds).
|
||||
|
||||
@@ -57,7 +57,7 @@ public static class JsonSanitizer
|
||||
}
|
||||
break;
|
||||
|
||||
// JsonValue: scalar, nothing to strip
|
||||
// JsonValue: scalar, nothing to strip
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user