AccountingNext/Schaad.Accounting.UI/Components/Pages/Dialogs/TransactionDialog.razor
Claudio Schaad 58ca05f83e PR U-5: shared Loading component
Add Components/Loading.razor and swap the ad-hoc `<p>Lädt…</p>` guard
visuals for it across the four reports, three edit dialogs, and three
chart pages (the last three now show the placeholder instead of a
blank page while waiting for view data). Kept as a pure visual so
each call site changes from `<p>Lädt…</p>` to `<Loading/>` with no
other churn.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-07-04 09:44:23 +02:00

63 lines
No EOL
2.3 KiB
Text

@implements IDialogContentComponent<Schaad.Accounting.Models.Transaction>
@rendermode InteractiveServer
<FluentDialogHeader ShowDismiss="true">
<FluentStack VerticalAlignment="VerticalAlignment.Center">
<FluentIcon Value="@(new Icons.Regular.Size24.WindowApps())" />
<FluentLabel Typo="Typography.PaneHeader">
@Dialog.Instance.Parameters.Title
</FluentLabel>
</FluentStack>
</FluentDialogHeader>
<FluentDialogBody>
@if (editContext is null)
{
<Loading/>
return;
}
<EditForm EditContext="@editContext">
<DataAnnotationsValidator />
<FluentDatePicker @bind-Value="@SelectedValue" Label="Valuta" Style="width: 300px;"/>
<FluentSelect TOption="Account"
Label="von"
Items="@accounts"
Width="300px"
Height="250px"
Required="true"
Placeholder="Konto auswählen..."
OptionValue="@(p => p.Id)"
OptionText="@(p => p.Number + " / " + p.Name)"
@bind-Value="@Content.OriginAccountId" />
<FluentSelect TOption="Account"
Label="nach"
Items="@accounts"
Width="300px"
Height="250px"
Required="true"
Placeholder="Konto auswählen..."
OptionValue="@(p => p.Id)"
OptionText="@(p => p.Number + " / " + p.Name)"
@bind-Value="@Content.TargetAccountId" />
<FluentNumberField @bind-Value="@Content.Value" Label="Betrag" Style="width: 300px;"/>
<FluentTextField @bind-Value="@Content.Text" Label="Buchungstext" Style="width: 300px;" />
<FluentNumberField @bind-Value="@Content.FxRate" Label="Kurs" Style="width: 100px;" />
<div>
<FluentValidationSummary />
</div>
</EditForm>
</FluentDialogBody>
<FluentDialogFooter>
<FluentButton Appearance="Appearance.Neutral"
OnClick="@CancelAsync">
Abbrechen
</FluentButton>
<FluentButton Appearance="Appearance.Accent"
Disabled="@(SelectedValue is null)"
OnClick="@SaveAsync">
Speichern
</FluentButton>
</FluentDialogFooter>