From b3bb041317da03adfc0bf23ee45514841c02ba49 Mon Sep 17 00:00:00 2001 From: Claudio Schaad Date: Sun, 1 Nov 2026 18:45:15 +0000 Subject: [PATCH] Strom: align labels and inputs in the bill dialog (#20) Co-authored-by: Claudio Schaad Co-committed-by: Claudio Schaad --- .../Pages/Dialogs/ElectricityBillDialog.razor | 24 +++++-------- .../Dialogs/WaterHeatingBillDialog.razor | 34 +++++++++---------- .../Dialogs/WaterHeatingBillDialog.razor.css | 26 -------------- .../Components/Pages/Electricity.razor.cs | 4 +-- Schaad.Accounting.UI/wwwroot/app.css | 28 +++++++++++++++ 5 files changed, 56 insertions(+), 60 deletions(-) delete mode 100644 Schaad.Accounting.UI/Components/Pages/Dialogs/WaterHeatingBillDialog.razor.css diff --git a/Schaad.Accounting.UI/Components/Pages/Dialogs/ElectricityBillDialog.razor b/Schaad.Accounting.UI/Components/Pages/Dialogs/ElectricityBillDialog.razor index 76e588f..436791c 100644 --- a/Schaad.Accounting.UI/Components/Pages/Dialogs/ElectricityBillDialog.razor +++ b/Schaad.Accounting.UI/Components/Pages/Dialogs/ElectricityBillDialog.razor @@ -13,21 +13,15 @@ - - - - - - - - - - - - - - - +
+
+
+
+
+
+
+
+
diff --git a/Schaad.Accounting.UI/Components/Pages/Dialogs/WaterHeatingBillDialog.razor b/Schaad.Accounting.UI/Components/Pages/Dialogs/WaterHeatingBillDialog.razor index a76c893..7d79e29 100644 --- a/Schaad.Accounting.UI/Components/Pages/Dialogs/WaterHeatingBillDialog.razor +++ b/Schaad.Accounting.UI/Components/Pages/Dialogs/WaterHeatingBillDialog.razor @@ -14,32 +14,32 @@ -
-
-
+
+
+
NeoVac – Ablesequittung
-
-
-
-
+
+
+
+
NeoVac – Anteil (‰)
-
-
-
-
-
+
+
+
+
+
Verwaltung – Ihr Anteil
-
-
-
-
-
+
+
+
+
+
diff --git a/Schaad.Accounting.UI/Components/Pages/Dialogs/WaterHeatingBillDialog.razor.css b/Schaad.Accounting.UI/Components/Pages/Dialogs/WaterHeatingBillDialog.razor.css deleted file mode 100644 index 3153dc1..0000000 --- a/Schaad.Accounting.UI/Components/Pages/Dialogs/WaterHeatingBillDialog.razor.css +++ /dev/null @@ -1,26 +0,0 @@ -/* Two columns of fields; each field is a fixed-width label left of an input that fills the rest, - so labels and inputs line up across rows and sections. */ -.fields { - display: grid; - grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); - column-gap: 24px; - row-gap: 8px; -} - -.field { - display: flex; - align-items: center; - gap: 8px; -} - -.field ::deep .fluent-input-label { - flex: 0 0 140px; - margin: 0; -} - -.field ::deep fluent-number-field, -.field ::deep fluent-text-field { - flex: 1 1 auto; - min-width: 0; - width: auto; -} diff --git a/Schaad.Accounting.UI/Components/Pages/Electricity.razor.cs b/Schaad.Accounting.UI/Components/Pages/Electricity.razor.cs index 5124972..fce3213 100644 --- a/Schaad.Accounting.UI/Components/Pages/Electricity.razor.cs +++ b/Schaad.Accounting.UI/Components/Pages/Electricity.razor.cs @@ -104,7 +104,7 @@ public partial class Electricity : ComponentBase var data = new ElectricityBill(); var dialog = await dialogService.ShowDialogAsync(data, new DialogParameters() { - Width = "560px", + Width = "760px", Height = "460px", Title = "Abrechnung hinzufügen", PreventDismissOnOverlayClick = true, @@ -124,7 +124,7 @@ public partial class Electricity : ComponentBase var data = await electricityBillRepository.GetElectricityBillAsync(id); var dialog = await dialogService.ShowDialogAsync(data, new DialogParameters() { - Width = "560px", + Width = "760px", Height = "460px", Title = "Abrechnung bearbeiten", PreventDismissOnOverlayClick = true, diff --git a/Schaad.Accounting.UI/wwwroot/app.css b/Schaad.Accounting.UI/wwwroot/app.css index f5a882d..fda914b 100644 --- a/Schaad.Accounting.UI/wwwroot/app.css +++ b/Schaad.Accounting.UI/wwwroot/app.css @@ -17,6 +17,34 @@ a { min-height: calc(100vh - 96px); } +/* Fields in dialogs: two columns, each field a fixed-width label left of an input that fills the + rest, so labels and inputs line up across rows and sections. Fluent renders the label and the + input as siblings, so each field needs its own .dialog-field wrapper. */ +.dialog-fields { + display: grid; + grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); + column-gap: 24px; + row-gap: 8px; +} + +.dialog-field { + display: flex; + align-items: center; + gap: 8px; +} + +.dialog-field .fluent-input-label { + flex: 0 0 140px; + margin: 0; +} + +.dialog-field fluent-number-field, +.dialog-field fluent-text-field { + flex: 1 1 auto; + min-width: 0; + width: auto; +} + h1:focus { outline: none; }