AccountingNext/Schaad.Accounting.UI/Components/Pages/Accounts.razor
Claudio Schaad f4d9158552 Add "Texte bereinigen" page for cleaning booking texts
Stammdaten -> Texte bereinigen shows the bookings of one account in the
selected year and edits only their Text: inline, search and replace (plain or
regex with $1 groups) over the listed rows, tidying spaces, or setting one
text for selected rows. A group panel shows the first-word groups the Analyse
page will use, updated live. Saving goes through
RawDataRepository.SaveTransactionTextsAsync: refused if the file changed since
loading or a text is empty, previous version backed up, atomic save.

Opened from the menu, a button per account on Konten, and a link on the
Analyse page at account level.

Also: the content area fills the window between header and footer, so
dropdowns on short pages are no longer cut off.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 20:31:09 +02:00

36 lines
2.1 KiB
Text

@page "/Accounts"
@rendermode InteractiveServer
<PageTitle>Konten</PageTitle>
<FluentStack Orientation="Orientation.Horizontal" VerticalAlignment="VerticalAlignment.Center">
<FluentButton IconStart="@(new Icons.Regular.Size16.Add())" Appearance="Appearance.Neutral" OnClick="AddAsync">Neues Konto hinzufügen</FluentButton>
<FluentSearch @bind-Value="filter" Immediate="true" Placeholder="Filter…" Style="width: 300px;"/>
</FluentStack>
<FluentPaginator State="@pagination" SummaryTemplate="@template" />
<FluentDataGrid Items="@Filtered" Pagination="@pagination" RowSize="DataGridRowSize.Medium">
<PropertyColumn Property="@(p => p.Class)" Sortable="true" Width="100px" />
<PropertyColumn Property="@(p => p.SubClass)" Sortable="true" Width="140px" />
<PropertyColumn Property="@(p => p.Number)" Sortable="true" IsDefaultSortColumn="true" Width="140px" />
<PropertyColumn Property="@(p => p.Name)" Sortable="true" />
<PropertyColumn Property="@(p => p.Currency)" />
<PropertyColumn Property="@(p => p.BankAccountNumber)" />
<PropertyColumn Property="@(p => p.StartBalance)" Format="C2"/>
<PropertyColumn Property="@(p => p.LastBankBalance)" Format="C2" />
<TemplateColumn Align="Align.Center" Width="50px">
<FluentAnchor Href="@($"text-cleanup?acc={context.Number}")" Appearance="Appearance.Neutral" IconStart="@(new Icons.Regular.Size16.TextEditStyle())" title="Buchungstexte bereinigen" aria-label="Buchungstexte bereinigen" />
</TemplateColumn>
<TemplateColumn Align="Align.Center" Width="50px">
<FluentButton IconEnd="@(new Icons.Regular.Size16.Delete())" Appearance="Appearance.Neutral" title="Löschen" aria-label="Löschen" OnClick="@(() => DeleteAsync(context.Id))" />
</TemplateColumn>
<TemplateColumn Align="Align.Center" Width="50px">
<FluentButton IconEnd="@(new Icons.Regular.Size16.Edit())" Appearance="Appearance.Neutral" title="Bearbeiten" aria-label="Bearbeiten" OnClick="@(() => EditAsync(context.Id))" />
</TemplateColumn>
</FluentDataGrid>
@code
{
private RenderFragment template = @<span />;
PaginationState pagination = new PaginationState() { ItemsPerPage = 20 };
}