Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/LageBuch.App.Shared/Theme/Styles.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,21 @@
<Setter Property="CornerRadius" Value="{StaticResource RadiusSm}" />
</Style>

<!-- Labeled field wrapper (#137): caption above an arbitrary input control. Styling the
built-in HeaderedContentControl rather than a bespoke control means a field can't be added
without a Header showing up somewhere in the tree — an empty label slot is visually obvious
in review, unlike a bare input silently missing its TextBlock sibling. -->
<Style Selector="HeaderedContentControl.field">
<Setter Property="Template">
<ControlTemplate>
<StackPanel Spacing="2">
<TextBlock Classes="overline" FontSize="10" Text="{TemplateBinding Header}" />
<ContentPresenter Content="{TemplateBinding Content}" />
</StackPanel>
</ControlTemplate>
</Setter>
</Style>

<!-- =========================================================
CHECKBOX
========================================================= -->
Expand Down
34 changes: 16 additions & 18 deletions src/LageBuch.App.Shared/Views/CoMessprotokollView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@
xmlns:vm="clr-namespace:LageBuch.AppLogic.ViewModels;assembly=LageBuch.AppLogic"
xmlns:conv="clr-namespace:LageBuch.App.Shared.Converters"
xmlns:dom="clr-namespace:LageBuch.Domain.CoMeasurement;assembly=LageBuch.Domain"
xmlns:md="clr-namespace:LageBuch.Persistence.MasterData;assembly=LageBuch.Persistence"
x:Class="LageBuch.App.Shared.Views.CoMessprotokollView"
x:DataType="vm:CoMessprotokollViewModel">
<DockPanel>
<!-- Title: every other tab leads with one at this same position (DockPanel.Dock="Top",
Margin bottom 14) — this view was missing it (#137). -->
<TextBlock DockPanel.Dock="Top" Text="CO-MESSPROTOKOLL" Classes="overline" Margin="0,0,0,14" />

<!-- Header: Building selector + actions -->
<Grid DockPanel.Dock="Top" ColumnDefinitions="*,Auto,Auto" Margin="0,0,0,14">
<ComboBox Grid.Column="0" ItemsSource="{Binding BuildingOptions}"
Expand Down Expand Up @@ -40,7 +45,8 @@
<TextBlock Text="NEUES HAUS HINZUFÜGEN" Classes="overline" />
<StackPanel Spacing="2">
<TextBlock Text="BEZEICHNUNG" Classes="overline" FontSize="10" />
<TextBox Text="{Binding NewBuildingName}" PlaceholderText="z. B. Haus A" />
<TextBox Text="{Binding NewBuildingName}"
PlaceholderText="{x:Static md:AnonymizedExampleData.BuildingNamePlaceholder}" />
</StackPanel>
<StackPanel Orientation="Horizontal" Spacing="8">
<StackPanel Spacing="2">
Expand Down Expand Up @@ -94,15 +100,8 @@
Padding="16"
IsEnabled="{Binding !IsReadOnly}">
<StackPanel Spacing="12">
<!-- Header with close button -->
<Grid ColumnDefinitions="*,Auto">
<TextBlock Grid.Column="0" Text="WOHNUNG BEARBEITEN" Classes="overline"
VerticalAlignment="Center" />
<Button Grid.Column="1" Content="&#x2715;"
Command="{Binding CloseEditorCommand}"
Background="Transparent" BorderThickness="0"
FontSize="14" Padding="4" />
</Grid>
<!-- ABBRECHEN below already closes the editor; no separate close affordance needed. -->
<TextBlock Text="WOHNUNG BEARBEITEN" Classes="overline" />

<!-- Status buttons -->
<TextBlock Text="STATUS" Classes="overline" FontSize="10" />
Expand All @@ -122,20 +121,19 @@
<StackPanel Spacing="2">
<TextBlock Text="CO-WERT (ppm)" Classes="overline" FontSize="10" />
<NumericUpDown Minimum="0" Maximum="9999" Value="{Binding SelectedCell.CoValue}"
FormatString="0" PlaceholderText="Kein Messwert" />
FormatString="0" PlaceholderText="Kein Messwert" ShowButtonSpinner="False" />
</StackPanel>

<!-- Resident Name -->
<StackPanel Spacing="2">
<TextBlock Text="NAME DER BEWOHNER" Classes="overline" FontSize="10" />
<TextBox Text="{Binding SelectedCell.ResidentName}" PlaceholderText="Optional" />
<TextBlock Text="NAME DER BEWOHNER (OPTIONAL)" Classes="overline" FontSize="10" />
<TextBox Text="{Binding SelectedCell.ResidentName}"
PlaceholderText="{x:Static md:AnonymizedExampleData.PersonDisplayNamePlaceholder}" />
</StackPanel>

<!-- Key Available -->
<StackPanel Orientation="Horizontal" Spacing="8">
<TextBlock Text="SCHLÜSSEL VORHANDEN" Classes="overline" FontSize="10" />
<CheckBox IsChecked="{Binding SelectedCell.KeyAvailable}" />
</StackPanel>
<!-- Key Available: label lives on the CheckBox itself (Content), matching RolesView's
"Alle Funktionen" checkbox, so the label and glyph share one baseline. -->
<CheckBox Content="Schlüssel vorhanden" IsChecked="{Binding SelectedCell.KeyAvailable}" />

<!-- Action buttons -->
<StackPanel Orientation="Horizontal" Spacing="8" HorizontalAlignment="Right">
Expand Down
81 changes: 50 additions & 31 deletions src/LageBuch.App.Shared/Views/EtbView.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,12 @@
xmlns:vm="clr-namespace:LageBuch.AppLogic.ViewModels;assembly=LageBuch.AppLogic"
xmlns:b="clr-namespace:LageBuch.App.Shared.Behaviors"
xmlns:etb="clr-namespace:LageBuch.Domain.Etb;assembly=LageBuch.Domain"
xmlns:md="clr-namespace:LageBuch.Persistence.MasterData;assembly=LageBuch.Persistence"
x:Class="LageBuch.App.Shared.Views.EtbView"
x:DataType="vm:EtbViewModel">
<DockPanel>
<Grid DockPanel.Dock="Top" ColumnDefinitions="*,Auto" Margin="0,0,0,14">
<TextBlock Grid.Column="0" Text="EINSATZTAGEBUCH" Classes="overline" VerticalAlignment="Center" />
<TextBlock Grid.Column="0" Text="EINSATZTAGEBUCH" Classes="overline" VerticalAlignment="Top" />
<CheckBox Grid.Column="1" x:Name="HideSystemCheckBox"
Content="Systemmeldungen ausblenden"
IsChecked="{Binding HideSystemEntries}" />
Expand All @@ -18,33 +19,46 @@
Background="#0F141D" BorderBrush="{StaticResource HairlineBrush}" BorderThickness="1"
CornerRadius="{StaticResource RadiusMd}" Padding="14">
<StackPanel Orientation="Horizontal" Spacing="8">
<ComboBox x:Name="DirectionBox" Width="130"
ItemsSource="{Binding DirectionOptions}"
SelectedValue="{Binding NewDirection}"
SelectedValueBinding="{Binding Value}">
<ComboBox.ItemTemplate>
<DataTemplate x:DataType="vm:EtbDirectionOption">
<TextBlock Text="{Binding Label}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
<HeaderedContentControl Classes="field" Header="RICHTUNG">
<ComboBox x:Name="DirectionBox" Width="130"
ItemsSource="{Binding DirectionOptions}"
SelectedValue="{Binding NewDirection}"
SelectedValueBinding="{Binding Value}">
<ComboBox.ItemTemplate>
<DataTemplate x:DataType="vm:EtbDirectionOption">
<TextBlock Text="{Binding Label}" />
</DataTemplate>
</ComboBox.ItemTemplate>
</ComboBox>
</HeaderedContentControl>
<!-- Suggestion list, not a closed set: a sender/recipient outside Stammdaten (e.g. "ELW 1",
a person's name) must stay enterable, so this is an AutoCompleteBox rather than a
ComboBox, mirroring ForcesView's Brigade field. -->
<AutoCompleteBox Width="110" PlaceholderText="Von" ItemsSource="{Binding CallSignOptions}"
FilterMode="ContainsOrdinal" MinimumPrefixLength="0"
Text="{Binding NewFrom}" b:EnterSubmit.Command="{Binding AddEntryCommand}" />
<AutoCompleteBox Width="110" PlaceholderText="An" ItemsSource="{Binding CallSignOptions}"
FilterMode="ContainsOrdinal" MinimumPrefixLength="0"
Text="{Binding NewTo}" b:EnterSubmit.Command="{Binding AddEntryCommand}" />
<TextBox x:Name="EtbTextBox" Width="320" PlaceholderText="Eintrag" Text="{Binding NewText}">
<TextBox.KeyBindings>
<KeyBinding Gesture="Enter" Command="{Binding AddEntryCommand}" />
</TextBox.KeyBindings>
</TextBox>
<Button x:Name="EtbAddButton" Classes="signal" Content="HINZUFÜGEN" Command="{Binding AddEntryCommand}" />
<HeaderedContentControl Classes="field" Header="VON">
<AutoCompleteBox Width="150" PlaceholderText="{x:Static md:AnonymizedExampleData.CallSignPlaceholder}"
ItemsSource="{Binding CallSignOptions}"
FilterMode="ContainsOrdinal" MinimumPrefixLength="0"
Text="{Binding NewFrom}" b:EnterSubmit.Command="{Binding AddEntryCommand}" />
</HeaderedContentControl>
<HeaderedContentControl Classes="field" Header="AN">
<AutoCompleteBox Width="150" PlaceholderText="{x:Static md:AnonymizedExampleData.SecondCallSignPlaceholder}"
ItemsSource="{Binding CallSignOptions}"
FilterMode="ContainsOrdinal" MinimumPrefixLength="0"
Text="{Binding NewTo}" b:EnterSubmit.Command="{Binding AddEntryCommand}" />
</HeaderedContentControl>
<HeaderedContentControl Classes="field" Header="EINTRAG">
<!-- Freitext: kein Platzhalter, siehe #137 -->
<TextBox x:Name="EtbTextBox" Width="320" Text="{Binding NewText}">
<TextBox.KeyBindings>
<KeyBinding Gesture="Enter" Command="{Binding AddEntryCommand}" />
</TextBox.KeyBindings>
</TextBox>
</HeaderedContentControl>
<Button x:Name="EtbAddButton" Classes="signal" Content="HINZUFÜGEN" Command="{Binding AddEntryCommand}"
VerticalAlignment="Bottom" Margin="0,0,0,1" />
<Button x:Name="EtbAddAndTaskButton" Classes="ghost" Content="HINZUFÜGEN &amp; AUFGABE"
Command="{Binding AddEntryAndCreateTaskCommand}" />
Command="{Binding AddEntryAndCreateTaskCommand}"
VerticalAlignment="Bottom" Margin="0,0,0,1" />
</StackPanel>
</Border>

Expand All @@ -55,13 +69,18 @@
CornerRadius="{StaticResource RadiusMd}" Padding="14"
IsVisible="{Binding IsEditing}">
<StackPanel Orientation="Horizontal" Spacing="8">
<TextBox x:Name="EditTextBox" Width="420" PlaceholderText="Eintrag" Text="{Binding EditText}">
<TextBox.KeyBindings>
<KeyBinding Gesture="Enter" Command="{Binding SaveEditCommand}" />
</TextBox.KeyBindings>
</TextBox>
<Button x:Name="SaveEditButton" Classes="signal" Content="SPEICHERN" Command="{Binding SaveEditCommand}" />
<Button x:Name="CancelEditButton" Content="ABBRECHEN" Command="{Binding CancelEditCommand}" />
<HeaderedContentControl Classes="field" Header="EINTRAG">
<!-- Freitext: kein Platzhalter, siehe #137 -->
<TextBox x:Name="EditTextBox" Width="420" Text="{Binding EditText}">
<TextBox.KeyBindings>
<KeyBinding Gesture="Enter" Command="{Binding SaveEditCommand}" />
</TextBox.KeyBindings>
</TextBox>
</HeaderedContentControl>
<Button x:Name="SaveEditButton" Classes="signal" Content="SPEICHERN" Command="{Binding SaveEditCommand}"
VerticalAlignment="Bottom" Margin="0,0,0,1" />
<Button x:Name="CancelEditButton" Content="ABBRECHEN" Command="{Binding CancelEditCommand}"
VerticalAlignment="Bottom" Margin="0,0,0,1" />
</StackPanel>
</Border>

Expand Down
37 changes: 32 additions & 5 deletions src/LageBuch.App.Shared/Views/FilesView.axaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<UserControl xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="clr-namespace:LageBuch.AppLogic.ViewModels;assembly=LageBuch.AppLogic"
xmlns:md="clr-namespace:LageBuch.Persistence.MasterData;assembly=LageBuch.Persistence"
x:Class="LageBuch.App.Shared.Views.FilesView"
x:DataType="vm:FilesViewModel">
<DockPanel>
<Grid DockPanel.Dock="Top" ColumnDefinitions="*,Auto" Margin="0,0,0,14">
<TextBlock Grid.Column="0" Text="DATEIEN" Classes="overline" VerticalAlignment="Center" />
<TextBlock Grid.Column="0" Text="DATEIEN" Classes="overline" VerticalAlignment="Top" />
<Button Grid.Column="1" x:Name="AddFileButton" Classes="signal" Content="DATEI HINZUFÜGEN"
Command="{Binding AddFileCommand}" IsVisible="{Binding !IsReadOnly}" />
</Grid>
Expand All @@ -24,15 +25,40 @@

<Border Background="#0C1119" BorderBrush="{StaticResource HairlineBrush}" BorderThickness="1"
CornerRadius="{StaticResource RadiusMd}" ClipToBounds="True" Padding="14">
<ScrollViewer>
<StackPanel Grid.IsSharedSizeScope="True">
<!-- Column headers: the rename box below has no other visible label (#137). Columns share
a SharedSizeGroup with the row template below so headers line up with their data even
though each row sizes its Auto columns to its own content. -->
<Grid Margin="0,0,0,8">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" SharedSizeGroup="FilesSize" />
<ColumnDefinition Width="Auto" SharedSizeGroup="FilesAdded" />
<ColumnDefinition Width="Auto" SharedSizeGroup="FilesAddedBy" />
<ColumnDefinition Width="Auto" SharedSizeGroup="FilesAction" />
</Grid.ColumnDefinitions>
<TextBlock Grid.Column="0" Text="NAME" Classes="overline" FontSize="10" />
<TextBlock Grid.Column="1" Text="GRÖSSE" Classes="overline" FontSize="10" Margin="10,0" />
<TextBlock Grid.Column="2" Text="HINZUGEFÜGT" Classes="overline" FontSize="10" Margin="10,0" />
<TextBlock Grid.Column="3" Text="VON" Classes="overline" FontSize="10" Margin="10,0" />
</Grid>
<ScrollViewer>
<ItemsControl x:Name="FilesList" ItemsSource="{Binding Files}">
<ItemsControl.ItemTemplate>
<DataTemplate x:DataType="vm:IncidentFileRow">
<Grid ColumnDefinitions="*,Auto,Auto,Auto,Auto" Margin="0,0,0,10">
<Grid Margin="0,0,0,10">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" SharedSizeGroup="FilesSize" />
<ColumnDefinition Width="Auto" SharedSizeGroup="FilesAdded" />
<ColumnDefinition Width="Auto" SharedSizeGroup="FilesAddedBy" />
<ColumnDefinition Width="Auto" SharedSizeGroup="FilesAction" />
</Grid.ColumnDefinitions>
<!-- Committing per keystroke saved the whole incident file on every character
typed (#33). UpdateSourceTrigger=LostFocus pushes once, when the operator
actually leaves the field. Mirrors ForcesView's Bemerkung fix. -->
<TextBox Grid.Column="0" Text="{Binding DisplayName, Mode=TwoWay, UpdateSourceTrigger=LostFocus}" PlaceholderText="Name"
<TextBox Grid.Column="0" Text="{Binding DisplayName, Mode=TwoWay, UpdateSourceTrigger=LostFocus}"
PlaceholderText="{x:Static md:AnonymizedExampleData.FileNamePlaceholder}"
BorderThickness="0" Background="Transparent" Padding="0"
VerticalAlignment="Center" IsEnabled="{Binding !IsReadOnly}" />
<TextBlock Grid.Column="1" Classes="mono" Text="{Binding SizeDisplay}" Margin="10,0"
Expand All @@ -50,7 +76,8 @@
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
</ScrollViewer>
</StackPanel>
</Border>
</DockPanel>
</UserControl>
Loading
Loading