AccountingNext/Schaad.Accounting.UI/Components/Pages/BookingRules.razor

26 lines
1.3 KiB
Text

@page "/bookingrules"
@rendermode InteractiveServer
<PageTitle>Buchungsregeln</PageTitle>
<FluentButton IconStart="@(new Icons.Regular.Size16.Add())" Appearance="Appearance.Neutral" OnClick="AddAsync">Neue Regel hinzufügen</FluentButton>
<FluentPaginator State="@pagination" SummaryTemplate="@template" />
<FluentDataGrid Items="@bookingRulesQueryable" Pagination="@pagination" RowSize="DataGridRowSize.Medium">
<PropertyColumn Property="@(p => p.LookupText)" Sortable="true" IsDefaultSortColumn="true" />
<PropertyColumn Property="@(p => p.LookupValue)" Format="C2" Align="Align.End"/>
<PropertyColumn Property="@(p => p.BookingText)" />
<PropertyColumn Property="@(p => p.Account)" />
<TemplateColumn Align="Align.Center" Width="50px">
<FluentButton IconEnd="@(new Icons.Regular.Size16.Delete())" Appearance="Appearance.Neutral" OnClick="@(() => DeleteAsync(context.Id))" />
</TemplateColumn>
<TemplateColumn Align="Align.Center" Width="50px">
<FluentButton IconEnd="@(new Icons.Regular.Size16.Edit())" Appearance="Appearance.Neutral" OnClick="@(() => EditAsync(context.Id))" />
</TemplateColumn>
</FluentDataGrid>
@code
{
private RenderFragment template = @<span />;
PaginationState pagination = new PaginationState() { ItemsPerPage = 20 };
}