Add warning detail popup and quick blocks for Vorgänge
CI / build-and-test (push) Canceled after 0s

Dashboard warnings (attendance, homework, lateness) get a "Details" flyout
with key figures, a list of dates and the compact month calendar from the
class teacher overview, now extracted as a shared control. The calendar
now aligns days under their weekday (Mo-So header, blank leading cells).

Creating Vorgänge and documentation is supported by quick blocks with the
current figures, dated standard phrases (e.g. "Klassenleitung informiert")
and documentation templates (status snapshot, conversation, informing the
class/subject teachers, parent call, parent letter). The class teacher
Vorgänge tab uses WebUntis figures (absences across all subjects, class
register) for the same blocks and templates.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
adminandClaude Opus 5.5 committed 2026-09-26 11:16:13 +02:00
1 parent 0f6cadc9c8
commit aa326cf8b6
25 files changed
+1571 -75

No files matched your search

@@ -126,10 +126,36 @@
</ItemsControl>
<TextBlock Text="Noch keine Dokumentation verknüpft." FontSize="11" Opacity="0.5"
IsVisible="{Binding !HasLinkedDocumentation}"/>
<Button Content="+ Neue Dokumentation anlegen" FontSize="11" Padding="8,3"
HorizontalAlignment="Left"
Command="{Binding $parent[ItemsControl].((vm:ClassTeacherCasesViewModel)DataContext).CreateAndLinkDocumentationCommand}"
CommandParameter="{Binding}"/>
<StackPanel Orientation="Horizontal" Spacing="6">
<Button Content="+ Neue Dokumentation anlegen" FontSize="11" Padding="8,3"
Command="{Binding $parent[ItemsControl].((vm:ClassTeacherCasesViewModel)DataContext).CreateAndLinkDocumentationCommand}"
CommandParameter="{Binding}"/>
<!-- Nutzer-Feedback: standardisierte Einträge statt alles von Hand. Zahlen aus
WebUntis (Fehlzeiten über alle Fächer, Klassenbuch), siehe
ClassTeacherStudentFacts; bezieht sich auf die/den erste/n Beteiligte/n. -->
<Button Content="+ Aus Vorlage ▾" FontSize="11" Padding="8,3"
IsVisible="{Binding HasDocumentationTemplates}">
<Button.Flyout>
<MenuFlyout>
<MenuItem Header="Fehlzeiten-Stand (WebUntis) festhalten"
Command="{Binding CreateFromTemplateCommand}" CommandParameter="untisabsences"/>
<MenuItem Header="Verspätungs-Stand (WebUntis) festhalten"
Command="{Binding CreateFromTemplateCommand}" CommandParameter="lateness"/>
<MenuItem Header="Klassenbuch-Stand festhalten"
Command="{Binding CreateFromTemplateCommand}" CommandParameter="classregister"/>
<Separator/>
<MenuItem Header="Gespräch mit Schüler*in"
Command="{Binding CreateFromTemplateCommand}" CommandParameter="conversation"/>
<MenuItem Header="Fachlehrkräfte informieren"
Command="{Binding CreateFromTemplateCommand}" CommandParameter="informsubjectteachers"/>
<MenuItem Header="Elternanruf vorbereiten"
Command="{Binding CreateFromTemplateCommand}" CommandParameter="parentcall"/>
<MenuItem Header="Elternbrief entwerfen"
Command="{Binding CreateFromTemplateCommand}" CommandParameter="parentletter"/>
</MenuFlyout>
</Button.Flyout>
</Button>
</StackPanel>
</StackPanel>
<StackPanel Spacing="4" IsVisible="{Binding HasAvailableDocumentation}">
@@ -27,7 +27,10 @@ public partial class ClassTeacherCasesView : UserControl
var owner = TopLevel.GetTopLevel(this) as Window;
if (owner is null) return null;
var vm = new VorgangDialogViewModel(rosterStudents, editing);
var cases = DataContext as ClassTeacherCasesViewModel;
var vm = new VorgangDialogViewModel(rosterStudents, editing,
phraseBlocks: VorgangPhraseBlocks.ForClassTeacher(DateOnly.FromDateTime(DateTime.Today)),
studentQuickBlocks: cases is null ? null : cases.QuickBlocksFor);
var dialog = new VorgangDialog { DataContext = vm };
var saved = await dialog.ShowDialog<bool>(owner);
return saved ? vm.Result : null;
@@ -53,8 +56,10 @@ public partial class ClassTeacherCasesView : UserControl
var owner = TopLevel.GetTopLevel(this) as Window;
if (owner is null) return null;
var isNewDraft = editing is not null
&& (DataContext as ClassTeacherCasesViewModel)?.IsNewDocumentationDraft(editing) == true;
var vm = new DocumentationDialogViewModel(defaultStudentId, editing,
App.Services.GetRequiredService<IAttachmentStorage>(), studentOptions);
App.Services.GetRequiredService<IAttachmentStorage>(), studentOptions, isNewDraft: isNewDraft);
var dialog = new DocumentationDialog { DataContext = vm };
var saved = await dialog.ShowDialog<bool>(owner);
if (!saved) vm.DiscardUnsavedAttachments();
@@ -2,6 +2,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="clr-namespace:LehrerApp.Desktop.ViewModels.ClassTeacher"
xmlns:views="clr-namespace:LehrerApp.Desktop.Views.ClassTeacher"
xmlns:shared="clr-namespace:LehrerApp.Desktop.Views.Shared"
xmlns:conv="clr-namespace:LehrerApp.Desktop.Converters"
x:Class="LehrerApp.Desktop.Views.ClassTeacher.ClassTeacherOverviewView"
x:DataType="vm:ClassTeacherOverviewViewModel">
@@ -98,19 +99,6 @@
<Style Selector="Border.statusFill.danger">
<Setter Property="Background" Value="{DynamicResource AppStatusDangerBrush}"/>
</Style>
<Style Selector="Border.compactDay">
<Setter Property="Width" Value="28"/>
<Setter Property="Height" Value="28"/>
<Setter Property="CornerRadius" Value="6"/>
<Setter Property="Background" Value="{DynamicResource AppChipBackgroundBrush}"/>
<Setter Property="BorderBrush" Value="{DynamicResource AppCardBorderBrush}"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="Margin" Value="2"/>
</Style>
<Style Selector="Border.compactDay.today">
<Setter Property="BorderBrush" Value="{DynamicResource AppAccentTextBrush}"/>
<Setter Property="BorderThickness" Value="2"/>
</Style>
</UserControl.Styles>
<UserControl.Resources>
@@ -424,7 +412,9 @@
<!-- Verdichtete Monatsansicht: exakt eine Zelle je Kalendertag. Ohne Ereignis
bleibt nur die Tageszahl sichtbar; bei Auffälligkeiten ersetzt das stärkste
Statuskürzel die Zahl. Alle Details bleiben per Tooltip und Drill-down erhalten. -->
Statuskürzel die Zahl. Alle Details bleiben per Tooltip und Drill-down erhalten.
Das Widget selbst liegt in Views/Shared/CompactMonthCalendar (auch im
Detail-Popup der Dashboard-Warnungen genutzt). -->
<Border Classes="sidePanel">
<StackPanel Spacing="8">
<Grid ColumnDefinitions="*,Auto">
@@ -441,29 +431,7 @@
DisplayMemberBinding="{Binding DisplayName}"
HorizontalAlignment="Stretch"
AutomationProperties.Name="Schüler für Monatskalender auswählen"/>
<ItemsControl ItemsSource="{Binding CompactMonthDays}" HorizontalAlignment="Center">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate><UniformGrid Columns="7"/></ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate x:DataType="vm:ClassTeacherCompactCalendarDay">
<Border Classes="compactDay" Classes.today="{Binding IsToday}"
ToolTip.Tip="{Binding Tooltip}">
<Grid>
<TextBlock Text="{Binding DayNumber}" FontSize="11" Opacity="0.7"
HorizontalAlignment="Center" VerticalAlignment="Center"
IsVisible="{Binding !HasSignal}"/>
<Border Background="{Binding SignalColorHex}" CornerRadius="5"
IsVisible="{Binding HasSignal}">
<TextBlock Text="{Binding SignalCode}" Foreground="White" FontSize="11"
FontWeight="Bold" HorizontalAlignment="Center"
VerticalAlignment="Center"/>
</Border>
</Grid>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<shared:CompactMonthCalendar Days="{Binding CompactMonthDays}"/>
<TextBlock Text="U unentsch. · ! Klassenbuch · A abwesend · V verspätet · E entsch."
FontSize="9" Opacity="0.5" TextWrapping="Wrap"/>
</StackPanel>
@@ -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.ClassTeacher"
xmlns:svm="clr-namespace:LehrerApp.Desktop.ViewModels.Students"
x:Class="LehrerApp.Desktop.Views.ClassTeacher.VorgangDialog"
x:DataType="vm:VorgangDialogViewModel"
Title="{Binding DialogTitle}"
Width="480" SizeToContent="Height" MinHeight="360"
Width="560" SizeToContent="Height" MinHeight="360" MaxHeight="860"
CanResize="True" WindowStartupLocation="CenterOwner">
<Grid RowDefinitions="*,Auto" Margin="24">
@@ -21,8 +22,44 @@
<StackPanel Spacing="4">
<TextBlock Text="Beschreibung" FontSize="12" Opacity="0.7"/>
<TextBox Text="{Binding Description}" AcceptsReturn="True" Height="90" TextWrapping="Wrap"
<TextBox Text="{Binding Description}" AcceptsReturn="True" Height="120" TextWrapping="Wrap"
PlaceholderText="Worum geht es? Was ist bisher passiert?"/>
<!-- Nutzer-Feedback: Fehlquoten etc. nicht von Hand abtippen — Bausteine mit dem aktuellen
Stand werden an die Beschreibung angehängt (nicht ersetzt). -->
<StackPanel Spacing="4" IsVisible="{Binding HasQuickBlocks}" Margin="0,2,0,0">
<TextBlock Text="Schnellbausteine (aktueller Stand einfügen)" FontSize="11" Opacity="0.6"/>
<ItemsControl ItemsSource="{Binding QuickBlocks}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate><WrapPanel ItemSpacing="6" LineSpacing="6"/></ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate x:DataType="svm:VorgangQuickBlock">
<Button Content="{Binding Label, StringFormat='+ {0}'}" FontSize="11" Padding="8,3"
ToolTip.Tip="{Binding Text}"
Command="{Binding $parent[ItemsControl].((vm:VorgangDialogViewModel)DataContext).InsertQuickBlockCommand}"
CommandParameter="{Binding}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
<!-- Nutzer-Feedback: "den Klassenlehrer informiert" & Co. nicht jedes Mal tippen —
datumsgestempelte Verlaufszeile, angehängt statt ersetzt. -->
<StackPanel Spacing="4" IsVisible="{Binding HasPhraseBlocks}" Margin="0,2,0,0">
<TextBlock Text="Standardformulierungen (mit heutigem Datum)" FontSize="11" Opacity="0.6"/>
<ItemsControl ItemsSource="{Binding PhraseBlocks}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate><WrapPanel ItemSpacing="6" LineSpacing="6"/></ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate x:DataType="svm:VorgangQuickBlock">
<Button Content="{Binding Label}" FontSize="11" Padding="8,3"
ToolTip.Tip="{Binding Text}"
Command="{Binding $parent[ItemsControl].((vm:VorgangDialogViewModel)DataContext).InsertPhraseCommand}"
CommandParameter="{Binding}"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
</StackPanel>
</StackPanel>
<StackPanel Spacing="6">