## Summary - Remove `IMPROVEMENT_PLAN.md`, `UI_IMPROVEMENT_PLAN.md` and `MCP_DESIGN.md`, plus the references to them. - Update all NuGet packages to latest. Fluent UI stays on **4.14.5**: 5.x is a breaking rewrite (toast/message services and the dialog API changed; 40+ build errors) and needs its own migration. - Move package versions into a central `Directory.Packages.props`; `PackageReference`s no longer carry versions. - Move `TargetFramework` (`net9.0`) into `Directory.Build.props`. - Add `global.json` pinning the SDK to 10.0.100 (`rollForward: latestFeature`). - Null-guard `editContext` in `BookingRuleDialog.SaveAsync` (an existing nullability warning that showed up on a full rebuild). ## Package updates | Package | From | To | |---|---|---| | Microsoft.FluentUI.AspNetCore.Components (+ Emoji, Icons) | 4.11.8 | 4.14.5 | | Plotly.Blazor | 6.0.1 | 7.2.0 (major) | | FreeSpire.PDF | 10.2.0 | 12.4.0 (major) | | Microsoft.Extensions.Logging.Abstractions | 10.0.9 | 10.0.13 | | Microsoft.NET.Test.Sdk | 17.12.0 | 18.11.0 | | xunit | 2.9.2 | 2.9.3 | | xunit.runner.visualstudio | 2.8.2 | 4.0.1 | | NSubstitute | 5.3.0 | 6.2.0 | | coverlet.collector | 6.0.2 | 10.1.0 | ## Test plan - [x] `dotnet build --no-incremental`: no warnings - [x] `dotnet test`: 58/58 pass - [ ] Manually check the chart pages (Plotly.Blazor 7) - [ ] Manually import a PDF bank statement (FreeSpire.PDF 12) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Reviewed-on: #1 Co-authored-by: Claudio Schaad <c.schaad@pog.ch> Co-committed-by: Claudio Schaad <c.schaad@pog.ch>
40 lines
1.9 KiB
C#
40 lines
1.9 KiB
C#
using Schaad.Accounting.Interfaces;
|
|
using Schaad.Accounting.Repositories;
|
|
using Schaad.Accounting.Services;
|
|
using Schaad.Finance.Api;
|
|
using Schaad.Finance.Services;
|
|
|
|
namespace Schaad.Accounting.UI
|
|
{
|
|
public static class Extensions
|
|
{
|
|
public static IServiceCollection AddAccounting(this IServiceCollection services)
|
|
{
|
|
// Singleton because MyHeader triggers a full page reload (forceLoad: true) after
|
|
// changing year/mandator; a Scoped instance would be recreated on the new circuit
|
|
// and lose the selection. TODO: persist selection to a cookie/query string so this
|
|
// can safely become Scoped.
|
|
services.AddSingleton<ISettingsService, SettingsService>();
|
|
|
|
services.AddScoped<RepositoryCache>();
|
|
services.AddScoped<IAccountRepository, AccountRepository>();
|
|
services.AddScoped<IBankTransactionRepository, BankTransactionRepository>();
|
|
services.AddScoped<IBookingRuleRepository, BookingRuleRepository>();
|
|
services.AddScoped<IBookingTextRepository, BookingTextRepository>();
|
|
services.AddScoped<ISplitPredefinitionRepository, SplitPredefinitionRepository>();
|
|
services.AddScoped<ISubclassRepository, SubclassRepository>();
|
|
services.AddScoped<ITransactionRepository, TransactionRepository>();
|
|
|
|
services.AddScoped<IChartService, ChartService>();
|
|
services.AddScoped<IViewService, ViewService>();
|
|
services.AddScoped<IFileService, FileService>();
|
|
services.AddScoped<IAccountStatementService, AccountStatementService>();
|
|
services.AddScoped<ICreditCardStatementService, CreditCardStatementService>();
|
|
services.AddSingleton<IFxService, DummyFxService>();
|
|
services.AddScoped<IFxConverter, FxConverter>();
|
|
services.AddSingleton<IPdfParsingService, PdfParsingService>();
|
|
|
|
return services;
|
|
}
|
|
}
|
|
}
|