Cleaned code
This commit is contained in:
@@ -8,7 +8,8 @@ using PyroFetes.Specifications.DeliveryNotes;
|
|||||||
|
|
||||||
namespace PyroFetes.Endpoints.DeliveryNotes;
|
namespace PyroFetes.Endpoints.DeliveryNotes;
|
||||||
|
|
||||||
public class GetDeliveryNotePdfEndpoint(DeliveryNotesRepository deliveryNotesRepository, IDeliveryNotePdfService deliveryNotePdfService, SettingsRepository settingsRepository) : Endpoint<GetDeliveryNotePdfDto, byte[]>
|
public class GetDeliveryNotePdfEndpoint(DeliveryNotesRepository deliveryNotesRepository, IDeliveryNotePdfService deliveryNotePdfService, SettingsRepository settingsRepository)
|
||||||
|
: Endpoint<GetDeliveryNotePdfDto, byte[]>
|
||||||
{
|
{
|
||||||
public override void Configure()
|
public override void Configure()
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -19,7 +19,8 @@ public class AddProductoToQuotationEndpoint(
|
|||||||
|
|
||||||
public override async Task HandleAsync(AddQuotationProductDto req, CancellationToken ct)
|
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)
|
if (productQuotation is not null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -35,7 +35,5 @@ namespace PyroFetes.Models
|
|||||||
public List<QuotationProduct>? QuotationProducts { get; set; }
|
public List<QuotationProduct>? QuotationProducts { get; set; }
|
||||||
public List<WarehouseProduct>? WarehouseProducts { get; set; }
|
public List<WarehouseProduct>? WarehouseProducts { get; set; }
|
||||||
public List<ProductTimecode>? ProductTimecodes { get; set; }
|
public List<ProductTimecode>? ProductTimecodes { get; set; }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -11,5 +11,4 @@ public class ProductEffect
|
|||||||
|
|
||||||
public Effect? Effect { get; set; }
|
public Effect? Effect { get; set; }
|
||||||
[Required] public int EffectId { get; set; }
|
[Required] public int EffectId { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -11,5 +11,4 @@ public class ShowMaterial
|
|||||||
|
|
||||||
public Material? Material { get; set; }
|
public Material? Material { get; set; }
|
||||||
[Required] public int MaterialId { get; set; }
|
[Required] public int MaterialId { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -5,5 +5,4 @@ namespace PyroFetes.Models;
|
|||||||
public class ShowServiceProvider
|
public class ShowServiceProvider
|
||||||
{
|
{
|
||||||
[Key] public int Id { get; set; }
|
[Key] public int Id { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -20,10 +20,7 @@ builder.Services
|
|||||||
.AddAuthenticationJwtBearer(s => s.SigningKey = "ThisIsASuperSecretJwtKeyThatIsAtLeast32CharsLong")
|
.AddAuthenticationJwtBearer(s => s.SigningKey = "ThisIsASuperSecretJwtKeyThatIsAtLeast32CharsLong")
|
||||||
.AddAuthorization()
|
.AddAuthorization()
|
||||||
.AddFastEndpoints()
|
.AddFastEndpoints()
|
||||||
.SwaggerDocument(options =>
|
.SwaggerDocument(options => { options.ShortSchemaNames = true; })
|
||||||
{
|
|
||||||
options.ShortSchemaNames = true;
|
|
||||||
})
|
|
||||||
.AddCors(options =>
|
.AddCors(options =>
|
||||||
{
|
{
|
||||||
options.AddDefaultPolicy(policyBuilder =>
|
options.AddDefaultPolicy(policyBuilder =>
|
||||||
|
|||||||
@@ -121,10 +121,7 @@ public class DeliveryNotePdfService : IDeliveryNotePdfService
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Signature en bas à droite
|
// Signature en bas à droite
|
||||||
page.Footer().AlignRight().Column(col =>
|
page.Footer().AlignRight().Column(col => { col.Item().AlignRight().Height(100).Image(signature, ImageScaling.FitArea); });
|
||||||
{
|
|
||||||
col.Item().AlignRight().Height(100).Image(signature, ImageScaling.FitArea);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -138,10 +138,7 @@ public class PurchaseOrderPdfService : IPurchaseOrderPdfService
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Signature en bas à droite
|
// Signature en bas à droite
|
||||||
page.Footer().AlignRight().Column(col =>
|
page.Footer().AlignRight().Column(col => { col.Item().AlignRight().Height(100).Image(signature, ImageScaling.FitArea); });
|
||||||
{
|
|
||||||
col.Item().AlignRight().Height(100).Image(signature, ImageScaling.FitArea);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -131,10 +131,7 @@ public class QuotationPdfService : IQuotationPdfService
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Signature en bas à droite
|
// Signature en bas à droite
|
||||||
page.Footer().AlignRight().Column(col =>
|
page.Footer().AlignRight().Column(col => { col.Item().AlignRight().Height(100).Image(signature, ImageScaling.FitArea); });
|
||||||
{
|
|
||||||
col.Item().AlignRight().Height(100).Image(signature, ImageScaling.FitArea);
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -9,6 +9,5 @@ public sealed class GetProductTotalQuantitySpec : Specification<WarehouseProduct
|
|||||||
{
|
{
|
||||||
Query
|
Query
|
||||||
.Where(wp => wp.ProductId == productId);
|
.Where(wp => wp.ProductId == productId);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user