Layout Updates
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using QuestPDF.Fluent;
|
||||
using QuestPDF.Infrastructure;
|
||||
using Server.Data;
|
||||
using Server.Model;
|
||||
|
||||
@@ -19,6 +21,7 @@ namespace Server.Components.Pages
|
||||
{
|
||||
parameters.SetParameterProperties(this);
|
||||
|
||||
await SettingsData.LoadAsync();
|
||||
Invoices = await InvoiceData.LoadAllAsync();
|
||||
|
||||
await base.SetParametersAsync(ParameterView.Empty);
|
||||
@@ -41,5 +44,22 @@ namespace Server.Components.Pages
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Private Method GenerateDocumentAsync
|
||||
|
||||
/// <summary>
|
||||
/// Generates a PDF document asynchronously for the given invoice.
|
||||
/// </summary>
|
||||
/// <param name="invoice">The invoice model for which to generate the document.</param>
|
||||
/// <returns>A task representing the asynchronous document generation operation.</returns>
|
||||
private Task GenerateDocumentAsync(InvoiceModel invoice)
|
||||
{
|
||||
QuestPDF.Settings.License = LicenseType.Community;
|
||||
var doc = new InvoiceDocument(invoice);
|
||||
doc.GeneratePdfAndShow();
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user