Files
LehrerApp/LehrerApp.Desktop/Views/ClassTeacher/VorgangDialog.axaml
T
adminandClaude Opus 5.5 aa326cf8b6
CI / build-and-test (push) Canceled after 0s
Add warning detail popup and quick blocks for Vorgänge
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>
2026-09-26 11:16:13 +02:00

118 lines
6.4 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<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="560" SizeToContent="Height" MinHeight="360" MaxHeight="860"
CanResize="True" WindowStartupLocation="CenterOwner">
<Grid RowDefinitions="*,Auto" Margin="24">
<ScrollViewer Grid.Row="0">
<StackPanel Spacing="12">
<TextBlock Text="{Binding DialogTitle}" Classes="dialogtitle"/>
<StackPanel Spacing="4">
<TextBlock Text="Titel *" FontSize="12" Opacity="0.7"/>
<TextBox Text="{Binding Title}"/>
<TextBlock Text="{Binding TitleError}" Foreground="Red" FontSize="11"
IsVisible="{Binding TitleError, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
</StackPanel>
<StackPanel Spacing="4">
<TextBlock Text="Beschreibung" FontSize="12" Opacity="0.7"/>
<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">
<TextBlock Text="Schlagwörter" FontSize="12" Opacity="0.7"/>
<ItemsControl ItemsSource="{Binding Tags}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate><WrapPanel ItemSpacing="6" LineSpacing="6"/></ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate>
<Border Background="{DynamicResource SystemControlBackgroundBaseMediumBrush}"
CornerRadius="10" Padding="8,3">
<StackPanel Orientation="Horizontal" Spacing="5">
<TextBlock Text="{Binding}" FontSize="11"/>
<Button Content="×" FontSize="11" Padding="0" Background="Transparent"
Command="{Binding $parent[ItemsControl].((vm:VorgangDialogViewModel)DataContext).RemoveTagCommand}"
CommandParameter="{Binding}"/>
</StackPanel>
</Border>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<Grid ColumnDefinitions="*,8,Auto">
<AutoCompleteBox Grid.Column="0" Text="{Binding NewTag}"
ItemsSource="{Binding TagSuggestions}"
FilterMode="Contains" MinimumPrefixLength="0"
PlaceholderText="Schlagwort (z.B. Absentismus)"/>
<Button Grid.Column="2" Content="+" Command="{Binding AddTagCommand}"/>
</Grid>
</StackPanel>
<StackPanel Spacing="4">
<TextBlock Text="Betroffene Schüler*innen *" FontSize="12" Opacity="0.7"/>
<ItemsControl ItemsSource="{Binding StudentOptions}">
<ItemsControl.ItemsPanel>
<ItemsPanelTemplate><WrapPanel/></ItemsPanelTemplate>
</ItemsControl.ItemsPanel>
<ItemsControl.ItemTemplate>
<DataTemplate x:DataType="vm:VorgangStudentOption">
<CheckBox Content="{Binding Name}" IsChecked="{Binding IsSelected}" Margin="0,2,14,2"/>
</DataTemplate>
</ItemsControl.ItemTemplate>
</ItemsControl>
<TextBlock Text="{Binding StudentsError}" Foreground="Red" FontSize="11"
IsVisible="{Binding StudentsError, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"/>
</StackPanel>
</StackPanel>
</ScrollViewer>
<Grid Grid.Row="1" ColumnDefinitions="*,8,*" Margin="0,20,0,0">
<Button Grid.Column="0" Content="Abbrechen" HorizontalAlignment="Stretch" Click="OnCancel"/>
<Button Grid.Column="2" Content="Speichern" HorizontalAlignment="Stretch" Click="OnSave"/>
</Grid>
</Grid>
</Window>