added PDF generation for quotation

This commit is contained in:
2025-12-03 17:00:02 +01:00
parent d709654410
commit bee1cfb0e3
8 changed files with 226 additions and 0 deletions

View File

@@ -6,9 +6,14 @@ using FastEndpoints.Swagger;
using FastEndpoints.Security;
using PyroFetes.MappingProfiles;
using PyroFetes.Repositories;
using PyroFetes.Services.Pdf;
using QuestPDF.Infrastructure;
WebApplicationBuilder builder = WebApplication.CreateBuilder(args);
// Configurer la licence QuestPDF
QuestPDF.Settings.License = LicenseType.Community;
// On ajoute ici FastEndpoints, un framework REPR et Swagger aux services disponibles dans le projet
builder.Services
.AddAuthenticationJwtBearer(s => s.SigningKey = "ThisIsASuperSecretJwtKeyThatIsAtLeast32CharsLong")
@@ -46,6 +51,8 @@ builder.Services.AddScoped<SettingsRepository>();
builder.Services.AddScoped<UsersRepository>();
builder.Services.AddScoped<WarehouseProductsRepository>();
builder.Services.AddScoped<IQuotationPdfService, QuotationPdfService>();
MapperConfiguration mappingConfig = new(mc =>
{
mc.AddCollectionMappers();