- CSS: drop the Bootstrap template leftovers (NavMenu.razor.css, most of MainLayout.razor.css, button/form rules in app.css) and the copied Fluent demo rules in BankTransactions.razor.css. - Bootstrap: keep only bootstrap.min.css (+ map); 42 unused files removed. - Credit-card statement import, never wired into the Blazor UI: service methods, GetCreditCardStatementPath, DI registrations for ICreditCardStatementService/IPdfParsingService, FreeSpire.PDF. - CSV export (GetTransactionListCsvAsync), only called from tests. - Split predefinitions: model, repository and the JSON editor entry. - Unused members: TrySetYear, GetUploadPath (+ DataFolders.Uploads), GetClasses; unused usings, fields and parameters. - Home.razor.css -> PendingBookings.razor.css: the pending-bookings table moved there in "PR U-10" and had lost its styling since. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
53 lines
1.6 KiB
C#
53 lines
1.6 KiB
C#
using Microsoft.AspNetCore.Components;
|
|
using Plotly.Blazor;
|
|
using Plotly.Blazor.LayoutLib;
|
|
using Schaad.Accounting.Interfaces;
|
|
|
|
namespace Schaad.Accounting.UI.Components.Pages.Charts;
|
|
|
|
public partial class BookingTextOverTime : ComponentBase
|
|
{
|
|
private Config? config;
|
|
private Plotly.Blazor.Layout? layout;
|
|
private IList<ITrace> data = new List<ITrace>();
|
|
|
|
[Parameter, EditorRequired]
|
|
public string AccountId { get; set; } = null!;
|
|
|
|
[Inject]
|
|
private IChartService chartService { get; set; } = null!;
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
config = ChartTheme.BaseConfig();
|
|
|
|
layout = ChartTheme.BaseLayout("Nach Buchungstext im Verlauf");
|
|
layout.BarMode = BarModeEnum.Stack;
|
|
layout.BarCornerRadius = 4;
|
|
layout.HoverMode = HoverModeEnum.XUnified;
|
|
layout.XAxis = new List<XAxis>
|
|
{
|
|
new()
|
|
{
|
|
Type = Plotly.Blazor.LayoutLib.XAxisLib.TypeEnum.Category,
|
|
GridColor = ChartTheme.GridColor,
|
|
LineColor = ChartTheme.GridColor
|
|
}
|
|
};
|
|
layout.YAxis = new List<YAxis>
|
|
{
|
|
new()
|
|
{
|
|
Title = new Plotly.Blazor.LayoutLib.YAxisLib.Title { Text = "CHF" },
|
|
GridColor = ChartTheme.GridColor,
|
|
ZeroLineColor = ChartTheme.GridColor,
|
|
SeparateThousands = true
|
|
}
|
|
};
|
|
|
|
var dataSeries = await chartService.GetBookingTextExpensesPerMonthAsync(AccountId);
|
|
data = ChartTheme.BuildStackedBarTraces(ChartFormatting.FoldTail(dataSeries));
|
|
|
|
await base.OnInitializedAsync();
|
|
}
|
|
}
|