Same layout as the Strom page: grid and dialog for the bills (warm and cold water in m3 and CHF, base costs; total m3 and CHF are computed), stored per mandator in water.json, and charts for consumption and total costs with the period toggle (bill, calendar year, half-year). The period grouping is now generic: ElectricityPeriod becomes BillPeriod<T> over IPeriodBill<T>, implemented by ElectricityBill and WaterBill. water.json can be edited in the JSON editor. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
51 lines
2.2 KiB
Text
51 lines
2.2 KiB
Text
@implements IDialogContentComponent<Schaad.Accounting.Models.WaterBill>
|
|
@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>
|
|
<EditForm EditContext="@editContext">
|
|
<DataAnnotationsValidator />
|
|
<FluentStack Orientation="Orientation.Horizontal">
|
|
<FluentDatePicker @bind-Value="@periodFrom" Label="Von" Style="width: 170px;" />
|
|
<FluentDatePicker @bind-Value="@periodTo" Label="Bis" Style="width: 170px;" />
|
|
</FluentStack>
|
|
<FluentStack Orientation="Orientation.Horizontal">
|
|
<FluentNumberField @bind-Value="@Content.WarmWaterM3" Label="Warmwasser (m³)" Style="width: 170px;" />
|
|
<FluentNumberField @bind-Value="@Content.ColdWaterM3" Label="Kaltwasser (m³)" Style="width: 170px;" />
|
|
</FluentStack>
|
|
<FluentStack Orientation="Orientation.Horizontal">
|
|
<FluentNumberField @bind-Value="@Content.WarmWaterChf" Label="Warmwasser (CHF)" Style="width: 170px;" />
|
|
<FluentNumberField @bind-Value="@Content.ColdWaterChf" Label="Kaltwasser (CHF)" Style="width: 170px;" />
|
|
</FluentStack>
|
|
<FluentStack Orientation="Orientation.Horizontal">
|
|
<FluentNumberField @bind-Value="@Content.BaseCostsChf" Label="Grundkosten (CHF)" Style="width: 170px;" />
|
|
</FluentStack>
|
|
<div>
|
|
<FluentValidationSummary />
|
|
</div>
|
|
</EditForm>
|
|
|
|
<div style="margin-top: 12px; font-size: 13px; color: #52514e;">
|
|
Total <strong>@M3(Content.TotalM3)</strong> · <strong>@Chf(Content.TotalChf)</strong>
|
|
</div>
|
|
</FluentDialogBody>
|
|
|
|
<FluentDialogFooter>
|
|
<FluentButton Appearance="Appearance.Neutral"
|
|
OnClick="@CancelAsync">
|
|
Abbrechen
|
|
</FluentButton>
|
|
<FluentButton Appearance="Appearance.Accent"
|
|
Disabled="@(periodFrom is null || periodTo is null)"
|
|
OnClick="@SaveAsync">
|
|
Speichern
|
|
</FluentButton>
|
|
</FluentDialogFooter>
|