## 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>
46 lines
No EOL
1.2 KiB
C#
46 lines
No EOL
1.2 KiB
C#
using Microsoft.AspNetCore.Components;
|
|
using Microsoft.AspNetCore.Components.Forms;
|
|
using Microsoft.FluentUI.AspNetCore.Components;
|
|
using Schaad.Accounting.Interfaces;
|
|
using Schaad.Accounting.Models;
|
|
|
|
namespace Schaad.Accounting.UI.Components.Pages.Dialogs;
|
|
|
|
public partial class BookingRuleDialog : ComponentBase
|
|
{
|
|
private EditContext? editContext;
|
|
|
|
[CascadingParameter]
|
|
public FluentDialog Dialog { get; set; } = null!;
|
|
|
|
[Parameter]
|
|
public BookingRule Content { get; set; } = null!;
|
|
|
|
[Inject]
|
|
private IBookingRuleRepository bookingRuleRepository { get; set; } = null!;
|
|
|
|
[Inject]
|
|
private IViewService viewService { get; set; } = null!;
|
|
|
|
private IReadOnlyList<Account> accounts = [];
|
|
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
editContext = new EditContext(Content);
|
|
accounts = await viewService.GetAccountViewListAsync();
|
|
}
|
|
|
|
private async Task SaveAsync()
|
|
{
|
|
if (editContext is not null && editContext.Validate())
|
|
{
|
|
await bookingRuleRepository.SaveBookingRuleAsync(Content);
|
|
await Dialog.CloseAsync(Content);
|
|
}
|
|
}
|
|
|
|
private async Task CancelAsync()
|
|
{
|
|
await Dialog.CancelAsync();
|
|
}
|
|
} |