Klassenlehrer-Tab: Theme-Ressourcen statt Hex-Farben, gestapelter Trend, Fehlquote seit Schuljahresbeginn
Semantische Brushes (Light/Dark) lösen die fest codierten Dark-Hex-Werte ab, die im hellen Theme unbenutzbar waren. Trend-Chart zeigt jetzt einen echten gestapelten Balken über die letzten 7 Schultage statt drei unabhängig skalierten über Kalendertage; neue Fehlquote je Schüler*in seit Schuljahresbeginn ergänzt den Heute-Snapshot. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -3,6 +3,31 @@
|
||||
xmlns:vm="clr-namespace:LehrerApp.Desktop.ViewModels.ClassTeacher"
|
||||
x:Class="LehrerApp.Desktop.Views.ClassTeacher.ClassTeacherAbsencesView"
|
||||
x:DataType="vm:ClassTeacherDetailsViewModel">
|
||||
|
||||
<UserControl.Styles>
|
||||
<!-- Siehe Styles/SemanticBrushes.axaml: Farben per DynamicResource, damit der Theme-Wechsel
|
||||
sie live austauscht; die Statusfarbe je Zeile kommt als Style-Klasse aus dem ViewModel. -->
|
||||
<Style Selector="Border.filterCard">
|
||||
<Setter Property="Background" Value="{DynamicResource AppCardBackgroundBrush}"/>
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource AppCardBorderBrush}"/>
|
||||
<Setter Property="BorderThickness" Value="1"/>
|
||||
<Setter Property="CornerRadius" Value="8"/>
|
||||
<Setter Property="Padding" Value="10"/>
|
||||
</Style>
|
||||
<Style Selector="TextBlock.status">
|
||||
<Setter Property="Foreground" Value="{DynamicResource AppStatusOkBrush}"/>
|
||||
</Style>
|
||||
<Style Selector="TextBlock.status.info">
|
||||
<Setter Property="Foreground" Value="{DynamicResource AppStatusInfoBrush}"/>
|
||||
</Style>
|
||||
<Style Selector="TextBlock.status.warning">
|
||||
<Setter Property="Foreground" Value="{DynamicResource AppStatusWarningBrush}"/>
|
||||
</Style>
|
||||
<Style Selector="TextBlock.status.danger">
|
||||
<Setter Property="Foreground" Value="{DynamicResource AppStatusDangerBrush}"/>
|
||||
</Style>
|
||||
</UserControl.Styles>
|
||||
|
||||
<Grid RowDefinitions="Auto,Auto,*,Auto" Margin="16" RowSpacing="10">
|
||||
<Grid Grid.Row="0" ColumnDefinitions="*,Auto">
|
||||
<StackPanel>
|
||||
@@ -10,11 +35,10 @@
|
||||
<TextBlock Text="Pro Schüler*in und Tag über alle Fächer zusammengefasst" FontSize="12" Opacity="0.55"/>
|
||||
</StackPanel>
|
||||
<Button Grid.Column="1" Content="↻ Aus WebUntis aktualisieren" Command="{Binding RefreshCommand}"
|
||||
IsEnabled="{Binding !Busy}" Background="Transparent" Foreground="#5795F5" VerticalAlignment="Center"/>
|
||||
IsEnabled="{Binding !Busy}" Background="Transparent" Foreground="{DynamicResource AppAccentTextBrush}" VerticalAlignment="Center"/>
|
||||
</Grid>
|
||||
|
||||
<Border Grid.Row="1" Background="#11151B" BorderBrush="#2A3038" BorderThickness="1"
|
||||
CornerRadius="8" Padding="10">
|
||||
<Border Grid.Row="1" Classes="filterCard">
|
||||
<Grid RowDefinitions="Auto,Auto" RowSpacing="8">
|
||||
<Grid Grid.Row="0" ColumnDefinitions="155,Auto,*,Auto,*" ColumnSpacing="8">
|
||||
<ComboBox Grid.Column="0" SelectedIndex="{Binding QuickRangeIndex, Mode=TwoWay}">
|
||||
@@ -36,7 +60,7 @@
|
||||
|
||||
<Grid Grid.Row="2">
|
||||
<DataGrid ItemsSource="{Binding AbsenceEntries}" AutoGenerateColumns="False" IsReadOnly="True"
|
||||
GridLinesVisibility="Horizontal" BorderBrush="#2A3038" BorderThickness="1"
|
||||
GridLinesVisibility="Horizontal" BorderBrush="{DynamicResource AppCardBorderBrush}" BorderThickness="1"
|
||||
CanUserResizeColumns="True" CanUserSortColumns="True" RowHeight="48">
|
||||
<DataGrid.Columns>
|
||||
<DataGridTextColumn Header="Datum" Binding="{Binding DateLabel}" Width="105"/>
|
||||
@@ -44,15 +68,20 @@
|
||||
<DataGridTemplateColumn Header="Art" Width="1.15*">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate x:DataType="vm:ClassAbsenceDaySummaryRow">
|
||||
<TextBlock Text="{Binding KindLabel}" Foreground="{Binding StatusColor}" VerticalAlignment="Center"/>
|
||||
<TextBlock Text="{Binding KindLabel}" Classes="status"
|
||||
Classes.warning="{Binding IsWarningStatus}"
|
||||
Classes.danger="{Binding IsDangerStatus}" VerticalAlignment="Center"/>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>
|
||||
<DataGridTemplateColumn Header="Status" Width="1*">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
<DataTemplate x:DataType="vm:ClassAbsenceDaySummaryRow">
|
||||
<Border Background="#1C222A" CornerRadius="5" Padding="7,3" HorizontalAlignment="Left">
|
||||
<TextBlock Text="{Binding FriendlyStatusLabel}" Foreground="{Binding StatusColor}" FontSize="11"/>
|
||||
<Border Background="{DynamicResource AppChipBackgroundBrush}" CornerRadius="5"
|
||||
Padding="7,3" HorizontalAlignment="Left">
|
||||
<TextBlock Text="{Binding FriendlyStatusLabel}" Classes="status"
|
||||
Classes.warning="{Binding IsWarningStatus}"
|
||||
Classes.danger="{Binding IsDangerStatus}" FontSize="11"/>
|
||||
</Border>
|
||||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
|
||||
Reference in New Issue
Block a user