The "Stand neu" fields for warm water, cold water and heat and their continuity checks are gone; the per-mille, property total and price checks stay. The "Kontrolle" heading is only shown when there is a check. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
115 lines
5.8 KiB
Text
115 lines
5.8 KiB
Text
@implements IDialogContentComponent<Schaad.Accounting.Models.WaterHeatingBill>
|
||
@rendermode InteractiveServer
|
||
@using Schaad.Accounting.Models
|
||
|
||
<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" @bind-Value:after="SyncPeriod" Label="Von" Style="width: 210px;" />
|
||
<FluentDatePicker @bind-Value="@periodTo" @bind-Value:after="SyncPeriod" Label="Bis" Style="width: 210px;" />
|
||
</FluentStack>
|
||
|
||
<div style="@SectionStyle">NeoVac – Ablesequittung</div>
|
||
<FluentStack Orientation="Orientation.Horizontal">
|
||
<FluentNumberField @bind-Value="@Content.WarmWaterM3" @bind-Value:after="Content.CalculateCosts" Label="Warmwasser (m³)" Style="width: 210px;" />
|
||
<FluentNumberField @bind-Value="@Content.ColdWaterM3" @bind-Value:after="Content.CalculateCosts" Label="Kaltwasser (m³)" Style="width: 210px;" />
|
||
<FluentNumberField @bind-Value="@Content.HeatingMwh" Label="Wärme (MWh)" Style="width: 210px;" />
|
||
</FluentStack>
|
||
|
||
<div style="@SectionStyle">NeoVac – Anteil (‰)</div>
|
||
<FluentStack Orientation="Orientation.Horizontal">
|
||
<FluentNumberField @bind-Value="@Content.WaterBasePermille" @bind-Value:after="Content.CalculateCosts" Label="Wasser Grund (‰)" Style="width: 210px;" />
|
||
<FluentNumberField @bind-Value="@Content.WaterConsumptionPermille" @bind-Value:after="Content.CalculateCosts" Label="Wasser Verbrauch (‰)" Style="width: 210px;" />
|
||
</FluentStack>
|
||
<FluentStack Orientation="Orientation.Horizontal">
|
||
<FluentNumberField @bind-Value="@Content.HeatingPermille" @bind-Value:after="Content.CalculateCosts" Label="Heizung total (‰)" Style="width: 210px;" />
|
||
<FluentNumberField @bind-Value="@Content.WarmWaterHeatingPermille" @bind-Value:after="Content.CalculateCosts" Label="Heizung WW (‰)" Style="width: 210px;" />
|
||
</FluentStack>
|
||
|
||
<div style="@SectionStyle">Verwaltung – Ihr Anteil</div>
|
||
<FluentStack Orientation="Orientation.Horizontal">
|
||
<FluentNumberField @bind-Value="@Content.WaterCostsChf" @bind-Value:after="Content.CalculateCosts" Label="Wasserkosten (CHF)" Style="width: 210px;" />
|
||
<FluentNumberField @bind-Value="@Content.HeatingCostsChf" @bind-Value:after="Content.CalculateCosts" Label="Heizkosten (CHF)" Style="width: 210px;" />
|
||
</FluentStack>
|
||
<FluentStack Orientation="Orientation.Horizontal">
|
||
<FluentNumberField @bind-Value="@Content.ManagerWaterPermille" Label="Wasser (‰, optional)" Style="width: 210px;" />
|
||
<FluentNumberField @bind-Value="@Content.ManagerHeatingPermille" Label="Heizung (‰, optional)" Style="width: 210px;" />
|
||
</FluentStack>
|
||
<div>
|
||
<FluentValidationSummary />
|
||
</div>
|
||
</EditForm>
|
||
|
||
<div style="margin-top: 12px; font-size: 13px; color: #52514e;">
|
||
Wasser: Grundkosten <strong>@Chf(Content.BaseCostsChf)</strong>
|
||
· Warmwasser <strong>@Chf(Content.WarmWaterChf)</strong>
|
||
· Kaltwasser <strong>@Chf(Content.ColdWaterChf)</strong>
|
||
</div>
|
||
<div style="margin-top: 4px; font-size: 13px; color: #52514e;">
|
||
Heizung: Warmwasser <strong>@Chf(Content.WarmWaterHeatingChf)</strong>
|
||
· Räume <strong>@Chf(Content.RoomHeatingChf)</strong>
|
||
</div>
|
||
<div style="margin-top: 4px; font-size: 13px; color: #52514e;">
|
||
Total <strong>@M3(Content.TotalM3)</strong> · <strong>@Mwh(Content.HeatingMwh)</strong> · <strong>@Chf(Content.TotalChf)</strong>
|
||
</div>
|
||
|
||
@if (Checks is { Count: > 0 } checks)
|
||
{
|
||
<div style="@SectionStyle">Kontrolle</div>
|
||
@foreach (var check in checks)
|
||
{
|
||
<div style="font-size: 13px; color: @CheckColor(check.Result);">@CheckSymbol(check.Result) @check.Text</div>
|
||
}
|
||
}
|
||
|
||
<FluentButton Appearance="Appearance.Lightweight" Style="margin-top: 12px; padding: 0; font-size: 13px;" OnClick="ShowGuideAsync">
|
||
Woher kommen die Werte? (NeoVac-Abrechnung)
|
||
</FluentButton>
|
||
</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>
|
||
|
||
@code {
|
||
private const string SectionStyle = "margin-top: 14px; margin-bottom: 4px; font-size: 11px; font-weight: bold; color: #898781; text-transform: uppercase;";
|
||
|
||
// Shown in its own dialog (see ShowGuideAsync) instead of expanding inline: this dialog has a
|
||
// fixed Height, and FluentDialogBody doesn't resize to fit growing content.
|
||
private RenderFragment GuideImage =>
|
||
@<img src="/images/water-heating-bill-guide.svg"
|
||
alt="Beispiel-Abrechnung mit Markierungen, welcher Wert in welches Feld gehört"
|
||
style="width: 100%; height: auto; display: block;" />;
|
||
|
||
private static string CheckSymbol(BillCheckResult result) => result switch
|
||
{
|
||
BillCheckResult.Ok => "✓",
|
||
BillCheckResult.Warning => "⚠",
|
||
_ => "·"
|
||
};
|
||
|
||
private static string CheckColor(BillCheckResult result) => result switch
|
||
{
|
||
BillCheckResult.Ok => "#1a7f37",
|
||
BillCheckResult.Warning => "#c4314b",
|
||
_ => "#52514e"
|
||
};
|
||
}
|