Cleaned code

This commit is contained in:
2026-05-24 17:24:44 +01:00
parent 656100d15e
commit 1434a5d77a
88 changed files with 197 additions and 213 deletions
@@ -19,7 +19,8 @@ public class AddProductoToQuotationEndpoint(
public override async Task HandleAsync(AddQuotationProductDto req, CancellationToken ct)
{
QuotationProduct? productQuotation = await quotationProductsRepository.SingleOrDefaultAsync(new GetQuotationProductByProductIdAndQuotationIdSpec(req.ProductId, req.QuotationId), ct);
QuotationProduct? productQuotation =
await quotationProductsRepository.SingleOrDefaultAsync(new GetQuotationProductByProductIdAndQuotationIdSpec(req.ProductId, req.QuotationId), ct);
if (productQuotation is not null)
{
@@ -28,7 +29,7 @@ public class AddProductoToQuotationEndpoint(
}
QuotationProduct quotationProduct = mapper.Map<QuotationProduct>(req);
await quotationProductsRepository.AddAsync(quotationProduct, ct);
await Send.NoContentAsync(ct);
}
@@ -33,7 +33,7 @@ public class CreateQuotationEndpoint(
Product? product = await productsRepository.SingleOrDefaultAsync(new GetProductByIdSpec(line.ProductId), ct);
QuotationProduct? quotationProduct =
await quotationProductsRepository.SingleOrDefaultAsync(new GetQuotationProductByProductIdAndQuotationIdSpec(line.ProductId, quotation.Id), ct);
if (product is null)
{
await Send.NotFoundAsync(ct);
@@ -10,7 +10,7 @@ namespace PyroFetes.Endpoints.Quotations;
public class GetQuotationPdfEndpoint(
QuotationsRepository quotationRepository,
IQuotationPdfService quotationPdfService,
IQuotationPdfService quotationPdfService,
SettingsRepository settingsRepository)
: Endpoint<GetQuotationPdfDto, byte[]>
{
@@ -32,7 +32,7 @@ public class GetQuotationPdfEndpoint(
}
Setting? setting = await settingsRepository.FirstOrDefaultAsync(ct);
byte[] bytes = quotationPdfService.Generate(quotation, quotation.QuotationProducts!, setting!);
await Send.BytesAsync(
@@ -28,7 +28,7 @@ public class PatchQuotationConditionsSaleEndpoint(
}
mapper.Map(req, quotation);
await quotationsRepository.SaveChangesAsync(ct);
await Send.NoContentAsync(ct);
}
@@ -28,7 +28,7 @@ public class PatchQuotationMessageEndpoint(
}
mapper.Map(req, quotation);
await quotationsRepository.SaveChangesAsync(ct);
await Send.NoContentAsync(ct);
}
@@ -28,7 +28,7 @@ public class PatchQuotationProductQuantityEndpoint(
}
mapper.Map(req, quotationProduct);
await quotationProductsRepository.SaveChangesAsync(ct);
await Send.NoContentAsync(ct);
}
@@ -28,7 +28,7 @@ public class UpdateQuotationEndpoint(
}
mapper.Map(req, quotation);
await quotationsRepository.SaveChangesAsync(ct);
await Send.NoContentAsync(ct);
}