Mitarbeits Wizzard und neue Statuslabels für Anwesenheit und Hausaufgaben

This commit is contained in:
2026-08-13 01:49:40 +02:00
parent febcb0855a
commit 741586846a
10 changed files with 1160 additions and 144 deletions
@@ -1,10 +1,11 @@
<Window xmlns="https://github.com/avaloniaui"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="clr-namespace:LehrerApp.Desktop.ViewModels.Groups"
xmlns:views="clr-namespace:LehrerApp.Desktop.Views.Groups"
x:Class="LehrerApp.Desktop.Views.Groups.ParticipationWizardDialog"
x:DataType="vm:ParticipationWizardDialogViewModel"
Title="Mitarbeits-Assistent"
Width="920" Height="760" MinWidth="720" MinHeight="520"
Width="1080" Height="820" MinWidth="760" MinHeight="620"
CanResize="True" WindowStartupLocation="CenterOwner">
<Grid RowDefinitions="Auto,Auto,*,Auto,Auto,Auto" Margin="24">
@@ -21,89 +22,85 @@
</Grid>
</StackPanel>
<TextBlock Grid.Row="1" Text="Zeitleiste" FontSize="13" FontWeight="SemiBold" Margin="0,14,0,6"/>
<ScrollViewer Grid.Row="2" HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled">
<ItemsControl ItemsSource="{Binding Timeline}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" Spacing="10"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.Styles>
<Style Selector="Border.sectionband">
<Setter Property="Background" Value="#E1F5EE"/>
<Setter Property="BorderThickness" Value="0"/>
</Style>
<Style Selector="Border.sectionband.open">
<Setter Property="Background" Value="Transparent"/>
<Setter Property="BorderThickness" Value="1.5"/>
<Setter Property="BorderBrush" Value="{DynamicResource SystemControlForegroundBaseMediumBrush}"/>
</Style>
<Style Selector="Button.haicon">
<Setter Property="Opacity" Value="0.2"/>
</Style>
<Style Selector="Button.haicon.active">
<Setter Property="Opacity" Value="1"/>
<Setter Property="Background" Value="#E24B4A"/>
<Setter Property="Foreground" Value="White"/>
</Style>
<Style Selector="Button.attendanceicon">
<Setter Property="Opacity" Value="0.2"/>
</Style>
<Style Selector="Button.attendanceicon.active">
<Setter Property="Opacity" Value="1"/>
<Setter Property="Background" Value="#EF9F27"/>
<Setter Property="Foreground" Value="White"/>
</Style>
</ItemsControl.Styles>
<ItemsControl.ItemTemplate>
<DataTemplate x:DataType="vm:WizardSectionGroup">
<Border Classes="sectionband" Classes.open="{Binding IsOpen}" CornerRadius="6" Padding="8,8" VerticalAlignment="Top">
<StackPanel Spacing="6">
<TextBlock Text="{Binding BandLabel}" FontSize="10" Opacity="0.6" TextAlignment="Center"/>
<ItemsControl ItemsSource="{Binding Points}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate>
<StackPanel Orientation="Horizontal" Spacing="8"/>
</ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate x:DataType="vm:WizardTimelinePoint">
<StackPanel Width="54" ToolTip.Tip="{Binding TooltipText}">
<TextBlock Text="{Binding DateDisplay}" FontSize="9" Opacity="0.5" HorizontalAlignment="Center"/>
<Border IsVisible="{Binding !IsExam}" Background="{DynamicResource SystemControlBackgroundAccentBrush}"
CornerRadius="3" Padding="4,1" HorizontalAlignment="Center" Margin="0,2">
<TextBlock Text="{Binding RatingLabel}" FontSize="11" Foreground="White" HorizontalAlignment="Center"/>
</Border>
<Border IsVisible="{Binding IsExam}" Background="#7F77DD"
CornerRadius="3" Padding="3,1" HorizontalAlignment="Center" Margin="0,2">
<TextBlock Text="{Binding ExamLabel}" FontSize="9" Foreground="White"
HorizontalAlignment="Center" TextWrapping="Wrap" TextAlignment="Center"/>
</Border>
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" Spacing="2"
IsVisible="{Binding !IsExam}">
<Button Classes="haicon" Classes.active="{Binding HasHomework}"
Content="HA" FontSize="8" Padding="3,0" Command="{Binding ToggleHomeworkCommand}"
ToolTip.Tip="Hausaufgaben vergessen (an/aus)"/>
<Button Classes="attendanceicon" Classes.active="{Binding IsAbsent}"
Content="{Binding AttendanceButtonLabel}" FontSize="8" Padding="3,0"
Command="{Binding CycleAttendanceCommand}"
ToolTip.Tip="{Binding AttendanceTooltip}"/>
<TextBlock Text="💬" FontSize="9" IsVisible="{Binding HasNote}" ToolTip.Tip="Bemerkung"/>
</StackPanel>
</StackPanel>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<Grid Grid.Row="1" RowDefinitions="Auto,Auto" ColumnDefinitions="*,Auto" Margin="0,14,0,6">
<TextBlock Grid.Row="0" Grid.Column="0" Text="Mitarbeit im Zeitverlauf" FontSize="13"
FontWeight="SemiBold" VerticalAlignment="Center"/>
<StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal" Spacing="7" VerticalAlignment="Center">
<TextBlock Text="Zoom" FontSize="10" Opacity="0.6" VerticalAlignment="Center"/>
<Slider Minimum="0.65" Maximum="2.25" Value="{Binding TimelineZoom}" Width="120"
TickFrequency="0.1"/>
<Button Content="Legende ▾" Padding="8,3" FontSize="10">
<Button.Flyout>
<Flyout Placement="BottomEdgeAlignedRight">
<StackPanel Width="310" Spacing="6" Margin="12">
<TextBlock Text="Hausaufgaben" FontWeight="SemiBold" FontSize="11"/>
<TextBlock Text="· keine Hausaufgabe erfasst" FontSize="10" Opacity="0.65"/>
<TextBlock Text="✓ gemacht" FontSize="10" Foreground="#2E9D57"/>
<TextBlock Text="◐ teilweise angefertigt Rest offen" FontSize="10" Foreground="#D98200"/>
<TextBlock Text="◕ teilweise angefertigt Rest nachgereicht" FontSize="10" Foreground="#7F77DD"/>
<TextBlock Text="◒ teilweise angefertigt Rest nicht nachgereicht" FontSize="10" Foreground="#D64545"/>
<TextBlock Text="! nicht gemacht Nachreichen offen" FontSize="10" Foreground="#D98200"/>
<TextBlock Text="✕ nicht gemacht nicht mehr nachgereicht" FontSize="10" Foreground="#D64545"/>
<TextBlock Text="↺ nachgereicht" FontSize="10" Foreground="#7F77DD"/>
<Separator Margin="0,4"/>
<TextBlock Text="Anwesenheit" FontWeight="SemiBold" FontSize="11"/>
<TextBlock Text="· noch nicht kontrolliert" FontSize="10" Opacity="0.65"/>
<TextBlock Text="✓ anwesend" FontSize="10" Foreground="#2E9D57"/>
<TextBlock Text="? Entschuldigung offen" FontSize="10" Foreground="#D98200"/>
<TextBlock Text="⊘ krank, entschuldigt" FontSize="10" Foreground="#4C86A8"/>
<TextBlock Text="! unentschuldigt" FontSize="10" Foreground="#D96C00"/>
<TextBlock Text="✕ geschwänzt" FontSize="10" Foreground="#D64545"/>
<TextBlock Text="◇ andere Schulveranstaltung" FontSize="10" Foreground="#5277C3"/>
<TextBlock Text="Klick auf ein Symbol wechselt zum nächsten Status."
FontSize="9" Opacity="0.55" Margin="0,5,0,0" TextWrapping="Wrap"/>
</StackPanel>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</ScrollViewer>
</Flyout>
</Button.Flyout>
</Button>
</StackPanel>
<WrapPanel Grid.Row="1" Grid.ColumnSpan="2" Margin="0,7,0,0" VerticalAlignment="Center">
<TextBlock Text="Kurven" FontSize="10" FontWeight="SemiBold" Opacity="0.6"
VerticalAlignment="Center" Margin="0,0,7,0"/>
<ToggleButton IsChecked="{Binding ShowQuality}" Padding="7,2" FontSize="10" Margin="0,0,5,3">
<StackPanel Orientation="Horizontal" Spacing="5"><Border Width="9" Height="9" CornerRadius="5" Background="#2E86DE"/><TextBlock Text="Qualität"/></StackPanel>
</ToggleButton>
<ToggleButton IsChecked="{Binding ShowQuantity}" Padding="7,2" FontSize="10" Margin="0,0,5,3">
<StackPanel Orientation="Horizontal" Spacing="5"><Border Width="9" Height="9" CornerRadius="5" Background="#E67E22"/><TextBlock Text="Quantität"/></StackPanel>
</ToggleButton>
<ToggleButton IsChecked="{Binding ShowWorkphase}" Padding="7,2" FontSize="10" Margin="0,0,12,3">
<StackPanel Orientation="Horizontal" Spacing="5"><Border Width="9" Height="9" CornerRadius="5" Background="#16A085"/><TextBlock Text="Arbeitsphase"/></StackPanel>
</ToggleButton>
<ToggleButton Content="Datenpunkte" IsChecked="{Binding ShowDataPoints}"
Padding="7,2" FontSize="10" Margin="0,0,12,3"/>
<TextBlock Text="Trends (121)" FontSize="10" FontWeight="SemiBold" Opacity="0.6"
VerticalAlignment="Center" Margin="0,0,7,0"/>
<ToggleButton Content="Gesamt gewichtet" IsChecked="{Binding ShowWeightedTrend}"
Padding="7,2" FontSize="10" Margin="0,0,5,3"/>
<ToggleButton Content="Qualität" IsChecked="{Binding ShowQualityTrend}"
Padding="7,2" FontSize="10" Margin="0,0,5,3"/>
<ToggleButton Content="Quantität" IsChecked="{Binding ShowQuantityTrend}"
Padding="7,2" FontSize="10" Margin="0,0,5,3"/>
<ToggleButton Content="Arbeitsphase" IsChecked="{Binding ShowWorkphaseTrend}"
Padding="7,2" FontSize="10" Margin="0,0,0,3"/>
</WrapPanel>
</Grid>
<Border Grid.Row="2" BorderBrush="{DynamicResource SystemControlForegroundBaseLowBrush}"
BorderThickness="1" CornerRadius="7" ClipToBounds="True">
<ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Disabled">
<views:ParticipationTimelineChart Timeline="{Binding Timeline}" Zoom="{Binding TimelineZoom}"
ShowQuality="{Binding ShowQuality}"
ShowQuantity="{Binding ShowQuantity}"
ShowWorkphase="{Binding ShowWorkphase}"
ShowDataPoints="{Binding ShowDataPoints}"
ShowWeightedTrend="{Binding ShowWeightedTrend}"
ShowQualityTrend="{Binding ShowQualityTrend}"
ShowQuantityTrend="{Binding ShowQuantityTrend}"
ShowWorkphaseTrend="{Binding ShowWorkphaseTrend}"/>
</ScrollViewer>
</Border>
<StackPanel Grid.Row="3" Spacing="4" Margin="0,14,0,0">
<TextBlock Text="Abschnittsnoten dieses Schülers" FontSize="13" FontWeight="SemiBold"/>